? ? Maintainers Checked Pending

User tests: Successful: Unsuccessful:

avatar Kostelano
Kostelano
11 Nov 2022

Pull Request for Issue #39115.

Summary of Changes

The PR removes an unnecessary tag, see details #39115.

Testing Instructions

Install the build with PR, go to email templates, make sure templates com_users.registration.user.registration_mail and com_users.registration.user.registration_mail_w_pw don't have tag {ACTIVATE}.

The PR is also making changes to existing sites to get rid of the tag there as well. Regular update.

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

avatar Kostelano Kostelano - open - 11 Nov 2022
avatar Kostelano Kostelano - change - 11 Nov 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 11 Nov 2022
Category SQL Administration com_admin Postgresql Installation
avatar brianteeman
brianteeman - comment - 11 Nov 2022

l that update script overwrite any existing customisations?

avatar Kostelano
Kostelano - comment - 11 Nov 2022

Sorry, I didn't understand the question. If we are talking about templates, then by default the tag is not included in the text. It is difficult to imagine a situation in which one of the users still added a tag to the text, which in the end does not show anything.

avatar Kostelano Kostelano - change - 11 Nov 2022
Labels Added: ?
avatar brianteeman
brianteeman - comment - 11 Nov 2022

If a user has customised that mail template then applying your update will overwrite their changes. You can either not have an update query OR you will need to write a query that only alters the params.

avatar Kostelano
Kostelano - comment - 11 Nov 2022

How can it be? We are talking about a fresh installation of Joomla 4.2 and an upgrade from 3x.

avatar brianteeman
brianteeman - comment - 11 Nov 2022

@richard67 am I wrong? Wouldn't this change be applied on a normal 4.x update as well?

avatar richard67
richard67 - comment - 11 Nov 2022

@richard67 am I wrong? Wouldn't this change be applied on a normal 4.x update as well?

You are wrong.

When updating a 4.0.0, the database schema version is "4.0.0-2021-08-17" because that's the name of the youngest schema update for 4.0.0 at that time, and now we update to a 4.x.y and have a script 4.0.0-2020-12-20.sql. The schema version "4.0.0-2020-12-20" in that script's name is lower than "4.0.0-2021-08-17" when comparing with version_compare, and so it will not run.

It will only run when we update a version (old alpha or beta or maybe also RC) where the script 4.0.0-2020-12-20.sql was not there yet.

You would be right if this PR would have added a new 4.0.0 update SQL with a newer date. This then would run when we would update a 4.0.0.

But this is not the case, and this is a perfect example why it sometimes makes sense to update the old update SQL scripts which you claim to be immutable because (as your question here shows, too), never really understood how the database updates work.

I am almost sure that for the one or the other of your recent PRs where you said you won't make update SQL scripts it would have been possible to do the same, change the old update SQL so at least updating from 3.10 will result in the right params.

But you never accepted any of my explanations why we can and sometimes should change old update SQL scripts.

And so I gave it up to check your PRs for that and argue with you.

avatar richard67
richard67 - comment - 11 Nov 2022

How can it be? We are talking about a fresh installation of Joomla 4.2 and an upgrade from 3x.

@Kostelano You are right. Brian just doesn't understand how it works.

avatar brianteeman
brianteeman - comment - 11 Nov 2022

I might not know how it works according to you but surely this PR will only fix the bug for new installs and new upgrades from joomla 3. All other sites will still have the extra param.

this is not the first time that we have had an almost identical issue with the params for the updates see #37504 which @richard67 approved and was a pr created because of an issue also reported by @Kostelano

It needs an update sql like this


UPDATE `#__mail_templates`
	 SET `params` = '{"tags":["name","sitename","siteurl","username","password_clear"]}'
 WHERE `template_id` = 'com_users.registration.user.registration_mail_w_pw' AND `params` = '{"tags":["name","sitename","activate","siteurl","username","password_clear"]}';
 
UPDATE `#__mail_templates`
	 SET `params` = '{"tags":["name","sitename","siteurl","username","password_clear"]}'
 WHERE `template_id` = 'com_users.registration.user.registration_mail' AND `params` = '{"tags":["name","sitename","activate","siteurl","username","password_clear"]}';


avatar Kostelano
Kostelano - comment - 11 Nov 2022

Ok, I'll add tomorrow.

avatar Kostelano
Kostelano - comment - 11 Nov 2022

Got it today, added. Should be OK.

avatar Kostelano
Kostelano - comment - 12 Nov 2022

Now I have rechecked and everything works - both for a new installation and for a live site. Description corrected.

avatar Kostelano Kostelano - change - 12 Nov 2022
The description was changed
avatar Kostelano Kostelano - edited - 12 Nov 2022
avatar Quy Quy - test_item - 20 Dec 2022 - Tested successfully
avatar Quy
Quy - comment - 20 Dec 2022

I have tested this item successfully on dc1f750


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

avatar richard67
richard67 - comment - 25 Dec 2022

@Kostelano Was there the need for updating the branch, i.e. conflicts, or broken drone? You know, when you update the branch, it resets the counter for human tests, so if nobody restores that test in the issue tracker, we will not find a PR which has 2 tests when we search for that in the issue tracker. That means additional work for us, so we should avoid unnecessary branch updates. Now I will go and restore Quy's test.

avatar richard67 richard67 - alter_testresult - 25 Dec 2022 - Quy: Tested successfully
avatar Kostelano
Kostelano - comment - 25 Dec 2022

@richard67 I didn't know that, sorry. Let then hangs PR so.

avatar richard67
richard67 - comment - 25 Dec 2022

@Kostelano Well, it still might need branch updates when there are conflicts or when you want to restart drone or appveyor and can't do that directly in their UI. Let me know when you have a PR which needs tests to be restored because commits after tests were just clean branch updates or small changes in code comments or so, or when you find such PRs. Thanks for your contributions by the way.

avatar richard67 richard67 - test_item - 25 Dec 2022 - Tested successfully
avatar richard67
richard67 - comment - 25 Dec 2022

I have tested this item successfully on cf42737

I've tested installations as well as updates. For the latter, I've used the custom URL created by drone for this PR for the live update with the update component to update from current 4.2-dev to this PR.

I've tested with both MySQL and PostgreSQL, so it was 4 tests in total, and all SQL changes made by this PR were covered by these tests.


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

avatar richard67 richard67 - change - 25 Dec 2022
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 25 Dec 2022

RTC


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

avatar roland-d
roland-d - comment - 29 Dec 2022

Hello @Kostelano I would like to get this into 4.2.7 but the filename of the SQL file should be updated as it is now 4.2.6-2022-11-11.sql. Can you please update these filenames so I can merge this?

avatar Kostelano Kostelano - change - 29 Dec 2022
Labels Added: ? Maintainers Checked
avatar Kostelano
Kostelano - comment - 29 Dec 2022

@roland-d, done.

avatar roland-d
roland-d - comment - 29 Dec 2022

@Kostelano Thank you, now we wait for Drone :)

avatar roland-d roland-d - change - 29 Dec 2022
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-12-29 19:52:39
Closed_By roland-d
avatar roland-d roland-d - close - 29 Dec 2022
avatar roland-d roland-d - merge - 29 Dec 2022
avatar roland-d
roland-d - comment - 29 Dec 2022

Thank you

Add a Comment

Login with GitHub to post a comment