? Pending

User tests: Successful: Unsuccessful:

avatar Fedik
Fedik
25 Mar 2017

Pull Request for Issue #14562

Summary of Changes

The patch sets the target language before doing the copy

Testing Instructions

Please use info from #14562 for testing

@infograf768 @brianteeman

avatar Fedik Fedik - open - 25 Mar 2017
avatar Fedik Fedik - change - 25 Mar 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 25 Mar 2017
Category JavaScript
avatar infograf768
infograf768 - comment - 25 Mar 2017

@Fedik
This works like a charm. 😃

Obviously if someone changes mind, does not Save the target, changes Target language or Clear the possible association, then the not-associated formerly created target is checked out.

Not sure we can do anything about that.
Test OK for me!

avatar brianteeman
brianteeman - comment - 25 Mar 2017

Almost resolves the issue. The language is correctly created but the association isnt saved


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

avatar infograf768
infograf768 - comment - 25 Mar 2017

Once more, @brianteeman
The association should ONLY be created when the Target is saved.
This patch is fine.

avatar brianteeman
brianteeman - comment - 25 Mar 2017

You can keep saying that but if the UI tells me it is saved then as a user I have to assume that it has been saved. As a user how am i supposed to mean that saved doesnt mean that everything has been saved. Remember this use case and remember that what @fedik has done so far in this PR is something that you said was impossible. So i am sure it can be resolved.
https://cloud.githubusercontent.com/assets/1296369/24160470/d82c98e4-0e59-11e7-8163-3f937b41f3b4.gif

avatar infograf768
infograf768 - comment - 25 Mar 2017

remember that what @fedik has done so far in this PR is something that you said was impossible.

Read my lips: I said I did not know how to do it. Quite different.

And I do insist that the association should NOT be created until the new item "as a Target" is saved by "Save Target".
The UI tells you it is saved because a new item has been created by Copy, which is not the case when you fill a blank form.

avatar Fedik
Fedik - comment - 25 Mar 2017

The language is correctly created but the association isnt saved

for me it is also confusing a bit ,
but I also have no idea how to solve it 😄

avatar dgt41
dgt41 - comment - 25 Mar 2017

@Fedik @infograf768 AJAX to the rescue?

avatar Fedik
Fedik - comment - 25 Mar 2017

@dgt41 that's a nice joke 😄 after all these iframes 😉

It seems not critical, and we can think about it later (how to improve the association editing)

avatar dgt41
dgt41 - comment - 25 Mar 2017

@Fedik If I was about to implement associations I would have done it way easier, this needs a PHD to even understand WTF is going on there...

avatar infograf768
infograf768 - comment - 26 Mar 2017

Folks, I think you may not be used to the workflow on a multilingual site.
I am going to try to explain why the item obtained by save2copy should not be associated until modified and saved. I am not only speaking of the contents (for an article) or some display parameters.

First example: Menu items.

I have an original item tagged to en-GB, part of a Menu which is displayed by a menu module tagged to en-GB. Let's call this menu MYMENU_EN. It will only display when the site is switched to en-GB.
Save2copy will create a new item (grace to this patch already tagged to the desired Target Language, let's say fr-FR), but it will also use the same Menu as the Reference.
Not only that: save2copy does not publish the new Target tagged to fr-FR (which is the normal behaviour for save2copy).
Also, the title and alias will be appended with a figure (2) and then (3) etc. if changing target language without saving the first created item for fr-FR. In that case (2) which has not been saved will also be checked out.
Conclusion: this "Associated" new menu item absolutely needs to be modified and saved again (in 99% cases).
Also, the menu item created will not display in a French menu as it is part of a menu (MYMENU_EN) which is only displayed by a Menu module tagged to en-GB (That 'could' be desired but very unlikely in most cases).

Conclusion: the association will work when using the switcher, once the item is published, but it only will create confusion.

Second example: Articles.
In that case, we have similar issues with published, title and alias (and content most of the time...), but also with the Category (except if the category of the Reference item is tagged to ALL languages.)
One will get after save2copy an unpublished "Associated" new article part of a category which is tagged to en-GB.

When displaying that category via for example the Details=>Category link of the display of the reference article in the English interface, using the switcher for French will display the new French tagged article (with its (2) appended title, and then when using the Category link of that article display, we will NOT switch to the English interface but just reload the same article.

A lot of confusion...

Conclusion: the Association should never be created automatically when using Copy Reference to Target but ONLY when saving the Target after the necessary modifications.

Pleaaase, as the PR works fine, mark it OK on issues.joomla.org and let's get it in.

Thanks for your attention.

avatar infograf768 infograf768 - test_item - 26 Mar 2017 - Tested successfully
avatar infograf768
infograf768 - comment - 26 Mar 2017

I have tested this item ✅ successfully on 007277c


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

avatar AlexRed AlexRed - test_item - 26 Mar 2017 - Tested successfully
avatar AlexRed
AlexRed - comment - 26 Mar 2017

I have tested this item ✅ successfully on 007277c

Patch ok for me


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

avatar infograf768 infograf768 - change - 26 Mar 2017
Status Pending Ready to Commit
avatar infograf768
infograf768 - comment - 26 Mar 2017

RTC. Thanks @Fedik 😃


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

avatar rdeutz rdeutz - change - 26 Mar 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-03-26 16:35:01
Closed_By rdeutz
Labels Added: ?
avatar rdeutz rdeutz - close - 26 Mar 2017
avatar rdeutz rdeutz - merge - 26 Mar 2017

Add a Comment

Login with GitHub to post a comment