RTC bug PR-5.3-dev Pending

User tests: Successful: Unsuccessful:

avatar travisrisner
travisrisner
11 Jun 2025

Pull Request for Issue #45586 .

Summary of Changes

This pull request addresses an issue where restoring a previous article version in Joomla causes the article to be locked (checked_out) to the original author of that version, rather than the current user performing the restore.

Testing Instructions

  1. Create two admin accounts.
  2. Login as USER1, create and save an article, then make a few edits and save multiple times to create version history (on the last one make sure to not save & close, just go save & go back to the dashboard and logout)
  3. Log in as USER2 and open the same article.
  4. Restore the previous version that wasn't set to save & close.
  5. It should now show a Save & Close button for USER2 because the checked_out value is set to the USER2 id instead of retaining the USER1 value.

Actual result BEFORE applying this Pull Request

If a previous verison was restored that was had USER1's id stored as the checked_out value, it would only show a Save to Menu or Save as Copy button.

Expected result AFTER applying this Pull Request

Restored article is checked out the actual user restoring the article, so proper buttons show up.

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 travisrisner travisrisner - change - 11 Jun 2025
Status New Pending
avatar travisrisner travisrisner - open - 11 Jun 2025
avatar joomla-cms-bot joomla-cms-bot - change - 11 Jun 2025
Category Libraries
avatar travisrisner travisrisner - change - 11 Jun 2025
Labels Added: PR-5.3-dev
avatar muhme muhme - change - 25 Jul 2025
Labels Added: bug
avatar muhme
muhme - comment - 25 Jul 2025

@travisrisner Thank you for your contribution. As test preparation I updated the branch. The PR has deprecations, to be fixed. Could you please check failed PHPstan? It shows you which lines failed and gives hint for fixing.

avatar travisrisner travisrisner - change - 25 Jul 2025
Labels Added: Updates Requested
avatar muhme muhme - test_item - 25 Jul 2025 - Tested successfully
avatar muhme
muhme - comment - 25 Jul 2025

I have tested this item ✅ successfully on 2463e9f


Adopting Testing Instructions sligthly

  • Opening the article fails with error: 'Check-out failed with the following error: The user checking out does not match the user who checked out the item..'
    1. Log in as USER2 and open the same article, after unlocking the article in doing 'Check-in'.

Tested with JBT, before applying this PR:

  • Version restored from different user has only 'Save as Copy' menu

After applying the PR with graft Joomla_5.3.3-dev+pr.45597-Development-Full_Package.zip

  • Version restored from different user has also 'Save' and 'Save & Close' buttons, booth buttons are working and different old versions are restorable for the second user
  • Tested with third user with only Publisher rights, restoring 2nd version from frontend is working

Unfortunally found a new error, but this exists already before this PR, see #45782


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45597.
avatar exlemor exlemor - test_item - 25 Jul 2025 - Tested successfully
avatar exlemor
exlemor - comment - 25 Jul 2025

I have tested this item ✅ successfully on 2463e9f

Hi, I have successfully tested this! Thanks Travis for figuring out the logic!

(and thanks to @muhme because I had the same 'Check-out failed with the following error: The user checking out does not match the user who checked out the item..' message and thought, darn I did something wrong).


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

avatar richard67 richard67 - change - 25 Jul 2025
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 25 Jul 2025

RTC


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

avatar rdeutz rdeutz - change - 1 Aug 2025
Labels Added: RTC
Removed: Updates Requested

Add a Comment

Login with GitHub to post a comment