Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


[2.5.x] Fixing version comparison for database schema #3251

merged 5 commits into from

6 participants


#2147 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 #2147 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.


In Your patches is error:
is: $this->changeset->getschema()
corrrect is: $this->changeSet->getSchema()


Needs update to Hathor


I can't see any override to Hathor needed here

@mbabker mbabker merged commit b783377 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 6, 2014
  1. @Hackwar
  2. @Hackwar

    Update view.html.php

    Hackwar authored
Commits on Mar 7, 2014
  1. @Hackwar

    Update default.php

    Hackwar authored
  2. @Hackwar

    Update view.html.php

    Hackwar authored
  3. @Hackwar
This page is out of date. Refresh to see the latest.
4 administrator/components/com_installer/views/database/tmpl/default.php
@@ -31,8 +31,8 @@
<?php endif; ?>
- <?php if (version_compare($this->schemaVersion, JVERSION) != 0) : ?>
- <li><?php echo JText::sprintf('COM_INSTALLER_MSG_DATABASE_SCHEMA_ERROR', $this->schemaVersion, JVERSION); ?></li>
+ <?php if ($this->schemaVersion != $this->changeSet->getSchema()) : ?>
+ <li><?php echo JText::sprintf('COM_INSTALLER_MSG_DATABASE_SCHEMA_ERROR', $this->schemaVersion, $this->changeSet->getSchema()); ?></li>
<?php endif; ?>
<?php if (version_compare($this->updateVersion, JVERSION) != 0) : ?>
2  administrator/components/com_installer/views/database/view.html.php
@@ -38,7 +38,7 @@ function display($tpl=null)
$this->errorCount = count($this->errors);
$errors = count($this->errors);
- if (version_compare($this->schemaVersion, JVERSION) != 0)
+ if ($this->schemaVersion != $this->changeSet->getSchema())
Something went wrong with that request. Please try again.