Page 1 of 1

Step 5: Creating index in content table... [failed]

Posted: Fri Jun 22, 2012 1:02 am
by fredp
Undefined variable use ($db_prefix) in install/upgrades/upgrade.35.to.36.php (on line 49) is causing the index_content_by_idhier index creation to fail. (See the error in bold/red below):
install/upgrades/upgrade.35.to.36.php (line 49) wrote:$sqlarray = $dbdict->CreateTableSQL(cms_db_prefix()."routes", $flds, $taboptarray);
...
$sqlarray = $dbdict->CreateIndexSQL($db_prefix.'index_content_by_idhier', $db_prefix."content", 'hierarchy');
To isolate the problem, I added some debugging code to upgrade.35.to.36.php to var_dump relavant values, which are included below. You can see that the table name doesn't include the cms_db_prefix() value:
$sqlarray = array(1) { [0]=> string(67) "ALTER TABLE content ADD INDEX index_content_by_idhier (hierarchy)" }
$return = int(1)
$db err info= array(3) { ["ErrorNo"]=> int(1146) ["ErrorMsg"]=> string(42) "Table 'beta1_111.content' doesn't exist" ["Affected_Rows"]=> int(-1) }
Please let me know if you need any more details.

Hope this helps,
fredp

Re: Step 5: Creating index in content table... [failed]

Posted: Fri Jun 22, 2012 2:41 am
by Dr.CSS
It would help if you told what version you upgrade from and what modules you have installed...

Re: Step 5: Creating index in content table... [failed]

Posted: Fri Jun 22, 2012 3:01 am
by calguy1000
I fixed this issue in svn today too.

Re: Step 5: Creating index in content table... [failed]

Posted: Fri Jun 22, 2012 5:22 am
by fredp
calguy1000 wrote:I fixed this issue in svn today too.
Thanks, that's good to know!

Re: Step 5: Creating index in content table... [failed]

Posted: Fri Jun 22, 2012 5:28 am
by fredp
Dr.CSS wrote:It would help if you told what version you upgrade from and what modules you have installed...
Hi Dr.CSS,
The upgrade was from 1.10.3. Since I debugged and isolated the problem to an undefined variable used on line 49 of upgrade.35.to.36.php, I felt that, in this particular case, the information you mention wasn't necessarily relevant. Of course, I made this decision based on over 30 years of professional programming experience.

My reasoning is that line 49 is always executed regardless of which version is being upgraded or which modules are installed. This is pretty clearly a cut/paste error from line 220 of install/schemas/schema.php. Not a big deal. Had this been a different kind of problem, I would have provided the aforementioned additional information, as I have in the past during previous betas.

Regards,
fredp