Skip to content

Comments

[5.1] Fix duplicate Brotli .htaccess postinstall message after update from 4.4#43182

Merged
LadySolveig merged 8 commits intojoomla:5.1-devfrom
richard67:5.1-dev-fix-duplicate-postinstall-message
Apr 1, 2024
Merged

[5.1] Fix duplicate Brotli .htaccess postinstall message after update from 4.4#43182
LadySolveig merged 8 commits intojoomla:5.1-devfrom
richard67:5.1-dev-fix-duplicate-postinstall-message

Conversation

@richard67
Copy link
Member

@richard67 richard67 commented Mar 30, 2024

Pull Request for Issue # .

Summary of Changes

This pull request (PR) fixes the duplicate postinstall message for the Brotli .htaccess message which you get after updating from 4.4.3 or the latest 4.4 nightly build to the latest 5.1-dev nightly build.

INSERT IGNORE (MySQL and MariaDB) or ON CONFLICT DO NOTHING (PostgreSQL) don't help here as we do not use the postinstall_message_id column in the inserts, and so no primary key or unique key would be violated when inserting multiple times.

This PR fixes that by adding a condition for that to the SELECT part of the INSERT INTO .. SELECT statement.

For the reason mentioned above, it also removes the IGNORE from the MySQL and the ON CONFLICT DO NOTHING from the PostgreSQL script.

The duplicate happens when updating from 4.4.3 or any older 4.4.x because the 5.1.0 nightly package includes the 4.4.4-2024-03-28.sql update SQL script from the latest upmerge, so that one and the one modified by this PR are run both.

Depending on if we require to be on 4.4.4 for updating to 5.1 or if we allow updating to 5.1 also for older 4.4.x versions, we should remove the 4.4.4-2024-03-28.sql update SQL script from the 5.1-dev branch and delete it on update, or we should not do that and keep it.

Currently the target platform values of the 5.1.0 Beta targets in https://update.joomla.org/cms/targets.json only require to be on 4.4.x, they do not require 4.4.4. If we would require that, we would have to update the targetplatform of the 5.x versions with every new 4.4. version, and in future do the same with 6.x for every new 5.y.

So maybe we should not require the latest version and keep the 4.4.4-2024-03-28.sql script in 5.x-dev branches.

I will clarify that with other maintainer and release managers.

@brianteeman Seems you were right with your worries.

Testing Instructions

Update from 4.4.3 or any older 4.4.x to the latest 5.1 nightly build for the actual result (you have to use "Upload & Update"), and update from 4.4.3 or any older 4.4.x to the patched update package or custom update URL created by Drone for this PR for the expected result.

The latest 5.1 nightly build can be downloaded from here: https://developer.joomla.org/nightlies/Joomla_5.1.0-beta3-dev-Development-Update_Package.zip

The patched update package or custom update URL created by Drone for this PR can be found here: https://artifacts.joomla.org/drone/joomla/joomla-cms/5.1-dev/43182/downloads/75140/

Actual result BEFORE applying this Pull Request

2024-03-30_j5 1-duplicate-postinstall-msg

Expected result AFTER applying this Pull Request

Only one message.

Link to documentations

Please select:

  • No documentation changes for docs.joomla.org needed

  • No documentation changes for manual.joomla.org needed

@richard67 richard67 added the bug label Mar 30, 2024
@richard67 richard67 changed the title [5.1] Fix duplicate Brotli .htaccess postinstall message after update from 4.4.3 [5.1] Fix duplicate Brotli .htaccess postinstall message after update from 4.4 Mar 30, 2024
@conseilgouz
Copy link
Contributor

I have tested this item ✅ successfully on 5cc1632

From J4.4.3, PHP 8.3.4

Work as expected


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43182.

@Razzo1987
Copy link
Contributor

I have tested this item ✅ successfully on 5cc1632


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43182.

@richard67
Copy link
Member Author

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43182.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Mar 31, 2024
@exlemor
Copy link

exlemor commented Mar 31, 2024

I have tested this item ✅ successfully on 5cc1632

I tested this successfully.

I confirmed the BEFORE (2 notices) and AFTER (1 notice) situations.

CentOS v7.9.2009 STANDARD kvm,
cPanel v110.0.24
PHP v8.2.17, MySQL v8.0.36, Joomla v4.4.3 to ‎v5.1.0-beta3-dev+pr.43182


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43182.

LadySolveig and others added 3 commits April 1, 2024 18:45
@LadySolveig LadySolveig merged commit 38b6c68 into joomla:5.1-dev Apr 1, 2024
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Apr 1, 2024
@LadySolveig
Copy link
Contributor

Thank you @richard67 and also for testing @conseilgouz @Razzo1987 @exlemor

@richard67 richard67 deleted the 5.1-dev-fix-duplicate-postinstall-message branch April 1, 2024 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants