? ? Pending

User tests: Successful: Unsuccessful:

avatar Septdir
Septdir
18 Apr 2018

Pull Request for Issue #20199.

Summary of Changes

Fix bag with ?layout= in com_content category link after #19681

Testing Instructions

If you have this bug, apply the patch

How reproduce bug by @Quy

  • Install the last demo.
  • Under System > Global Configuration > Articles > Integration > URL Routing, select Modern
  • Search Park Blog
  • Hover Park Blog link to see URL:
    http://localhost/joomla387/index.php/using-joomla/extensions/components/content-component/article-category-blog?layout=

Expected result

Link was /category

Actual result

Now link /category?layout= or /category?layout=templatelayout if override com_content category view

avatar Septdir Septdir - open - 18 Apr 2018
avatar Septdir Septdir - change - 18 Apr 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 18 Apr 2018
Category Front End com_content
avatar Septdir Septdir - change - 18 Apr 2018
The description was changed
avatar Septdir Septdir - edited - 18 Apr 2018
avatar Septdir Septdir - change - 18 Apr 2018
The description was changed
avatar Septdir Septdir - edited - 18 Apr 2018
avatar Septdir Septdir - change - 18 Apr 2018
The description was changed
avatar Septdir Septdir - edited - 18 Apr 2018
avatar Septdir Septdir - change - 18 Apr 2018
Labels Added: ?
avatar brianteeman
brianteeman - comment - 18 Apr 2018

Never mind the code style has anyone replicated the bug as I could not

On 18 Apr 2018 10:14 pm, "Tomasz Narloch" notifications@github.com wrote:

@csthomas commented on this pull request.

In components/com_content/helpers/route.php
#20200 (comment):

@@ -79,10 +79,8 @@ public static function getCategoryRoute($catid, $language = 0)
$link .= '&lang=' . $language;
}

  • 	$jinput = JFactory::getApplication()->input;
    

The pattern for CMD is $pattern = '/[^A-Z0-9_.-]/i';.

There could be a two options: add colon to filter code or replace colon to
dot in layout.
The same as work for task=controller.method.

At now you do not have an option, stay with string.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#20200 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8fHbx8LQi1JPKgMxTgtrnrtXDEYmks5tp6yggaJpZM4TavDK
.

avatar Septdir
Septdir - comment - 18 Apr 2018

@brianteeman I, too, failed to reproduce the bug on the newly installed joomla, can only suggest creating an alternative / override layout for the test

But I can provide details of why #19681 caused a bug

In the past, PR layout turned out so

$jinput = JFactory::getApplication()->input;
$layout = $jinput->get('layout');

if ($layout !== '')
{
	$link .= '&layout=' . $layout;
}

What led to the following results

  1. If category view use standard blog layout layout = NULL NULL !== ''
    It was on two of my test sites updated with 3.8.6 to 3.8.7
  2. If category use alternative/override layout layout = templatelayout And for the correct formation of a link layout = template:layout With a colon as a separator
    It was on several client sites. And if they did not notice, then maybe in a week or two, the search results will have duplicate pages. That will negatively seo affect

This code will correctly add layout to the link

$layout = JFactory::getApplication()->input->get('layout', '', 'string');

if ($layout)
{
	$link .= '&layout=' . $layout;
}

In fact in this PR, I just corrected what was added by the filter 'string' and changing the check

avatar Quy
Quy - comment - 18 Apr 2018
  • Install the last demo.
  • Under System > Global Configuration > Articles > Integration > URL Routing, select Modern
  • Search Park Blog
  • Hover Park Blog link to see URL:
    http://localhost/joomla387/index.php/using-joomla/extensions/components/content-component/article-category-blog?layout=
avatar Quy
Quy - comment - 18 Apr 2018

I have tested this item successfully on f8ad03c


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

avatar Quy Quy - test_item - 18 Apr 2018 - Tested successfully
avatar Septdir Septdir - change - 18 Apr 2018
The description was changed
avatar Septdir Septdir - edited - 18 Apr 2018
avatar Septdir
Septdir - comment - 18 Apr 2018

@Quy I tried to reproduce this bug with a clean installation of joomla on one of my subdomains, But I could not reproduce the bug.

Thank you.
Added your instruction How reproduce to the description

avatar Septdir Septdir - change - 18 Apr 2018
The description was changed
avatar Septdir Septdir - edited - 18 Apr 2018
avatar ReLater
ReLater - comment - 19 Apr 2018

I have tested this item successfully on f8ad03c


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

avatar ReLater ReLater - test_item - 19 Apr 2018 - Tested successfully
avatar Quy Quy - change - 19 Apr 2018
Status Pending Ready to Commit
avatar Quy
Quy - comment - 19 Apr 2018

RTC


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

avatar Septdir Septdir - change - 22 Apr 2018
Labels Added: ?
avatar Septdir
Septdir - comment - 22 Apr 2018

Then what. If you display a module with links to com_tags or view article with its layout, then again there will not be a correct link.

@ReLater , @Quy Please test again.

P.S ontinuous-integration/drone/pr — the build failed?

avatar Septdir
Septdir - comment - 22 Apr 2018

In fact, I would delete the addition of layout to the link, because personally I think it is not correct #19681 PR.

Because if I choose another for another language I choose another layout. Maybe I need to have another layout.

If there are those who think the same way, Say and I just delete the layout from the formation of the link in this PR

avatar Septdir
Septdir - comment - 22 Apr 2018

Create new PR #20211 with full revert #19681
Please test

avatar Septdir Septdir - change - 22 Apr 2018
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2018-04-22 10:37:23
Closed_By Septdir
avatar Septdir Septdir - close - 22 Apr 2018

Add a Comment

Login with GitHub to post a comment