User tests: Successful: Unsuccessful:
Pull Request resolves #47609
The bug happens because the system sends data to the UCM table without the existing ID, creating a duplicate row on every save.
I fixed it inside the CoreContent table class by adding a check to automatically catch the missing ID before saving. This forces an UPDATE instead of a new INSERT.
#__ucm_content table in your database. You will see 1 row.You get a new duplicate row in the #__ucm_content table every time you click Save.
The existing row is updated correctly, and no duplicate rows are created.
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:
Updates Requested
bug
PR-5.4-dev
|
||
| Labels |
Removed:
Updates Requested
|
||
A tag is not adding to an existing article. After saving the article, the tag disappears.
Opened an existing article.
Added a tag.
Saved the article.
The tag has disappeared.
With the previous version of the CoreContent.php file, the tag is added to the existing article.
With the previous version of the CoreContent.php file, the tag is added to the existing article.
I just tested this locally to be 100% sure. When I create a new article, add tags, and save multiple times, it works perfectly. No duplicate rows are created, and the tags display correctly without disappearing.
@sertlan , the issue you are seeing is because your database already has old duplicate rows from before applying this PR. Because your article already has multiple IDs in the UCM table, the tag saves to one ID, but Joomla tries to read from another. That's why it looks like the tag "disappeared."
@Reda-Muhamed A tag is not adding to an existing and new article if it has already been saved once. After saving the article again, the tag disappears.
Created a new article after applying this PR, added tags, and saved it.
Added another tag.
Saved the article.
The added tag has disappeared.
Also, the tags cannot be deleted after saving the article again.
@brianteeman Not exactly the same. This problem only occurs with the new CoreContent.php file. This problem does not occur with the old CoreContent.php file.
Please fix it.
@Reda-Muhamed Created a new article after applying this PR, added tags, and saved it. Added another tag. Saved the article. The added tag has disappeared.
I have tried to delete the old articles with the all tags and i saw this problem, but do not worry, I will try to solve this issue.
This could be even worse as we don't see at the moment where wrong associations between articles and tags are stored. We must proceed very carfully.
@brianteeman Not exactly the same. This problem only occurs with the new CoreContent.php file. This problem does not occur with the old CoreContent.php file.
Please fix it.
This could be even worse as we don't see at the moment where wrong associations between articles and tags are stored. We must proceed very carfully.
To clarify my previous comment: the issue I experienced only happened because i manually deleted rows directly from my local database using raw SQL while trying clean up my old data, but for me i do not see this issue again after set up a completely fresh Joomla installation
Another problem with the new CoreContent.php file:
After changing "Title", "Alias", "Article Text", "Meta Description", "Keywords" fields in the article, the values of core_title, core_alias, core_body, core_metakey, core_metadesc, core_modified_time in the ucm_content table do not change.
i do not see this issue again after set up a completely fresh Joomla installation
@Reda-Muhamed Fresh Joomla installation is not a solution to this problem, and it is unfair for old and loyal Joomla users. I have Joomla websites since 2013-2017, one of them contains 12,000+ articles and 300+ tags.
@Reda-Muhamed Fresh Joomla installation is not a solution to this problem, and it is unfair for old and loyal Joomla users. I have Joomla websites since 2013-2017, one of them contains 12,000+ articles and 300+ tags.
I see, can you please check it again.
It should work as expected and I tested it.
@Reda-Muhamed Tested it. With the new CoreContent.php file these problems (1, 2) still exist.
@richard67 @Reda-Muhamed This fix with changes in the CoreContent.php file led to more severe issues.
Issue 1
A tag is not adding to an existing and new article if it has already been saved once.
After saving the article again, the added tag is missing.
Also, tags cannot be deleted when saving an article again, if the article has been saved once.
Issue 2
The values in the ucm_content table are not updated after changing an article.
After changing "Title", "Alias", "Article Text", "Meta Description", "Keywords" fields in the article, the values of core_title, core_alias, core_body, core_metakey, core_metadesc, core_modified_time in the ucm_content table do not change.
Please solve these issues.
Fresh Joomla installation is not a solution to this problem, and it is unfair for old and loyal Joomla users. I have Joomla websites since 2013-2017, one of them contains 12,000+ articles and 300+ tags.
@Reda-Muhamed wants to solve your problem.
He suggested that you install a fresh Joomla just for test.
If you cannot do that, please be patient. We are working on it.
| Status | Pending | ⇒ | Closed |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2026-04-23 12:42:49 |
| Closed_By | ⇒ | Reda-Muhamed |
Tested and works as described. Please update as @richard67 said.