J4 Issue ?
avatar richard67
richard67
25 Jun 2019

Steps to reproduce the issue

  1. Install clean 4.0-dev
  2. Install 2 additional languages which work with 4.0-dev, e.g. German (DE) and Persian.
  3. Install multilingual sample data.
  4. Check associations for menu items. Check also associations for other things, e.g. articles or categories.

Expected result

For everything which can have associations, the associations tab of the edit view shows only associations to other languages than the one of the currently edited thing, e.g. article or menu item.

Actual result

For menu items (and only for those, not for articles or categories), the associations tab of the edit view shows also an association for the language of that particular menu item, see red frame in following screen shot for a menu item in German language:

Unbenannt_1

When clicking then the "Select" button of that wrong association, a completely messed up modal appears:

Unbenannt_2

But I think that's just a consequence by clicking a button which should not exist, because for the other languages' buttons the modals are ok.

On the other hand, when clicking the "Create" button for that language, the modal is not messed up, and this button should not also not exist as far as I know, so I'm a bit confused.

System information (as much as possible)

New 4.0-dev installation of today with 3 languages + multilingual sample data.

PHP 7.2

avatar richard67 richard67 - open - 25 Jun 2019
avatar joomla-cms-bot joomla-cms-bot - change - 25 Jun 2019
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 25 Jun 2019
avatar richard67 richard67 - change - 25 Jun 2019
Build staging 4.0-dev
avatar richard67 richard67 - change - 25 Jun 2019
Category Administration Multilanguage
avatar richard67
richard67 - comment - 25 Jun 2019
avatar richard67 richard67 - change - 25 Jun 2019
The description was changed
avatar richard67 richard67 - edited - 25 Jun 2019
avatar richard67 richard67 - change - 25 Jun 2019
The description was changed
avatar richard67 richard67 - edited - 25 Jun 2019
avatar richard67 richard67 - change - 25 Jun 2019
The description was changed
avatar richard67 richard67 - edited - 25 Jun 2019
avatar franz-wohlkoenig franz-wohlkoenig - change - 25 Jun 2019
Labels Added: J4 Issue
avatar franz-wohlkoenig franz-wohlkoenig - labeled - 25 Jun 2019
avatar richard67 richard67 - change - 25 Jun 2019
Title
[4.0] Menu item associations shows associaion for a menu item's current language
[4.0] Menu item associations tab in edit view shows association for a menu item's current language
avatar richard67 richard67 - edited - 25 Jun 2019
avatar franz-wohlkoenig franz-wohlkoenig - change - 26 Jun 2019
Status New Discussion
avatar richard67 richard67 - change - 26 Jun 2019
Title
[4.0] Menu item associations tab in edit view shows association for a menu item's current language
[4.0] Menu item associations tab in edit view shows association for the menu item's language
avatar richard67 richard67 - edited - 26 Jun 2019
avatar brianteeman
brianteeman - comment - 26 Jun 2019

I can confirm that the association link is displayed for the language that the menu item is in which is obviously wrong.

I can confirm that hitting select on that association produces the error as shown in the screen shot plus the error message
Recoverable fatal error: Object of class Joomla\Component\Menus\Administrator\Service\HTML\Menus could not be converted to string in C:\htdocs\joomla-cms\libraries\src\HTML\HTMLHelper.php on line 149

avatar infograf768
infograf768 - comment - 27 Jun 2019
  1. The first issue, i.e. the fact that the field is showing for the same language comes from #24775 where was forgotten to change _id to _name in the getLabel() method in MenuField.php, as done for other similar fields in that PR.
    [I corrected their display in the js in https://github.com//pull/25060 ]
    => Easy to solve

  2. The display of the Modal itself where we have the fatal error quoted above can also be solved:
    In #25197 I corrected the display to use jgrid.published instead of menus.state to cope with new publish_down and publish_up parameters.
    I forgot to do it in the modal...
    => Easy to solve.
    There is already a PR for that
    #25338 which I am now merging.
    We could at the same time normalize some aspects of the modal ($iconStates) but this could be for another PR.

3: Switching the Menu in the modal should show No Matching results if the selected menu does not contain any menu item tagged to the desired language.
That one, I do not know how to solve right now as it sometimes display the full manager in the modal... It is working OK in 3.x...

I will propose a PR for issue 1 and create an issue for issue 3

avatar infograf768
infograf768 - comment - 27 Jun 2019

see #25341

Closing as both original issues here are taken care of.

avatar infograf768 infograf768 - change - 27 Jun 2019
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2019-06-27 06:55:20
Closed_By infograf768
avatar infograf768 infograf768 - close - 27 Jun 2019

Add a Comment

Login with GitHub to post a comment