User tests: Successful: Unsuccessful:
Pull Request resolves #47693.
Currently, if version history is enabled for a component, every view extends FormView class from that component will have Versions button shown, even if that view does not really support versions history. This PR just fixes that wrong behavior. The button will only be shown if:
Basically, make sure versions history still work with this PR applied. Then we will wait for @Ruud68 test confirms that it works well for his custom extension
Versions button is always shown for every views extends FormView class even if that view does not support versions history
Versions button is only shown for views extends FormView class if that view support versions history
Please select:
Documentation link for guide.joomla.org:
No documentation changes for guide.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
| Status | New | ⇒ | Pending |
| Category | ⇒ | Libraries |
| Labels |
Added:
PR-6.1-dev
|
||
I have tested this item ✅ successfully on 609eba2
I have successfully tested this! Thanks @joomdonation!
Hi @joomdonation thanks for picking this up and creating the PR for it.
Just tested it and it works, would suggest one small change:
you have created a method responsible for checking if a view can / should have versionhistory enabled.
This actual check is now currently 'split'. My suggestion would be to add $this->state->get('params')->get('save_history', 0) check also in the protected function supportVersionHistory() as that would make it more 'clean' IMO.
I have tested this item ✅ successfully on 609eba2
I have successfully tested this! Thanks @joomdonation!
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47694.