J4 Issue ? Pending

User tests: Successful: Unsuccessful:

avatar infograf768
infograf768
18 Aug 2018

Pull Request for Issue #21200

Summary of Changes

getCategoryRoute as well as getContactRoute do need the $language parameter added.

Testing Instructions

Use latest 4.0-dev
Tested on a multilingual site.
Create a contact category tagged to each language.
Create a contact in each of these categories, tagged to the same language.

I have as menu item type "List Contacts in a category"
/index.php/en/contact-category-en-gb

The link on that page displaying the contact is
/index.php/en/contact-category-en-gb/mycontact // see below direct menu item. this url is a double with the one below (it should be /index.php/en/my-contact). Alias of that single contact is mycontact

// I do also have a direct menu item to that contact (alias of the menu item is my_contact)
When I use this last one (/index.php/en/my-contact), the category link above the contact gives
/index.php/en/my-contact?view=category&id=14 instead of the existing /index.php/en/contact-category-en-gb

After patch

All is solved to use the correct urls and no double.

Note:
Contacts is not the only place where the $language parameter is missing for that kind of method.
Future PRs should take care of this.

@wilsonge @Hackwar @franz-wohlkoenig

avatar infograf768 infograf768 - open - 18 Aug 2018
avatar infograf768 infograf768 - change - 18 Aug 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 18 Aug 2018
Category Front End com_contact
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 18 Aug 2018

@infograf768 will test later.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 18 Aug 2018

should Categories and Contacts associated?

avatar infograf768
infograf768 - comment - 18 Aug 2018

should Categories and Contacts associated?

Not necessarily. In fact, it can be tested with only 2 content languages and it is not even necessary to set the contact to a specific user as long as it is tagged to a language as well as its category.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 18 Aug 2018

so no Matter as i have associated them.

I didn't understand your Instructions like "see below direct menu item" as there is below no direct Menu Item.

Can you please give Step-by-Step-Instructions what to do?

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 18 Aug 2018
avatar infograf768
infograf768 - comment - 18 Aug 2018

Basically:
Create a contact category set to en-GB: name contact_category-en-GB
Create a contact in this category also set to en-GB. Do NOT assign a user to it (else otherwise you have to create contacts for the same user in all Content languages). name Contact en-GB

Then create a List Contacts in a Category menu item in your Main menu en-GB and select contact_category-en-GB as category to display.

Then create in the same Main menu en-GB a single contact menu item and select the contact created above. Make sure you parameter it to display the Category name and link.

Then compare before and after patch the urls you get for the contact link and the category link vs what you get with your menu items, they should be the same and not what I described in the top tests instructions without patch.

avatar infograf768
infograf768 - comment - 18 Aug 2018

EDIT: evidently both menu items have to be tagged to en-GB too

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 18 Aug 2018 - Tested successfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 18 Aug 2018

I have tested this item successfully on e955913

Without PR

  • at "List Contacts in a Category": /index.php/en/list-contacts-in-a-category/1-contact-en-gb
  • at "Single Contact": /index.php/en/contact-en-gb
  • Category-Link on Top of the Contact-Display: /index.php/en/contact-en-gb?view=category&id=12

With PR

  • at "List Contacts in a Category": /index.php/en/list-contacts-in-a-category/contact-en-gb
  • at "Single Contact": /index.php/en/contact-en-gb
  • Category-Link on Top of the Contact-Display: /index.php/en/list-contacts-in-a-category

This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21679.
avatar wilsonge wilsonge - close - 18 Aug 2018
avatar wilsonge wilsonge - merge - 18 Aug 2018
avatar wilsonge wilsonge - change - 18 Aug 2018
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-08-18 10:31:22
Closed_By wilsonge
Labels Added: J4 Issue ?

Add a Comment

Login with GitHub to post a comment