I've turned on the debugger and I think I found the problem. The query when filtering on just an event, without selecting a category is:
SELECT det.evdet_id as detailid, rpt.*, ev.*, rr.*, det.* , ev.state as published, ev.created as created , loc.loc_id,loc.title as loc_title, loc.title as location, loc.street as loc_street, loc.description as loc_desc, loc.postcode as loc_postcode, loc.city as loc_city, loc.country as loc_country, loc.state as loc_state, loc.phone as loc_phone , loc.image as loc_image , loc.url as loc_url , loc.geolon as loc_lon , loc.geolat as loc_lat , loc.geozoom as loc_zoom , loc.mapicon as loc_mapicon , GROUP_CONCAT(DISTINCT loccat.title SEPARATOR ',') AS location_category_list,GROUP_CONCAT(loccatmap.catid SEPARATOR ',') AS location_catid_list , jfc.imagename1 AS imageurl1, jfc.imagetitle1 AS imagetitle1, jfc.imagecomment1 AS imagecomment1 , CASE WHEN (jfc.filename1='') THEN '' ELSE CONCAT('/images/jevents/',jfc.filename1) END as filehref1
, jfc.filetitle1 as filetitle1
, CASE WHEN (jfc.filename1='') THEN '' ELSE CONCAT('<a href="/images/jevents/',jfc.filename1,'" />',jfc.filetitle1,'</a>') END as filelink1, GROUP_CONCAT(DISTINCT catmapcat.id ORDER BY catmapcat.lft ASC SEPARATOR ',' ) as catids
, YEAR(rpt.startrepeat) as yup, MONTH(rpt.startrepeat ) as mup, DAYOFMONTH(rpt.startrepeat ) as dup
, YEAR(rpt.endrepeat ) as ydn, MONTH(rpt.endrepeat ) as mdn, DAYOFMONTH(rpt.endrepeat ) as ddn
, HOUR(rpt.startrepeat) as hup, MINUTE(rpt.startrepeat ) as minup, SECOND(rpt.startrepeat ) as sup
, HOUR(rpt.endrepeat ) as hdn, MINUTE(rpt.endrepeat ) as mindn, SECOND(rpt.endrepeat ) as sdn
FROM si3ow_jevents_repetition as rpt
INNER JOIN si3ow_jevents_vevent as ev ON rpt.eventid = ev.ev_id
INNER JOIN si3ow_jevents_icsfile as icsf ON icsf.ics_id=ev.icsid
INNER JOIN si3ow_jevents_vevdetail as det ON det.evdet_id = rpt.eventdetail_id
LEFT JOIN si3ow_jevents_rrule as rr ON rr.eventid = rpt.eventid
LEFT JOIN si3ow_jev_tageventsmap as tagmap ON tagmap.ev_id = ev.ev_id
LEFT JOIN si3ow_jev_locations as loc ON loc.loc_id=det.loc_id
LEFT JOIN si3ow_jevlocations_catmap AS loccatmap ON loccatmap.locid = loc.loc_id
LEFT JOIN si3ow_categories AS loccat ON loccat.id = loccatmap.catid
LEFT JOIN si3ow_jev_files_combined as jfc ON jfc.evdet_id = det.evdet_id
LEFT JOIN si3ow_jev_peopleeventsmap as persmap ON det.evdet_id=persmap.evdet_id LEFT JOIN si3ow_jev_people as pers ON pers.pers_id=persmap.pers_id
LEFT JOIN
si3ow_jevents_catmap as catmap ON catmap.evid = rpt.eventid
LEFT JOIN
si3ow_categories AS catmapcat ON catmap.catid = catmapcat.id
WHERE 1
AND rpt.rp_id in (SELECT rptx.rp_id FROM si3ow_jevents_repetition as rptx
INNER JOIN si3ow_jevents_vevdetail as det2 ON det2.evdet_id = rptx.eventdetail_id
WHERE
rptx.endrepeat >= '2022-07-05 00:00:00' AND rptx.startrepeat <= '2022-07-05 23:59:59'
AND NOT (rptx.startrepeat < '2022-07-05 00:00:00' AND det2.multiday=0) ) AND ev.state=1 AND (det.summary LIKE '%Marijn%' OR det.description LIKE '%Marijn%' OR det.extra_info LIKE '%Marijn%') AND (catmap.catid NOT IN (383,540,544,543,537,387,388,389,390,391) OR (catmap.catid IN (383,540,544,543,537,387,388,389,390,391) )) AND catmap.catid IN(-1)
AND ev.access IN (1,10) AND icsf.state=1 AND icsf.access IN (1,10)
GROUP BY rpt.rp_id
I see two things here:
First, the reason it's not finding anything, is the condition
catmap.catid IN(-1) It should be left out, if there's no category selected. (If there is a category selected, the where condition is
catmap.catid IN(-1,391). Still I don't see a reason why there's a search for -1)
Second, the condition
(catmap.catid NOT IN (383,540,544,543,537,387,388,389,390,391) OR (catmap.catid IN (383,540,544,543,537,387,388,389,390,391) )) is quite strange. On the one hand it saying not to search for all categories and then it is saying to do search in all categories.