diff --git a/libraries/cms/helper/tags.php b/libraries/cms/helper/tags.php index 8e0ab36e9eb1e..088dab578b344 100644 --- a/libraries/cms/helper/tags.php +++ b/libraries/cms/helper/tags.php @@ -556,6 +556,7 @@ public function getTagItemsQuery($tagId, $typesr = null, $includeChildren = fals ->select('MAX(c.core_language) AS core_language, MAX(c.core_catid) AS core_catid') ->select('MAX(c.core_publish_up) AS core_publish_up, MAX(c.core_publish_down) as core_publish_down') ->select('MAX(ct.type_title) AS content_type_title, MAX(ct.router) AS router') + ->select('ctnt.attribs AS attribs') ->from('#__contentitem_tag_map AS m') ->join( @@ -568,6 +569,9 @@ public function getTagItemsQuery($tagId, $typesr = null, $includeChildren = fals ) ->join('INNER', '#__content_types AS ct ON ct.type_alias = m.type_alias') + // Join over the content to get attribs + ->join('LEFT', '#__content AS ctnt ON m.content_item_id = ctnt.id') + // Join over the users for the author and email ->select("CASE WHEN c.core_created_by_alias > ' ' THEN c.core_created_by_alias ELSE ua.name END AS author") ->select("ua.email AS author_email")