? Pending

User tests: Successful: Unsuccessful:

avatar richard67
richard67
3 Oct 2019

Pull Request for Issue # .

Summary of Changes

This Pull Request (PR) fixes the list display of mail templates so that nu duplicate items are shown anymore after having changed some settings (e.g. use custom subject) for a particular language.

It also makes filtering by language and saving the changed settings work again after it has stopped working since some previous PR.

Testing Instructions

  1. Apply the patch pf this PR on a clean 4.0-dev branch and make a new installation.
  2. In backend, go to mail templates navigating as shown in following screenshot with the red marks:

Snap 1

Result: The mail templates list shows 1 template for extension com_config.test_mail, which shows the language of the installation as only language.

mail-templates-1

  1. Install some languages, publish their content languages and go to the mail templates list again.

Result: The mail template shows now flags for all published content languages.

mail-templates-2

  1. Open the filter options and check that there are filters by language and extensions.

Result:

mail-templates-3

  1. Filter by some language.

Result: No item found. Reason: There has not been made any adjustment to a mail template for a language.

mail-templates-4

  1. Reset the filter so that the item is shown again.

  2. Click on a language flag to edit the mail template for that particular language and make some change in the edit view, e.g. enable custom subject.

mail-templates-5

  1. Save and close.

  2. Filter again by language and select the language for which you have edited the mail template parameters just before.

Result: The item is shown.

mail-templates-6

Expected result

See testing instructions above.

Actual result

After having edited and saved the mail template for one language, the list shows two (in case if no language installed) or maybe more (in case if some languages installed) records shown with ID "com_config.test_mail".

Unbenannt-4

Changing mail subject and content for a particular language doesn't work, i.e. changes are not there when editing again.

Additional information

When using the language filter for "All languages", there will never be an item found because there is no item with language='*' in database, and such will never be created. This could be fixed by either removing this option from the language filter (but this would not be consistent with all other language filters anywhere else) or by showing the master item as usual, i.e. without language filter applied.

But this should be done with another PR if necessary/desired.

Documentation Changes Required

None.

avatar richard67 richard67 - open - 3 Oct 2019
avatar richard67 richard67 - change - 3 Oct 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 3 Oct 2019
Category Administration
avatar richard67
richard67 - comment - 3 Oct 2019

@alikon @brianteeman @Hackwar Please review or test or both.
@alikon I haven't tested yet on PostgreSQL, maybe you are faster than me? ;-) Done.

avatar richard67 richard67 - change - 3 Oct 2019
Labels Added: ?
avatar richard67 richard67 - change - 3 Oct 2019
The description was changed
avatar richard67 richard67 - edited - 3 Oct 2019
avatar richard67
richard67 - comment - 3 Oct 2019

Works on PostgreSQL, too ?

avatar richard67 richard67 - change - 3 Oct 2019
The description was changed
avatar richard67 richard67 - edited - 3 Oct 2019
avatar richard67 richard67 - change - 3 Oct 2019
The description was changed
avatar richard67 richard67 - edited - 3 Oct 2019
avatar richard67 richard67 - change - 3 Oct 2019
The description was changed
avatar richard67 richard67 - edited - 3 Oct 2019
avatar richard67 richard67 - change - 3 Oct 2019
The description was changed
avatar richard67 richard67 - edited - 3 Oct 2019
avatar richard67 richard67 - change - 3 Oct 2019
The description was changed
avatar richard67 richard67 - edited - 3 Oct 2019
avatar richard67 richard67 - change - 3 Oct 2019
The description was changed
avatar richard67 richard67 - edited - 3 Oct 2019
avatar richard67
richard67 - comment - 3 Oct 2019

Nice feature btw. these mail templates if you once have understood how they work. Is there already some documentation on it? If not, maybe it could be a task for the PBF to write some? Testing instructions here could be used as a base.

avatar richard67 richard67 - change - 3 Oct 2019
The description was changed
avatar richard67 richard67 - edited - 3 Oct 2019
avatar blueforce blueforce - test_item - 4 Oct 2019 - Tested successfully
avatar blueforce
blueforce - comment - 4 Oct 2019

I have tested this item successfully on dd13ed1

test with MySQL 5.7.2 and PHP 7.3.8 successful
Filter works as expeted!
Bildschirmfoto 2019-10-04 um 10 25 31

avatar brianteeman
brianteeman - comment - 5 Oct 2019

Sorry but this language filter makes no sense to me at all.

If I see this
image

And then filter on EN and see this
image

it makes no sense to me as a user why there is no english records displayed

When I look in the database then I can see the reason (and it almost makes sense technically) but then the UI needs to be different.

In addition I would expect from the ui that even if I understood why there was no EN record (yet) then there would at least be an ALL record

image

In fact is it ever possible to have an ALL record?

Or does it mean that ALL will display all the records that exist that have a specified language ie EN and FR and ES

If it is the latter then that's not correct as it is completely different to the rest of Joomla where ALL in a language filter means a record that is for all languages.

Either way it is wrong here

(PS sorting doesnt work at all)

avatar brianteeman
brianteeman - comment - 5 Oct 2019

Install some languages, publish their content languages and go to the mail templates list again.
Result: The mail template shows now flags for all published content languages.

It does not take into account if the content language is published only that there is a content language
image
image

avatar wilsonge
wilsonge - comment - 6 Oct 2019

@brianteeman - you're right the contents of that dropdown do need editing - you can't have an all (i mean the master kinda acts like an all if the language override hasn't been saved for a specific language - so arguably that should show up). However I think it's a separate issue for this PR - which is mainly solving the duplicate items issue whilst keeping the postgres part working. If we could create a separate issue for that would be amazing :)

avatar wilsonge wilsonge - change - 6 Oct 2019
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2019-10-06 10:45:27
Closed_By wilsonge
avatar wilsonge wilsonge - close - 6 Oct 2019
avatar wilsonge wilsonge - merge - 6 Oct 2019
avatar wilsonge
wilsonge - comment - 6 Oct 2019

Thanks!

Add a Comment

Login with GitHub to post a comment