Hi
We know Klas submit this workaround https://www.seblod.com/resources/tutorials/workaround-for-search-by-tag-issues but with the latest Joomla / SEBLOD releases (3.6.3 + 3.9.1) we can just put the ARTICLE TAGS field in the search form and it works
The search criterion on the article tags field is ANY WORD EXACT
However the trouble is when we want to search contents that have several tags (in my example the tags ids are 2 and 6) the query is
SELECT t0.id AS pid,t0.pk AS pk,t0.pkb AS pkb,t0.parent_id AS
parent,t0.author_id AS author,t0.cck AS cck,t0.storage_location AS
loc,tt.id AS SELECT t0.id AS pid,t0.pk AS pk,t0.pkb AS pkb,t0.parent_id AS
parent,t0.author_id AS author,t0.cck AS cck,t0.storage_location AS
loc,tt.id AS type_id,tt.alias AS type_alias
FROM `#__cck_core` AS t0
LEFT JOIN `#__content` AS t2 ON t2.id = t0.pk
LEFT JOIN `#__contentitem_tag_map` AS t1 ON (t1.content_item_id = t2.id
AND t1.type_alias = "com_content.article")
LEFT JOIN `#__cck_core_types` AS tt ON tt.name = t0.cck
WHERE t2.state = 1
AND t2.access IN (1,1,5)
AND ( t2.publish_up = '0000-00-00 00:00:00' OR t2.publish_up <= '2016-09-29 15:08' )
AND ( t2.publish_down = '0000-00-00 00:00:00' OR t2.publish_down >= '2016-09-29 15:08' )
AND t0.cck = 'profil'
AND t1.tag_id IN ('2,6')
GROUP BY t0.id
ORDER BY t2.title ASC
LIMIT 25
but the line : AND t1.tag_id IN ('2,6') is not what we want. The way the tags mapping is stored in the database prevents us from selecting contents that have both tags
What is the solution please ?
thanks
cyril