-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[5.4] Fix saving content history on PostgreSQL #46243
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
[5.4] Fix saving content history on PostgreSQL #46243
Conversation
I have tested this item ✅ successfully on 5439f5b This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46243. |
@brianteeman You have PostgreSQL? I didn't know that. |
yes - ofc - currently only 14.5 - need to update |
I have tested this item ✅ successfully on 5439f5b This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46243. |
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46243. |
✅ Final test before merging with JBT using pgsql
|
Thank you @richard67 for your contribution. Thank you @brianteeman and @alikon for testing. |
Pull Request for Issue # .
Summary of Changes
This pull request (PR) removes the wrong unique constraint for the "core_type_alias" and "core_content_item_id" column combination from the "#__ucm_content" table for PostgreSQL databases.
For MySQL we do not have that constraint, see https://github.com/joomla/joomla-cms/blob/5.3-dev/installation/sql/mysql/supports.sql#L305-L350 .
It is an old bug we have at least since Joomla 3.2.7. That was the oldest package I had here to check where the constraint exists for PostgreSQL but not for MySQL.
Because 5.3-dev is close to end of life, I make this PR for 5.4-dev.
As it's not a release blocker it comes too late for 5.4.0, but will then hopefully go into 5.4.1.
See also PR #46269 for 6.0-dev for the same bug.
Testing Instructions
Important: It needs a PostgreSQL database to reproduce the issue and test the fix.
Have content history enabled and some articles which have multiple tags assigned.
You can achieve this my making a new installation and then installing blog sample data.
Then edit an article which has some tags assigned, e.g. in case of blog sample data the "Your Template" or any other in the "Blog" category.
Change the content of the article and remove some assigned tag and then use the "Save" button.
Check the edit page after it has reloaded.
Actual result BEFORE applying this Pull Request
With a MySQL or MariaDB database, all works. The content changes are shown, and the previously unassigned tag is not shown anymore.
With a PostgreSQL database, the reloaded page shows the previously unassigned tag again. Content changes are shown.
In the error log of the PostgreSQL server you will find:
Expected result AFTER applying this Pull Request
With a PostgreSQL database it works as well as with MySQL or MariaDB, the content changes are shown, and the previously unassigned tag is not shown anymore.
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