?
Referenced as Pull Request for: # 8846
avatar Robdebert
Robdebert
6 Feb 2015

screen shot 2015-02-06 at 07 02 43#### Steps to reproduce the issue

Because mod_articles_category is missing some functions, i needed to create a copy of it with extended features. Steps:

1) Create a new module, with the intention to display articles filtered by category-id and tags.
2) Use this to get the article-list-model:
$articles = JModelLegacy::getInstance('Articles', 'ContentModel', array('ignore_request' => true));

3) Problem is: you cannot simply add a filter-state like this:
$filter_tag = $params->get('filter_tag', '');
if ($filter_tag) {
$articles->setState('filter.tag', (int)$filter_tag);
}

That is, because only the backend-model has this filter. The frontend-model does not. And i didn't found a solution in the documentations to get the instance of an admin-model.

Expected result

Frontend-Model should either provide the same methodes as the backend-model, or there needs to be a possibility to get the instance of a backend-model using JModelLegacy::getInstance
or anything else, that provides a filtering-method that can be accesses using the framework and not own mysql-queries.

Actual result

See description above.

System information (as much as possible)

Joomla 3.3.6 stable release.

Additional comments

\administrator\components\com_content\models\articles.php:
Admin - ContentModelArticles already uses filter_tag variables (See lines 56, 111, 297).

\components\com_content\models\articles.php -> Missing filter-functions for tags.screen shot 2015-02-06 at 07 02 43

avatar Robdebert Robdebert - open - 6 Feb 2015
avatar rdeutz rdeutz - change - 6 Feb 2015
Priority Urgent Low
avatar rdeutz
rdeutz - comment - 6 Feb 2015

setting the prio to low, see https://docs.joomla.org/Bug_and_Issue_Tracker_Priority for more information


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5998.
avatar zero-24 zero-24 - change - 6 Feb 2015
Category Components Documentation Front End Libraries Modules Tags Front End Modules Tags
avatar brianteeman brianteeman - change - 7 Feb 2015
Labels Added: ?
avatar danielsmink
danielsmink - comment - 5 Jan 2016

This is quite annoying. It's almost one year later. Any chance this will be fixed in 3.5?

avatar rdeutz
rdeutz - comment - 5 Jan 2016

As long as nobody makes a patch, it will stay here forever

avatar danielsmink
danielsmink - comment - 5 Jan 2016

I'll see what I can do. It took 10 minutes to get it working with query parameters locally. But I have to check more places before I submit a PR.

avatar danielsmink
danielsmink - comment - 5 Jan 2016

PR is in @rdeutz

avatar brianteeman brianteeman - change - 5 Jan 2016
Status New Closed
Closed_Date 0000-00-00 00:00:00 2016-01-05 19:07:05
Closed_By brianteeman
avatar brianteeman brianteeman - close - 5 Jan 2016
avatar brianteeman brianteeman - close - 5 Jan 2016
avatar brianteeman
brianteeman - comment - 5 Jan 2016

Closing as we have a PR - please test #8846


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

Add a Comment

Login with GitHub to post a comment