? ? Success

User tests: Successful: Unsuccessful:

avatar andrepereiradasilva
andrepereiradasilva
7 Oct 2016

Pull Request for New Issue (see also #12308).

Summary of Changes

In a multilingual install with associations, there are several issues with the item language and associations:

  1. You cannot add associations when creating an item. Currently you need to:

    • Create and save the item
    • Add the associations and save again
  2. You cannot change a content language when editing an item. Currently you need to:

    • Edit the item and remove the associations first and save the item
    • Edit the item again, change the content language and save again
    • Finnaly, Edit the item again, change the associations and save again
  3. You cannot add associations for unpublished content languages (but you have them across the backoffice)

Clearly, IMHO, this is not a very usable workflow and it comes with issues.

This PR should make that workflow a lot more easy, just add associations, and change the language whenever you need and save (one time).
Also allows to add associations for unpublished content languages.

Note: the only exception is the create/edit modals that will continue to not have Associations tab.

Testing Instructions

1, Do a code review (hint: use https://github.com/joomla/joomla-cms/pull/12344/files?w=1 to ignore whitespace changes)
2. Use latest 3.7.x, multilingual with associations enabled
3. Apply patch
4. For article, category, contact, menu item and newsfeed items check:

  • When creating an item (try changing the languages, adding associations)
  • When editing an item (try changing the languages, adding associations)

Documentation Changes Required

None.

Notes

Introduced two new methods: JLanguageHelper::getContentLanguages (get the content languages from #__languages) and JLanguageHelper::getInstalledLanguages (get the installed languages from #__extensions table).

Why this methods and not using JLanguageHelper::getLanguages()?

  • because JLanguageHelper::getLanguages() always return the published languages ... there are several cases we need the unpublisehd ones too ...
  • JLanguageHelper::getLanguages() does not check if the content languages are installed which, of course, can, and will, lead to errors if you, for instance, uninstall a language package without removing the content language.
  • because JLanguageHelper::getLanguages() is not IMHO totally semantic correct: get what languages? installed languages? content languages?
  • among more things

This two methods will allow to do all languages related stuff across the core in the future (replacing several hardcoded queries, etc). I intend to do that step by step is this accepted.

@infograf768 as talked

avatar andrepereiradasilva andrepereiradasilva - open - 7 Oct 2016
avatar andrepereiradasilva andrepereiradasilva - change - 7 Oct 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 7 Oct 2016
Category Administration Components Language & Strings Layout Libraries JavaScript
avatar joomla-cms-bot joomla-cms-bot - change - 7 Oct 2016
Labels Added: ? ?
avatar andrepereiradasilva andrepereiradasilva - change - 7 Oct 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - change - 7 Oct 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - change - 7 Oct 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - change - 7 Oct 2016
The description was changed
0a76e56 7 Oct 2016 avatar andrepereiradasilva cs
avatar andrepereiradasilva andrepereiradasilva - change - 7 Oct 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - change - 7 Oct 2016
The description was changed
avatar andrepereiradasilva
andrepereiradasilva - comment - 7 Oct 2016

don't really know why drone is failing, something to do with Highlight js ... doesn't seem related to this PR

avatar zero-24
zero-24 - comment - 7 Oct 2016

Nope it is not your fault see: #12345 (comment)

avatar andrepereiradasilva
andrepereiradasilva - comment - 7 Oct 2016

now that PR is merged can a mantainer restart travis/drone here?

avatar infograf768
infograf768 - comment - 10 Oct 2016

@zero-24
can you relaunch Travis here please?

avatar brianteeman
brianteeman - comment - 10 Oct 2016

I restarted drone. No point in restarting travis as it passed

avatar zero-24
zero-24 - comment - 10 Oct 2016

It is a problem with the 3.7.x branch that needs syncing staging into 3.7.x this failed test has nothing to do with this PR.

avatar brianteeman
brianteeman - comment - 10 Oct 2016

I tried to restart Drone but it just says pending

avatar zero-24
zero-24 - comment - 10 Oct 2016

This can't be fixed with restarting drone as it is a problem in the 3.7.x branch ;) @brianteeman

avatar andrepereiradasilva
andrepereiradasilva - comment - 10 Oct 2016

ok. so ignore it, because it pass cs and unit tests.
can be tested

avatar infograf768
infograf768 - comment - 10 Oct 2016

will do asap. Your original branch was fine.

avatar infograf768 infograf768 - test_item - 14 Oct 2016 - Not tested
avatar infograf768 infograf768 - test_item - 14 Oct 2016 - Tested successfully
avatar infograf768
infograf768 - comment - 14 Oct 2016

I have tested this item successfully on a59eb19

Very clever implementation ?

One more tester @alikon ?


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

avatar alikon alikon - test_item - 16 Oct 2016 - Tested successfully
avatar alikon
alikon - comment - 16 Oct 2016

I have tested this item successfully on a59eb19


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

avatar zero-24 zero-24 - change - 16 Oct 2016
Status Pending Ready to Commit
avatar zero-24
zero-24 - comment - 16 Oct 2016

RTC


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

avatar joomla-cms-bot joomla-cms-bot - change - 16 Oct 2016
Labels Added: ?
avatar infograf768
infograf768 - comment - 26 Oct 2016

do we have to test again?

avatar andrepereiradasilva
andrepereiradasilva - comment - 26 Oct 2016

don't think so, only fixes conflicts and updated branch

avatar zero-24 zero-24 - change - 26 Oct 2016
Milestone Added:
avatar infograf768
infograf768 - comment - 28 Oct 2016

I confirm.

@rdeutz
Please merge asap as we can't change an item language (when associated) without it.

avatar rdeutz rdeutz - reference | 121704d - 28 Oct 16
avatar rdeutz rdeutz - merge - 28 Oct 2016
avatar rdeutz rdeutz - change - 28 Oct 2016
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-10-28 07:42:57
Closed_By rdeutz
avatar rdeutz rdeutz - close - 28 Oct 2016
avatar rdeutz rdeutz - merge - 28 Oct 2016
avatar rdeutz rdeutz - close - 28 Oct 2016
avatar brianteeman brianteeman - close - 28 Oct 2016
avatar brianteeman brianteeman - change - 28 Oct 2016
Labels Removed: ?

Add a Comment

Login with GitHub to post a comment