RTC Release Blocker bug PR-6.0-dev Pending

User tests: Successful: Unsuccessful:

avatar joomdonation
joomdonation
11 Oct 2025

Pull Request for Issue #46262 .

Summary of Changes

From what I see, there are some problems with current implementation of version history

  • The data which we are using to calculate hash is not right. Currently, only item data and custom fields data (if available) are used to calculate hash. So if we edit an article and change tags for that article for example, the change is not detected, so no new version is created for that change. To solve that, I think we should use the whole data which is stored in version history to calculate hash instead
  • In version history display, we need to re-calculate hash of the item to show if a version is currently being used (current version). However, with the new way of storing version history data, there is no reliable way to calculate that hash. So I introduce a new column called is_current to mark an item as current version and use that item hash instead.

Testing Instructions

  • Start with a Joomla 5.4 nightly build if it is possible. Create some articles (or just install Blog sample data plugin). Edit some one or few articles, change it data to make sure it has versions history created
  • Update your Joomla 5.4 to Joomla 6.0 package generated by this URL
  • Try to use version history on this updated website, make sure it is working as expected. Note that for articles created on J5, only the article data can be restored from version history. It's associated data (tags, custom fields) are not stored in version history and it could not be restored. For J6, full articles data (include the article and it's associated data like tags, custom fields) are stored in history, so restore an article also restore it's custom fields, tags... from old version.
  • Try to restore from a version history created in J5 and make sure it still works. But for article created in J5, tags won't be restored and it will be lost.

Actual result BEFORE applying this Pull Request

There are some issues with current code, one of them is marked as release blocker. And there is logical error, complicated, not reliable code, too. Install blog sample data does not work.

Expected result AFTER applying this Pull Request

Should work OK.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar joomdonation joomdonation - open - 11 Oct 2025
avatar joomdonation joomdonation - change - 11 Oct 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 11 Oct 2025
Category SQL Administration com_admin Postgresql com_content com_contenthistory Libraries
b8e63d9 11 Oct 2025 avatar joomdonation CS
avatar joomdonation joomdonation - change - 11 Oct 2025
Labels Added: PR-6.0-dev
5f91fd5 11 Oct 2025 avatar joomdonation CS
avatar joomla-cms-bot joomla-cms-bot - change - 11 Oct 2025
Category SQL Administration com_admin Postgresql com_content com_contenthistory Libraries SQL Administration com_admin Postgresql com_content com_contenthistory Installation Libraries
6b32861 11 Oct 2025 avatar joomdonation CS
avatar richard67
richard67 - comment - 11 Oct 2025

My first tests on a new installation with this PR look good. I will continue with testing, also update from 5.4 to see if the update SQL works, and report back results later.

avatar softforge softforge - test_item - 11 Oct 2025 - Tested successfully
avatar softforge
softforge - comment - 11 Oct 2025

I have tested this item ✅ successfully on 46526ae

Tested successfully


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

8710cf2 11 Oct 2025 avatar joomdonation CS
1c25076 11 Oct 2025 avatar richard67 CS
avatar richard67
richard67 - comment - 11 Oct 2025

@softforge Could you test again with the latest changes (just in case if you are not already on it)?

avatar richard67 richard67 - change - 11 Oct 2025
The description was changed
avatar richard67 richard67 - edited - 11 Oct 2025
avatar richard67 richard67 - test_item - 11 Oct 2025 - Tested successfully
avatar richard67
richard67 - comment - 11 Oct 2025

I have tested this item ✅ successfully on 1146667

I've tested so many scenarios that it would be too long to describe, on a new installation as well as on a site updated from 5.4-dev to the custom update URL for this PR, with some versions created before the update.

When restoring an old version (is_legacy=1) from before the update to 6, the behaviour is the same as it is on 5.x, i.e. tags are not restored and lost, and changes on fields are not restored. That is like without this PR and like on 5.x.

When restoring versions created after the update or on the new installation, everything works like without this PR, i.e. issues #46211 and #46213 are still fixed.

Installation of blog sample data works, i.e. issue #46262 is fixed.

Multilanguage sample data and testing sample data work, too.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46268.
avatar joomdonation joomdonation - change - 12 Oct 2025
Labels Added: Release Blocker bug
avatar richard67
richard67 - comment - 12 Oct 2025

@joomdonation Could you change the testing instructions? Currently they still refer to the draft status.

avatar joomdonation joomdonation - change - 12 Oct 2025
The description was changed
avatar joomdonation joomdonation - edited - 12 Oct 2025
avatar joomdonation
joomdonation - comment - 12 Oct 2025

@richard67 Updated. Hopefully it is clear enough.

avatar richard67 richard67 - test_item - 12 Oct 2025 - Tested successfully
avatar richard67
richard67 - comment - 12 Oct 2025

I have tested this item ✅ successfully on 1cb445c

I've tested on a new installation as well as on a site updated from 5.4-dev to the custom update URL for this PR, with some versions created before the update.

When restoring an old version (is_legacy=1) from before the update to 6, the behaviour is the same as it is on 5.x, i.e. tags are not restored and lost in the edit form, and changes on fields are not restored in the edit form. That is like without this PR and like on 5.x.

When restoring versions created after the update or on the new installation, everything works like without this PR, i.e. issues #46211 and #46213 are still fixed, and tag and fields information is properly restored from these versions.

Installation of blog sample data works, i.e. issue #46262 is fixed.

Multilanguage sample data and testing sample data work, too.

Finally, this PR fixes an issue with repeatable subform fields in the history version comparison. Without this PR you get an error about array to string conversion.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46268.
avatar richard67
richard67 - comment - 12 Oct 2025

Will retest later.

avatar joomla-cms-bot joomla-cms-bot - change - 12 Oct 2025
Category SQL Administration com_admin Postgresql com_content com_contenthistory Libraries Installation SQL Administration com_admin Postgresql com_categories com_content com_contenthistory Installation Libraries
avatar richard67
richard67 - comment - 12 Oct 2025

@joomdonation It needs to remove the obsolete use Joomla\CMS\Versioning\VersionableTableInterface;statement from file libraries/src/Table/Category.php to make the cs checker happy.

Update: Fixed with commit bc7e7ad .

avatar joomla-cms-bot joomla-cms-bot - change - 12 Oct 2025
Category SQL Administration com_admin Postgresql com_content com_contenthistory Libraries Installation com_categories SQL Administration com_admin Postgresql com_categories com_content com_contenthistory com_tags Installation Libraries
avatar joomla-cms-bot joomla-cms-bot - change - 12 Oct 2025
Category SQL Administration com_admin Postgresql com_content com_contenthistory Libraries Installation com_categories com_tags SQL Administration com_admin Postgresql com_banners com_categories com_contact com_content com_contenthistory com_tags Installation Libraries
avatar Bodge-IT Bodge-IT - test_item - 12 Oct 2025 - Tested successfully
avatar Bodge-IT
Bodge-IT - comment - 12 Oct 2025

I have tested this item ✅ successfully on 7d101ca

Some known behaviour quirks. These have been documented for future attention.

Tested articles, tags, custom fields inc. subforms.

Tested Contacts, Banners, Clients, Tags

Tested categories across all types where exists.


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

avatar richard67 richard67 - test_item - 12 Oct 2025 - Tested successfully
avatar richard67
richard67 - comment - 12 Oct 2025

I have tested this item ✅ successfully on 7d101ca

Same tests as described in my previous results + some more things with subforms.


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

avatar richard67 richard67 - change - 12 Oct 2025
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 12 Oct 2025

RTC


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

avatar softforge softforge - change - 12 Oct 2025
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2025-10-12 17:16:15
Closed_By softforge
Labels Added: RTC
avatar softforge softforge - close - 12 Oct 2025
avatar softforge softforge - merge - 12 Oct 2025
avatar heelc29
heelc29 - comment - 12 Oct 2025

I see two other bugs (out of scope of this PR):

@Bodge-IT @softforge Should I create a new issue for that? - because this PR is now merged

avatar softforge
softforge - comment - 12 Oct 2025

Thank you @joomdonation and all those involved in this epic work

avatar Bodge-IT
Bodge-IT - comment - 12 Oct 2025

I see two other bugs (out of scope of this PR):

* component parameter `save_history` is no longer take in account
  https://github.com/joomla/joomla-cms/blob/ef7b7e0a0b28db5fac3de60eedfbbc465f92ac0e/plugins/behaviour/versionable/src/Extension/Versionable.php#L128-L130

* if the item is deleted, the history item is not deleted

@Bodge-IT @softforge Should I create a new issue for that? - because this PR is now merged

Yes please Christian, lets review from there.

avatar softforge
softforge - comment - 12 Oct 2025

I see two other bugs (out of scope of this PR):

@Bodge-IT @softforge Should I create a new issue for that? - because this PR is now merged

Yes please

avatar richard67
richard67 - comment - 12 Oct 2025

Is that issue a release blocker, too?

avatar heelc29
heelc29 - comment - 12 Oct 2025

New Issue created #46274

Add a Comment

Login with GitHub to post a comment