By heleneross on Sunday, 21 May 2017
Replies 5
Likes 0
Views 1.1K
Votes 0
in components/com_jevents/libraries/modfunctions.php on line 137, you have used a hardcoded | to split the array. I am using , (comma) to separate the categories so when $catidsin is exploded I only get the first value.
I have simply inserted
$catidsin = str_replace($separator,"|",$catidsin);
before the explode statement and now my module works as it should.
Hello Heleneross,

We use the pipe | for splitting our categories up and always have. Why can you not store them as | or before passing the details into JEvents to use | instead of , ?

Many thanks
Tony
·
7 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
The component allows me to choose the category separator. I chose , as the pipe is considered an unsafe character.
The problem is with the cal module when I set ignore jevents filters to no
If my my main calendar is filtered on a combination of categories then the cal module does not reflect this.
Regards,
Helen
·
7 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Helen,

The pipe is not unsafe if used correctly. /why have they classified the pipe as unsafe?

Many thanks
Tony
·
7 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
when I set my site up a few years ago every time I checked it (using a |) I got errors from the validator reference rfc3986
I notice when I install that the separator is by default a comma

Anyway I have done some testing on a fresh J3.7.1 install and taking all the defaults for JEvents. The only changes I made were to restrict the calendar module to 3 categories and set ignore filter to No. I have set the system to show errors.
You can find the site at http://calendar.cloudaccess.host/index.php/calendar

You can see the problems. First click on the reset button on the filter module.Note all the errors and the calendar module does not hightlight any events.

Click on the Calendar menu item refresh the page and get rid of the errors.

There are two events on the 22nd May. Click on 22 on the calendar module. Two events are shown. Now click on the 22nd on the calendar module again and only one event is shown. (This one is fixed by the code change I proposed) It makes no difference whether I have the filter module on the page.

Thanks
·
7 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
thanks for highlighting the issue - line 137 should be

$catidsin = explode($separator,$catidsin);
·
7 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post