?
avatar brownme84th
brownme84th
18 Jul 2016

Steps to reproduce the issue

upgraded from Joomla version 2.5.28 to version 3.6. Logged in to admin center. Browsed to Extensions: Database. I am presented with several database issues as shown here:
Table 'jos_session' does not have column 'session_id' with type varchar(200);. (From file 1.7.1-2011-09-15.sql.)
Table 'jos_redirect_links' does not have column 'old_url' with type varchar(255);. (From file 1.7.1-2011-09-20.sql.)
Table 'jos_redirect_links' does not have column 'new_url' with type varchar(255);. (From file 1.7.1-2011-09-20.sql.)
Table 'jos_banners' does not have column 'alias' with type VARCHAR(255). (From file 1.7.3-2011-10-15.sql.)
Table 'jos_categories' does not have column 'alias' with type VARCHAR(255). (From file 1.7.3-2011-10-15.sql.)
Table 'jos_contact_details' does not have column 'alias' with type VARCHAR(255). (From file 1.7.3-2011-10-15.sql.)
Table 'jos_content' does not have column 'alias' with type VARCHAR(255). (From file 1.7.3-2011-10-15.sql.)
Table 'jos_content' does not have column 'title_alias' with type VARCHAR(255). (From file 1.7.3-2011-10-15.sql.)
Table 'jos_menu' does not have column 'alias' with type VARCHAR(255). (From file 1.7.3-2011-10-15.sql.)
Table 'jos_newsfeeds' does not have column 'alias' with type VARCHAR(255). (From file 1.7.3-2011-10-15.sql.)
Table 'jos_content' does not have column 'alias' with type VARCHAR(255). (From file 1.7.3-2011-11-10.sql.)
Table 'jos_newsfeeds' does not have column 'alias' with type VARCHAR(255). (From file 1.7.4-2011-11-23.sql.)
Table 'jos_content' does not have column 'alias' with type VARCHAR(255). (From file 1.7.4-2011-11-23.sql.)
Table 'jos_content' does not have column 'title_alias' with type VARCHAR(255). (From file 1.7.4-2011-11-23.sql.)

When I click on the "fix" button I get this error:
Specified key was too long; max key length is 767 bytes SQL=ALTER TABLE #__session MODIFY session_id varchar(200);

Expected result

A message showing that my database issues were fixed.

Actual result

an error message that reads:
Specified key was too long; max key length is 767 bytes SQL=ALTER TABLE #__session MODIFY session_id varchar(200);

System information (as much as possible)

GoDaddy hosting
MySQL database version 5.5
PHP version 5.4
Joomla upgrade to 3.6 from 2.5.28

Additional comments

avatar brownme84th brownme84th - open - 18 Jul 2016
avatar sovainfo
sovainfo - comment - 18 Jul 2016

Try removing content of administrator/components/com_admin/sql/update/mysql before you update.

avatar brownme84th
brownme84th - comment - 18 Jul 2016

So your recommending that I restore my old version and then remove the contents, then run the upgrade?

Thanks

Sent from my iPhone

On Jul 18, 2016, at 2:28 AM, sovainfo > wrote:

Try removing content of administrator/components/com_admin/sql/update/mysql before you update.

You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub#11167 (comment), or mute the threadhttps://github.com/notifications/unsubscribe-auth/ALqK2sys2uosFjILeADersDcCcoW6W09ks5qWx0LgaJpZM4JOXJp.

avatar zero-24
zero-24 - comment - 18 Jul 2016

We have some problems with The updater. You Can just remove the files for 1.7 from the folder in the comment above and run the fix button again.

avatar sovainfo
sovainfo - comment - 18 Jul 2016

Yes, that was what I recommended. But, considering there are reports of the update from j2528 to j360 not working, agree with @zero-24.

Curious to what Extensions->Database and ->Fix will say.

In addition, this issue should have been reported on the forum. This queue is for issues with the software. Unless you are suggesting these files should have been removed because it only updates from J2.5.

avatar brownme84th
brownme84th - comment - 18 Jul 2016

Yes that is what I am recommending.

Thanks

Sent from my iPhone

On Jul 18, 2016, at 12:01 PM, sovainfo > wrote:

Yes, that was what I recommended. But, considering there are reports of the update from j2528 to j360 not working, agree with @zero-24https://github.com/zero-24.

Curious to what Extensions->Database and ->Fix will say.

In addition, this issue should have been reported on the forum. This queue is for issues with the software. Unless you are suggesting these files should have been removed because it only updates from J2.5.

You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub#11167 (comment), or mute the threadhttps://github.com/notifications/unsubscribe-auth/ALqK2ijxZ5ixI03z07be2rmAl2oV6PCsks5qW6MdgaJpZM4JOXJp.

avatar richard67
richard67 - comment - 18 Jul 2016

A solution could be to add a version_compare in the updater (installer library is the right place maybe) in order not to run schema updates for the core with file versions older than 2.5 (or so).


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11167.

avatar mbabker
mbabker - comment - 18 Jul 2016

Shouldn't do that. The installer library essentially does a version compare against the record in the schemas table and whatever it finds in the filesystem and everything newer than that applied. Introducing arbitrary restrictions seems like a counterintuitive idea to me; if you really don't want them there then remove them from the package.

The fact that 2.5 upgrade queries get executed on a 3.x upgrade means there is a loss of synchronization for the schemas record.

avatar zero-24
zero-24 - comment - 18 Jul 2016

They got executed because they don't get deleted with the script PHP ;)

avatar mbabker
mbabker - comment - 18 Jul 2016

Even if they're in the filesystem if the schemas record is correct they shouldn't be triggered at all. I could put a 1.0.0.sql file in those update directories with this:

CREATE TABLE IF NOT EXISTS `#__mocker` (
  `exists` tinyint(1) NOT NULL default '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE utf8mb4_unicode_ci;

And that should NEVER get triggered if the schemas record is correct. If it is not, or you hit the fix button, that would be triggered.

avatar zero-24
zero-24 - comment - 18 Jul 2016

#wefoundanotherbugthan :(

avatar sovainfo
sovainfo - comment - 18 Jul 2016

Indeed, they are executed because they are there, and they should, but the question is when they should be deleted. In my opinion they shouldn't be in the update either.
The update doesn't process them, the Extensions->Database does!
The Extensions->Database shouldn't process newer than current!

avatar mbabker
mbabker - comment - 18 Jul 2016

Step through this code in JInstaller::parseSchemaUpdates() as that is the code parsing the updates in the normal update routine (for core and third party extensions). It scans the filesystem, sorts the files using version_compare, grabs the schema record from the database, and applies everything that's newer than the schema version. In a correctly running system, the schema version should match the newest file in the updates directory at the version being upgraded from.

avatar sovainfo
sovainfo - comment - 18 Jul 2016

Please read the OP. These errors came from Extensions->Database and they should!

avatar mbabker
mbabker - comment - 18 Jul 2016

Ignore me. Too many update related issues going on.

avatar brownme84th
brownme84th - comment - 19 Jul 2016

Thanks everyone. This fixed all my issues. I was having errors too while trying to create a new article (was always getting an error page). Deleting these items fixed all the errors I was getting.

Thanks again

Mark Brown

From: zero-24 [mailto:notifications@github.com]
Sent: Monday, July 18, 2016 10:42 AM
To: joomla/joomla-cms joomla-cms@noreply.github.com
Cc: Mark Brown mark.brown@provinggroundgames.com; Author author@noreply.github.com
Subject: Re: [joomla/joomla-cms] Upgraded from 2.5.28 to 3.6 causes database errors that cant be fixed (#11167)

We have some problems with The updater. You Can just remove the files for 1.7 from the folder in the comment above and run the fix button again.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub#11167 (comment), or mute the threadhttps://github.com/notifications/unsubscribe-auth/ALqK2lYNeG63dsjpjHO_MjLW_q4ArTbLks5qW5DPgaJpZM4JOXJp.

avatar infograf768
infograf768 - comment - 19 Jul 2016

After update, I just deleted the sql update files of type 1.7.x and used the Fix button (After deleting the 3 legacy.php files) and all went well again.

avatar zero-24
zero-24 - comment - 19 Jul 2016

Yes. These files should be deleted using the script.php but that fails between 2.5 and 3.6 ;)

https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_admin/script.php#L481-L495

avatar brianteeman
brianteeman - comment - 1 Dec 2016

@zero-24 did this get resolved somewhere?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/11167.

avatar zero-24
zero-24 - comment - 1 Dec 2016

Yes it is fixed by readding the call to the deletion script to the original place. 2.5 to 3.6.4 works now via 3.5.1 @s per updater suggestions :)

avatar brianteeman
brianteeman - comment - 1 Dec 2016

Great. Closed

avatar brianteeman brianteeman - change - 1 Dec 2016
Status New Closed
Closed_Date 0000-00-00 00:00:00 2016-12-01 11:21:18
Closed_By brianteeman
avatar brianteeman brianteeman - close - 1 Dec 2016

Add a Comment

Login with GitHub to post a comment