You need to be logged in to view a user's profile.
  1. ugenda
    Gold Member
  2. JEvents 3.4 (Free Access)
  3. Tuesday, 05 July 2022
The filter module for filtering events in the current view (day, month etc.) doesn't work as expected. I can't filter just on a search term or a location. It always has to be in combination with a category selection, otherwise nothing is found. If I leave out the filtering for categories in the module settings, then search works as expected.
ugenda
Gold Member
Accepted Answer Pending Moderation
0
Votes
Undo
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.
  1. more than a month ago
  2. JEvents 3.4 (Free Access)
  3. # 1
geraint
Support Team
Accepted Answer Pending Moderation
0
Votes
Undo
I'll check this on the dev site. I half recall resolving an issue like this recently - I'll double check that everything is up to date.
JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!
  1. more than a month ago
  2. JEvents 3.4 (Free Access)
  3. # 2
geraint
Support Team
Accepted Answer Pending Moderation
0
Votes
Undo
I found the cause of the problem and have fixed it on your sandbox site with this build of JEvents.

We had hardened the category filter search to trap for potential security issues which converted a blank category into a zero which in turn lead to this issue :(. the new code traps blank filter values specifically which avoids this issue

Thanks for highlighting the problem
Attachments (1)
JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!
  1. more than a month ago
  2. JEvents 3.4 (Free Access)
  3. # 3
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!

Members Area

Show your support

Unlike many Joomla calendars we do not charge to download JEvents - please show your support for this project by becoming a member of the JEvents Club Club members get access to early releases, exclusive member support forums, and Silver and Gold members can use many exciting JEvents addons

Your membership will ensure that JEvents continues to be the best events calendar for Joomla.