?
avatar paul-muckypuddle
paul-muckypuddle
13 Oct 2014

Steps to reproduce the issue

1 - Call JHelperTags getTagItemsQuery method with the 2nd argument containing an array of type aliases (as perhttp://api.joomla.org/cms-3/classes/JHelperTags.html#method_getTagItemsQuery

Expected result

A DB object with items matching those tags, filtered by content type

Actual result

Error 1064 (MySQl error)

System information (as much as possible)

Joomla 3.3.6
PHP 5.3

Additional comments

The fix is fairly simple. getTagItemsQuery documentation says it expects the 2nd argument to be an array of content type aliases, a single alias, or null. In fact, because line 560 of JHelperTags calls self::getTypes('assocList', $typesr, false); with the 3rd param as 'false' it actually expects content type IDs, not aliases. Thus, the query causes an error. Changing this to true, or supplying getTagItemsQuery with type IDs, does not cause the issue

avatar muckypuddle muckypuddle - open - 13 Oct 2014
avatar nicksavov
nicksavov - comment - 16 Oct 2014

Thanks Paul! Could you submit a pull request for it? Here's a really easy way how:
http://docs.joomla.org/Using_the_Github_UI_to_Make_Pull_Requests

avatar muckypuddle
muckypuddle - comment - 16 Oct 2014

Hi Nick, no problem at all - now done.

avatar nicksavov nicksavov - change - 16 Oct 2014
Labels Added: ?
avatar nicksavov
nicksavov - comment - 16 Oct 2014

Thanks Paul!

avatar zero-24
zero-24 - comment - 16 Oct 2014

@nicksavov can you move the PBF label to #4698 ? So we can close here and use the PR for discussion. Thanks

avatar zero-24
zero-24 - comment - 16 Oct 2014

Thanks @nicksavov

avatar zero-24 zero-24 - close - 16 Oct 2014
avatar zero-24 zero-24 - close - 16 Oct 2014
avatar zero-24 zero-24 - close - 16 Oct 2014
avatar jissues-bot jissues-bot - close - 16 Oct 2014
avatar zero-24 zero-24 - change - 16 Oct 2014
Status New Closed
avatar jissues-bot
jissues-bot - comment - 16 Oct 2014

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

avatar jissues-bot jissues-bot - change - 16 Oct 2014
Closed_Date 0000-00-00 00:00:00 2014-10-16 12:42:10
avatar zero-24
zero-24 - comment - 16 Oct 2014

Closing here as we have a PR now thanks @muckypuddle

avatar zero-24 zero-24 - change - 7 Jul 2015
Labels Added: ?
Removed: ?
avatar zero-24 zero-24 - change - 7 Jul 2015
Labels Removed: ?
avatar zero-24 zero-24 - change - 7 Jul 2015
Labels Added: ?

Add a Comment

Login with GitHub to post a comment