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

Post Reply
fredp
Forum Members
Forum Members
Posts: 218
Joined: Sun Jul 27, 2008 1:36 am
Location: USA

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

Post 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
Nearly all men can stand adversity, but if you want to test a man's character, give him power.
- Abraham Lincoln
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12709
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

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

Post by Dr.CSS »

It would help if you told what version you upgrade from and what modules you have installed...
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

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

Post by calguy1000 »

I fixed this issue in svn today too.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
fredp
Forum Members
Forum Members
Posts: 218
Joined: Sun Jul 27, 2008 1:36 am
Location: USA

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

Post by fredp »

calguy1000 wrote:I fixed this issue in svn today too.
Thanks, that's good to know!
Nearly all men can stand adversity, but if you want to test a man's character, give him power.
- Abraham Lincoln
fredp
Forum Members
Forum Members
Posts: 218
Joined: Sun Jul 27, 2008 1:36 am
Location: USA

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

Post 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
Nearly all men can stand adversity, but if you want to test a man's character, give him power.
- Abraham Lincoln
Post Reply

Return to “Closed Issues”