User tests: Successful: Unsuccessful:
Status | New | ⇒ | Pending |
Category | ⇒ | JavaScript |
Almost resolves the issue. The language is correctly created but the association isnt saved
Once more, @brianteeman
The association should ONLY be created when the Target is saved.
This patch is fine.
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
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.
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
@Fedik @infograf768 AJAX to the rescue?
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.
I have tested this item
I have tested this item
Patch ok for me
Status | Pending | ⇒ | Ready to Commit |
RTC. Thanks @Fedik
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:
?
|
@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!