View Issue Details

IDProjectCategoryView StatusLast Update
0001581phplist applicationInstallationpublic24-10-04 16:34
Reporterken 
PrioritynormalSeveritytweakReproducibilityalways
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version2.9.2 
Summary0001581: Error message when adding attributes.
DescriptionI have freshly installed version 2.8.11. When adding attributes I get the error message: 'Database error 1146 Table 'vusainc_newsletter.attribute' doesn't exist'

The attribute appears on the page, but I am not sure if this will have any affect on the application.
Additional InformationUnix server
MySQL 4.0.20-standard
TagsNo tags attached.

Activities

dkg

10-08-04 23:28

reporter   ~0001645

i just ran into this running 2.8.11.

the problem seems to be in public_html/lists/admin/commonlib/lib/userlib.php, where the code isn't using $tables[] correctly.

i'll upload a patch which seems to fix things shortly.

10-08-04 23:29

 

phplist-patch (1,480 bytes)
*** public_html/lists/admin/commonlib/lib/userlib.php	Tue Aug 10 17:11:33 2004
--- /home/dkg/public_html/lists/admin/commonlib/lib/userlib.php	Thu Jul 29 08:53:30 2004
***************
*** 570,586 ****
  }
  
  function getNewAttributeTablename($name) {
-   global $tables;
    $lc_name = substr(preg_replace("/\W/","", strtolower($name)),0,10);
  #  if ($lc_name == "") Fatal_Error("Name cannot be empty: $lc_name");
  	if (!$lc_name) $lc_name = "attribute";
!   Sql_Query("select * from {$tables['attribute']} where tablename = \"$lc_name\"");
  #  if (Sql_Affected_Rows()) Fatal_Error("Name is not unique enough");
  	$c = 1;
    $basename = $lc_name;
    while (Sql_Affected_Rows() && $c < 100) {
    	$lc_name = $basename.$c;
!   	Sql_Query("select * from {$tables['attribute']} where tablename = \"$lc_name\"");
      $c++;
    }
  	return $lc_name;
--- 570,585 ----
  }
  
  function getNewAttributeTablename($name) {
    $lc_name = substr(preg_replace("/\W/","", strtolower($name)),0,10);
  #  if ($lc_name == "") Fatal_Error("Name cannot be empty: $lc_name");
  	if (!$lc_name) $lc_name = "attribute";
!   Sql_Query("select * from attribute where tablename = \"$lc_name\"");
  #  if (Sql_Affected_Rows()) Fatal_Error("Name is not unique enough");
  	$c = 1;
    $basename = $lc_name;
    while (Sql_Affected_Rows() && $c < 100) {
    	$lc_name = $basename.$c;
!   	Sql_Query("select * from attribute where tablename = \"$lc_name\"");
      $c++;
    }
  	return $lc_name;
phplist-patch (1,480 bytes)

ken

12-08-04 10:21

reporter   ~0001652

Last edited: 12-08-04 10:21

Thanks DKG,

How should I apply the patch? I'll try to figure it out in the meantime.

Thanks,

Ken

edited on: 08-12-04 09:21

andy_vdg

28-09-04 15:01

reporter   ~0002056

Last edited: 28-09-04 15:04

I have the same problem. I'll try the patch.
This might help on how to use it:
http://www.phplist.com/forums/viewtopic.php?t=1362


Thanks,
Andy

edited on: 28-09-04 14:02

edited on: 28-09-04 14:04