? Pending

User tests: Successful: Unsuccessful:

avatar csthomas
csthomas
16 Oct 2017

Summary of Changes

If there is no menu item for supplied layout then use fallback to menu item without layout, for all cases.

On joomla 3.8.1 with modern routing:

For example, a menu item with type Category List has the link index.php?option=content&view=category&id=2 to "Uncategorised" category.
The sef URL looks like 'index.php/uncategorised'

  • If we create an article with link index.php?option=content&view=category&id=2&layout=blog and there is no any menu item with layout blog then above menu item won't be used.
    If there exists at least one blog for other category then the menu item will be found.

  • If we add url like index.php?option=content&view=category&id=2&layout=default to the article then menu item won't be found.

Testing Instructions

  1. Install staging joomla without sample data.
  2. Create menu item with type Category List for Uncategorised category.
  3. Create featured article in Uncategorised category. Set article text:
<p>Uncategorised with layout explicitly</p>
<p><a href="index.php?option=com_content&amp;view=category&amp;id=2&amp;layout=default">Layout default</a></p>
<p><a href="index.php?option=com_content&amp;view=category&amp;id=2&amp;layout=blog">Layout blog</a></p>
<p>Link to readmore with layout default <a href="index.php?option=com_content&amp;view=article&amp;id=1&amp;catid=2&amp;layout=default">Article</a></p>
  1. Go to home page and check above links from the article

    • before patch not all links use correct menu item, I mean links contains /2-uncategorised
  2. Check article link for button print. (stay in home page - featured view)

  3. Before patch links do not use menu item "Uncategorised".

  4. After patch links uses the menu item.

Benefits

  • links with explicitly added &layout=default will be generated correctly, I mean the correct menu item will be used
  • If a link uses a layout (ex blog) that not exists in menu items then the link will try to use menu item with different layout (that current exists) in all cases - not only when the layout blog exists in other category
avatar joomla-cms-bot joomla-cms-bot - change - 16 Oct 2017
Category Libraries Unit Tests
avatar csthomas csthomas - open - 16 Oct 2017
avatar csthomas csthomas - change - 16 Oct 2017
Status New Pending
avatar csthomas csthomas - change - 18 Oct 2017
The description was changed
avatar csthomas csthomas - edited - 18 Oct 2017
avatar csthomas csthomas - change - 18 Oct 2017
The description was changed
avatar csthomas csthomas - edited - 18 Oct 2017
avatar ciar4n
ciar4n - comment - 20 Oct 2017
  1. Before patch links does not use menu item "Uncategorised".

Before patch both items have uncategorised (../index.php/2-uncategorised) ?

avatar csthomas
csthomas - comment - 20 Oct 2017

Yes.

../index.php/2-uncategorised

This is only id-category in url.
This means that menu item with title "Uncategorised" is not used.
You can add a module, only for menu item "Uncategorised" to see it more clearly.

Link that uses menu item would look like ../index.php/uncategorised
Link that does not use menu item (except default one) look like ../index.php/2-uncategorised

avatar ciar4n ciar4n - test_item - 20 Oct 2017 - Tested successfully
avatar ciar4n
ciar4n - comment - 20 Oct 2017

I have tested this item successfully on 590a4df

After patch print linking to ../index.php/category-list/1-test-article?tmpl=component&print=1

Each article item linking to ../index.php/category-list


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

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 25 Oct 2017

@ciar4n can you please explain how you have tested as i didn't understand original Test Instructions.


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

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 25 Oct 2017

@ciar4n can you please explain how you have tested as i didn't understand original Test Instructions.


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

avatar csthomas csthomas - change - 25 Oct 2017
The description was changed
avatar csthomas csthomas - edited - 25 Oct 2017
avatar csthomas csthomas - change - 25 Oct 2017
The description was changed
avatar csthomas csthomas - edited - 25 Oct 2017
avatar csthomas csthomas - change - 25 Oct 2017
The description was changed
avatar csthomas csthomas - edited - 25 Oct 2017
avatar csthomas csthomas - change - 25 Oct 2017
The description was changed
avatar csthomas csthomas - edited - 25 Oct 2017
avatar csthomas
csthomas - comment - 25 Oct 2017

I think now test instructions should be more clear.

The main idea is, the links in article content should use menu item 'Uncategorised' when you are in featured view.

Below links come from article content from test instruction.
Go to com_content featured view, usual home page and check urls:

Links before:
Layout default => index.php/2-uncategorised
Layout blog => index.php/2-uncategorised?layout=blog
Article => index.php/2-uncategorised/1-article
Button Print => index.php/2-uncategorised/1-article?tmpl=component&print=1

Links after:
Layout default => index.php/uncategorised
Layout blog => index.php/uncategorised
Article => index.php/uncategorised/1-article
Button Print => index.php/uncategorised/1-article?tmpl=component&print=1

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 25 Oct 2017

@csthomas thanks for Explanation.

Using sample data set 1 archived Article to "Published" and Featured and created a Menu "Category List" using Category "Uncategorised".

Links without PR:

  • Menu: /index.php/en/category-list/67-whats-new-in-15

So i didn't get what to test.

avatar csthomas
csthomas - comment - 25 Oct 2017

Using sample data set 1 archived Article to ...

Install joomla without sample data or if you only have installation with sample data then unpublish all Category Blog menu items before test.

avatar csthomas
csthomas - comment - 25 Oct 2017

I know that article/category links from featured view work, but links from example article text that I supplied do not work.

avatar csthomas
csthomas - comment - 25 Oct 2017

Links without PR:

  • Menu: /index.php/en/category-list/67-whats-new-in-15

On featured view before patch, Print Button is:
/index.php/en/9-uncategorised/67-whats-new-in-15?tmpl=component&print=1
After patch it should be:
/index.php/en/uncategorised/67-whats-new-in-15?tmpl=component&print=1

The difference is 9-.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 25 Oct 2017

Unpublished Blog-Menues, also the Menu-List for uncategoriced-Category.

Using PR got for Print: /index.php/en/allcategories-en-gb/9-uncategorised/67-whats-new-in-15?tmpl=component&print=1 (also after clear Browser-Cache).

avatar csthomas
csthomas - comment - 25 Oct 2017

One Menu for Category List for Uncategorised has to stay published.
Others menus for category or categories views should has to be unpublished.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 25 Oct 2017

All Category- and Categories-Menues are unpublished, only one Category-List-Menu for "Uncategorised".

Without PR at "Print" got: /index.php/en/category-list/67-whats-new-in-15?tmpl=component&print=1

avatar csthomas
csthomas - comment - 25 Oct 2017

Do you you get that link when you are on featured view?

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 25 Oct 2017

Menu Item Type: Category List, Article: Featured is set on Yes. Fresh Install staging of Today.

avatar csthomas
csthomas - comment - 25 Oct 2017

All is ok. The difference should be when you are on featured view.

Before PR:

  • In featured view, print button should has link like /index.php/en/9-uncategorised/67-whats-new-in-15?tmpl=component&print=1 - wrong link, which I want to fix
  • In article view, print button should has link like /index.php/en/category-list/67-whats-new-in-15?tmpl=component&print=1 - ok

After PR:
/index.php/en/category-list/67-whats-new-in-15?tmpl=component&print=1 - ok
/index.php/en/category-list/67-whats-new-in-15?tmpl=component&print=1 - ok

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 25 Oct 2017 - Tested successfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 25 Oct 2017

I have tested this item successfully on 590a4df

Using PR:

  • using Menu got
    /index.php/en/category-list/67-whats-new-in-15?tmpl=component&print=1
  • changing URL from index.php/en/category-list/67-whats-new-in-15 toindex.php/en/67-whats-new-in-15 got
    /index.php/en/category-list/67-whats-new-in-15?tmpl=component&print=1

Thanks for Patience @csthomas


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

avatar franz-wohlkoenig franz-wohlkoenig - change - 25 Oct 2017
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 25 Oct 2017

RTC after two successful tests.

avatar csthomas
csthomas - comment - 25 Oct 2017

Thanks @ciar4n and @franz-wohlkoenig for tests. Despite my poor English skills, this PR has been tested.

avatar mbabker mbabker - change - 27 Oct 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-10-27 13:34:46
Closed_By mbabker
Labels Added: ?
avatar mbabker mbabker - close - 27 Oct 2017
avatar mbabker mbabker - merge - 27 Oct 2017

Add a Comment

Login with GitHub to post a comment