-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[4.3] Do not track rows in #__ucm_content as assets #39165
Conversation
I have tested this item ✅ successfully on 0c3c734 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39165. |
Thank you @ReLater |
I have tested this item ✅ successfully on 0c3c734 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39165. |
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39165. |
I was about to report my test result this PR, too. Maybe It's worth to mention that before this PR , the So there is changed with how data is stored. However, I think this change is fine as it is. It makes more sense to store asset ID of the actual item for permission checking if needed than store asset ID of UCM record which is useless. It also helps reduce number of records store in #__assets table, so I would report my test as success, too. |
imho it's not good to execute |
Since we aren't doing any operations on that table which require the lft and rgt values to not have holes, I wouldn't really care about this here. In the future I'm planning a component to do maintenance and fix stuff like this. Hopefully for 4.4. |
Thank you Hannes @Hackwar ! |
I do agree that tracking UCM content does not makes any sense, but this change resulting in unwanted behavior as ucm content is still added via tags for example: #43669 |
Pull Request for Issue #37153.
Summary of Changes
The UCM system currently spams the assets table with useless entries. Each row in the ucm_content table gets a corresponding row in the assets table which is a direct child of the root node and doesn't have any children itself. Their content always is empty, since the assets data is not copied over from the original content and also is never used anywhere. This PR stops the ucm_content table class from tracking these rows as assets and deletes the existing records in the assets table.
The delete query will not break the tree, since all these entries are leaf nodes, so it will not leave behind any orphaned children. The only inconsistencies by this are holes in the lft and rgt values, however the nested sets model is resilient against these holes and thus this shouldn't create an issue. To close these holes in these values, we would have to load the assets table class and call a
$table->rebuild()
on this, but since this is a time-consuming task and especially for large sites will most likely generate timeouts, I'm leaving this out here.Doing stuff like such a rebuild would be something for a maintenance component in the future.
Testing Instructions
#__ucm_content.42
and the rules column having the value{}
.#__ucm_content.69
entry in the assets table accompanying your articles asset entry.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