?
avatar Septdir
Septdir
18 Apr 2018

Steps to reproduce the issue

  1. Go to Articles: Options and select Modern as URL Routing
  2. If need create Category and Article
  3. Create Menu Item Category blog (not home)
  4. Go to page and see category link in article blog

For example category alias will be block

Expected result

site.com/blog

Actual result

site.com/blog?layout=

System information (as much as possible)

PHP 7.2.2 / 7.1.11
Joomla 3.8.7

Additional comments

In truth, I do not know in which update it appeared. This was noticed by one of the clients.
I understand that this is a Modern Route however it's still a bug
I watched the problem on 3 websites

avatar Septdir Septdir - open - 18 Apr 2018
avatar joomla-cms-bot joomla-cms-bot - change - 18 Apr 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 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
Title
[3.8.7] [com_content] Category link with ?layout= when active Modern route
[com_content] Category link with ?layout= when active Modern route
avatar Septdir Septdir - edited - 18 Apr 2018
avatar Septdir Septdir - change - 18 Apr 2018
Title
[com_content] Category link with ?layout= when active Modern route
Category link with ?layout= when active Modern route
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 franz-wohlkoenig franz-wohlkoenig - change - 18 Apr 2018
Category Router / SEF
avatar brianteeman
brianteeman - comment - 18 Apr 2018

by one of or all of?

I cant replicate it myself on a clean install

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 18 Apr 2018

Can't confirm on live 3.8.7-Site but its on php 7.0.4.

avatar franz-wohlkoenig franz-wohlkoenig - change - 18 Apr 2018
Status New Discussion
avatar Septdir Septdir - change - 18 Apr 2018
The description was changed
avatar Septdir Septdir - edited - 18 Apr 2018
avatar mbabker
mbabker - comment - 18 Apr 2018

If any core change caused this one it'd be #19681 but even that wouldn't allow for an empty layout query string variable.

avatar Septdir
Septdir - comment - 18 Apr 2018

@brianteeman in clean site all fine, However, this site was created yesterday
https://dev.joomlazen.com/en/

In single language sites same problem

avatar Septdir
Septdir - comment - 18 Apr 2018

I try to reproduce the exact path that leads to the problem or find & fix the reason

avatar Septdir
Septdir - comment - 18 Apr 2018

@mbabker Yes #19681 is the reason when i comments these lines the link became normal

in my site where override com_content link was /blog/web.html?layout=septdircategory

when comment

//			$jinput = JFactory::getApplication()->input;
//			$layout = $jinput->get('layout');
//
//			if ($layout !== '')
//			{
//				$link .= '&layout=' . $layout;
//			}

link was has become /blog/web.html

In sites where com_content link become norlmal without ?layout

avatar ggppdk
ggppdk - comment - 18 Apr 2018
$layout = $jinput->get('layout');

So if layout is null (not set)
you will get the layout variable appended as empty, right ? because null !== ''

Maybe fix with

$layout = $jinput->get('layout', '', 'CMD');

or

if (!empty($layout))
avatar Septdir
Septdir - comment - 18 Apr 2018

@ggppdk It's fixed if layout empty.
but if layout not empty for example my site where create override the problem remains
Because with such filtering the wrong value comes. I have already made our decision now to do PR

avatar Septdir
Septdir - comment - 18 Apr 2018

@alikon please test #20200

avatar joomla-cms-bot joomla-cms-bot - change - 18 Apr 2018
Closed_By Quy joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 18 Apr 2018
avatar Quy Quy - change - 18 Apr 2018
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2018-04-18 20:50:43
Closed_By Quy
avatar joomla-cms-bot
joomla-cms-bot - comment - 18 Apr 2018

Set to "closed" on behalf of @Quy by The JTracker Application at issues.joomla.org/joomla-cms/20199

Add a Comment

Login with GitHub to post a comment