[5.3] Restored Article Version Now Properly Checked Out to Current User#45597
[5.3] Restored Article Version Now Properly Checked Out to Current User#45597rdeutz merged 13 commits intojoomla:5.3-devfrom
Conversation
Co-authored-by: Brian Teeman <brian@teeman.net>
|
@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. |
|
I have tested this item ✅ successfully on 2463e9f
Tested with JBT, before applying this PR:
After applying the PR with graft Joomla_5.3.3-dev+pr.45597-Development-Full_Package.zip
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. |
|
I have tested this item ✅ successfully on 2463e9f (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. |
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45597. |
|
@rdeutz what updates are needed? |
@brianteeman That's a naughty behaviour of the issue tracker when not being up to date with the labels. It adds them back as soon as something else changes via the issue tracker. I will remove the label and trigger a branch update. The latter will update the labels in the issue tracker so that will not happen again with this PR. |
|
@brianteeman because you are in a model context "Factory::getApplication()->getIdentity()" can be replaced with "$this->getCurrentUser()" |
use $this->getCurrentUser() to get a user in model context
|
@rdeutz Now after your last change it needs to remove the obsolete |
removed no longer needed use statement
|
Thanks @richard67 I have removed it. |
|
I have tested this item ✅ successfully on 1847c70 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45597. |
|
Thanks |
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
Save & Closebutton 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 MenuorSave as Copybutton.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