[Solved] Category Blog error when set tag

Did you find a bug in Joomla! 3.x but aren't sure? This forum is the place to help figure out if the problem is a bug and how to report it. If you are an experienced Joomla! user and are certain that you have found a bug please use the Bug Tracker to submit your issue.
This forum is for discussion about bugs and to get help with reporting them to the Bug Tracker: https://issues.joomla.org

Moderator: ooffick

Forum rules
Please use the official Bug Tracker to report a bug: https://issues.joomla.org
Locked
xuanhau
Joomla! Apprentice
Joomla! Apprentice
Posts: 28
Joined: Tue Dec 20, 2005 4:04 am
Location: VN
Contact:

[Solved] Category Blog error when set tag

Post by xuanhau » Sun Oct 08, 2017 1:26 am

In Joomla 3.8.1, if you create menu with category blog/list combine with tag item, you will have empty page with any category.

Solve:
Open the file components\com_content\models\category.php, Line: 244 ==> disable this line

Code: Select all

			
			$model->setState('list.direction', $this->getState('list.direction'));
			$model->setState('list.filter', $this->getState('list.filter'));
			//$model->setState('filter.tag', $this->getState('filter.tag'));
I solved this issue

User avatar
jackrabbit
Joomla! Ace
Joomla! Ace
Posts: 1473
Joined: Thu May 21, 2009 3:12 am
Location: Florida
Contact:

Re: [Solved] Category Blog error when set tag

Post by jackrabbit » Sun Oct 08, 2017 1:48 am

That's not a valid 'solution' because that file will be overwritten when the core is updated. You'll need to write a plugin or a method using JModelLegacy in your template to achieve the goal and avoid overwrite.

Something like this (not a working method, just a clue where to search for a solution)

Code: Select all

JModelLegacy::addIncludePath(JPATH_SITE . '/components/com_content/models', 'ContentModel');
$model = JModelLegacy::getInstance('Articles', 'ContentModel', array('ignore_request' => true));
$app = JFactory::getApplication();
$myParams = $app->getParams();
$model->setState('params', $myParams);
Reset Joomla super user password and username simply | http://cmsenergizer.com/website-energy- ... d-remotely

xuanhau
Joomla! Apprentice
Joomla! Apprentice
Posts: 28
Joined: Tue Dec 20, 2005 4:04 am
Location: VN
Contact:

Re: [Solved] Category Blog error when set tag

Post by xuanhau » Sun Oct 08, 2017 3:41 am

I think this is the bug. Because of the code $this->getState('filter.tag') will get filter tag from menu to other menu.
If you create menu with default category and category menu with any tag. You will receive empty page after select tag category menu.

You can test in your side.


Locked

Return to “Joomla! 3.x Bug Reporting”