User tests: Successful: Unsuccessful:
#2146 tried to fix a broken version comparison that was there, but did it in a wrong way. The schema was compared against the Joomla version, although the two have actually very little in common.
$this->schemaVersion is the schema version stored in the database. $this->changeset->getSchema() is the latest available file in the respective folder of com_admin. Those 2 should be compared and not $this->schemaVersion with the Joomla version.
Since before #2146 it only compared the first 5 characters of the schemaVersion and the Joomla version, the check was always positive for all Joomla 2.5.1x versions and it only wanted to update for new Joomla 3.x.x versions, but didn't really react during development time. Introducing the version comparison showed that bug, but didn't really fix it. This PR should do that.
Mea culpa.
Labels |
Added:
?
?
|
Please create a tracker item and cross reference here.
Fixed in both PRs.
That only leaves the override in Hathor.
Tried to contribute those changes to your patch-12 branch, failed with 404 from github!
I confirm Hathor has also to be patched and, please, again, create a tracker on joomlacode as we have not switched to JISSUEs
Another solution to this issue that avoid modifying multiple files could be to modify the models/database.php to cleanup the getSchemaversion function.
Here it is the code that I propose.
public function getSchemaVersion()
{
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select('version_id')
->from($db->quoteName('#__schemas'))
->where('extension_id = 700');
$db->setQuery($query);
$result = $db->loadResult();
//jms2winbegin
if ( !empty( $result)) {
// Cleanup the schema version to just keep the (nn.nn.nn)
if ( preg_match( '#([0-9]+.[0-9]+.[0-9]+)#', $result, $match)) {
$result = $match[1];
}
}
//jms2winend
return $result;
}
So that, the other files does not need to be changed.
That unfortunately does not work, since we actually do want to compare the full schema versions against each other in order to also get the updates during development time.
OK - that was just a proposal to minimize the fix but effectively, I didn't took in consideration that now, you would like to check the full schema version including the date that is present after the version number because in the past, the objective was to just verify the number (excluding the date).
That explain why I proposed an alternative solution but yours is better to also take in account the date.
Well done.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2014-03-10 01:55:43 |
I'm getting this error in my database and the fix doesn't resolve it. Will your patch help with that?
Database schema version (in #__schemas): 3.2.3-2014-02-20.
Update version (in #__extensions): 3.2.3.
Database driver: mysqli.
82 database changes were checked successfully.
136 database changes did not alter table structure and were skipped.
I don't see any error in your paste. that is what should be displayed if everything is okay.
Please check the forums for support. This is not the right place for that. In any case, you should check the other tab to see what the error actually is.
hi guys, I am completely new in joomla, can anyone please help me how to patch this up to get my data base schema fixed? i tried fixing it from the extension manager update section and the button fix does not work. i would appreciate any help in advance. :)
This is only a view issue that will fixed with the next release. You don't need to fix it manualy.
See: http://docs.joomla.org/J3.2:Database_schema_version_%283.2.3-2014-02-20%29_does_not_match_CMS_version_%283.2.3%29
You may blame the J!Tracker Application for transmitting this comment.
EDIT:
If you (know what you do and) will fix it. You only need to do the changes that show here:
https://github.com/joomla/joomla-cms/pull/3249/files
@zero-24 thank you ok so some edit on these files that are found from https://github.com/joomla/joomla-cms/pull/3249/files . Can I edit the lines with using my file manager of cpanel?
Hi there,
I actually modified the 3 files but still get the same error:
Database schema version (3.2.3-2014-02-20) does not match CMS version (3.2.2-2014-01-23).
Database update version (3.2.3) does not match CMS version (3.2.2).
Any thoughts?
Your versions are NOT correct. Your CMS is not up-to-date. Please update.
Updated, re-modified files and now its working great.
Thanks!
help me please
1054 Unknown column 'type_alias' in 'where clause' SQL=SELECT * FROM #__content_types
WHERE type_alias
IN ('com_content.category')
Guys this is a issue tracker not a support portal. Please use the forum for support http://forum.joomla.org/. I'm locking this issue
In Your patch is error:
is: $this->changeset->getschema()
corrrect is: $this->changeSet->getSchema()