-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[6.0] Versions fixes take2 #46073
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[6.0] Versions fixes take2 #46073
Conversation
With the PR, the star is visible. Does it look OK? This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46073. |
it is not using parent::save so AdminModel Save is not used and there we have made the change for the new versioning
drop date that is the same and fix some bugs
Video of more tests. Shows more examples of the issues reported above chrome_U42HfAVZxc.mp4 |
#46073 (comment) #46073 (comment) |
tags see video.
chrome_EXBk6cY2hV.mp4 |
I can remove the undefined that's not a problem. Question of taste. Tags is a problem that I don't see how we solve that properly. I could try to find names for the id, but we are in a situation where the meaning/existens of a tag can change. |
How is that different to anything else eg category where the ID can stay the same and the Text/Name can change. We always show the Text/Name at the time of the comparison not at the time it was created - dont we? |
We do, but does it makes sense when we compare something that was created two years ago with category/tag id=2 what was at the time "blue underware" and now it is "yellow cap"? |
thats a valid comment and I would agree with you if that is what we did everywhere. But we dont. For categories and other things we show the current text and not the id number. I am just looking for consistency |
@brianteeman I am still more on the site "not worth" but I added the ability to lookup a field when it is an array like tags. To make it work it needs a change in the #__content_types table.
must be added to the content_history_options column. For convenience here is the value for article:
|
I have tested this item ✅ successfully on 7c18733 As discussed in the PR Testing Group while testing this PR, if you create a tag on the fly, there is no trace in the Preview under Versions until after the 2nd save. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46073. |
the image duplication is fixed now |
When I do a preview in Joomla 6 the intro and full text are at the very bottom See video chrome_THFbTdH8NT.mp4 |
Thank you @rdeutz for all the work you have done on this. There are still a few rough edges which the testers, especially @brianteeman, have highlighted and need to be addressed before it's bulletproof, but there is a lot that has improved, and it's so much closer to the finish line. Thank you to all the testers and also @bembelimen and especially @LadySolveig who have put a lot of time into helping solve issues and nudging it along. |
Follow up for #45515 to fix know issues and redo of #45955
Summary of Changes
Cleanup and fix know issues
Note to version star fix: This is related to the calculation of a sha1 hash. While creating the history entry a hash will be calculated and saved in the history table. When someone saves again then the hash is calculated based on the current data. If in the history table a saved hash is the same and the version note is also the same (with the curretly calculated) then the a new history entry will NOT be created. The 2nd use of the hash is for the list of versions (click on "Versions" Button in edit view). The matching version will be maked with a star to indicate the currently used version.
I myself got confused because I saved and thought the hash must be the same when saving two times in a row. But this is wrong thinking.
Testing Instructions
This is now ready to test for the main functionality. Play around with versions for articles. You should be able to set different values for custom fields, tags, categories. Going back and force for versions should you always bring back to the values that where valid for the selected version.
Update1: Testing of banner, categories, contact, newsfeed is also possible, it works at least for me. Tags can also be tested, these are using the old system.
Update2: Looked into the preview and I think it is good enough. We are showing structured data, but we don't know what fields neither how the value is sturctured.
Update3: Fixed the compare view. It is pretty much the same as for the preview, we don't know what data we are showing so how it is yet is all what can be done. Obviously there is room for some data description concept but this would be a lot of work and we would have to do it for all data. For the usecase we have here I think it is fine.
Update4: Documentation will be written when it is merged, it will be only for developers how to use it.
Actual result BEFORE applying this Pull Request
Only core fields of an article are in versioning
Expected result AFTER applying this Pull Request
All fields are versioned.
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