help to better help you:

Please: add always Joomla / JEM version and details to your posts, so we can try to reproduce your issue!

Event not found error only on classes

Re: Event not found error only on classes

1 week 3 days ago - 1 week 3 days ago
#32406
Do you have any JEM view overrides, particularly for the event view? This error message should only display when the registration is saved in the database and the event id doesn't exist (it's null, not found).

The error is triggered on line 773 of \components\com_jem\models\event.php. When a user views your event page (via the URL provided), this code should not be executed.

If you don’t have any JEM overrides, could you check and compare the code on your website with the latest version of JEM (from the ZIP file)?
Last edit: 1 week 3 days ago by McKillo.

Please Log in or Create an account to join the conversation.

Re: Event not found error only on classes

1 week 3 days ago
#32407
I've messaged you the query result, I'll get back to you when I've done a compare. there's only one jem override and it's a single line user.css affecting the banner. Thanks for your continued efforts.

Please Log in or Create an account to join the conversation.

Re: Event not found error only on classes

1 week 3 days ago
#32410
The event entry in the database is OK, so, this is discarded.
The code review (compare files of last version), tell me how to solve it, what do you change? I want to reproduce it.
If you don't have any tool to compare, you can use 'Beyond Compare' by Scooter Software (left side with JEM zip and right site with ftp of your site) and check \component\com_jem.

Please Log in or Create an account to join the conversation.

Re: Event not found error only on classes

1 week 2 days ago
#32415
Now, this URL is causing an error "An error has occurred.".
In the database (the one you sent me), the event ID 1010 does not exist, which is the reason for the error message. This is correct.I think you might be using an old version of the event list table or this two table with other prefix, and the 'event' menu might be an old call to eventlist/JEM or another JEM table (possibly with a different prefix). Please review the menu. Does this make sense?
 

Please Log in or Create an account to join the conversation.

Re: Event not found error only on classes

1 week 2 days ago
#32416
I'm sorry I should have chosen an event further ahead, that event has now passed and so does not exist, the error occurs on any class event, but to clarify I have now hidden the error message on the live site so ukjive.co.uk/index.php/classes/event/1011:stockport-class-nights is still valid but I've hidden the error (403 instead of 404).

I'm inviting you to give in as it seems a lot of effort for a one off issue.

Please Log in or Create an account to join the conversation.

Re: Event not found error only on classes

1 week 1 day ago - 1 week 1 day ago
#32417
JEM does not delete events and assumes that if they were created, they still exist.

Why are you deleting past events? Wouldn’t it be better to archive them instead?

After debugging the issue, this is the cause of the problem:

These events (with id 1010, 1011,...) are part of a recurrence series. Each event in the series has a root event, and the ID of this root event is saved in the recurrence_first_id field for each event register. When an event expires, instead of archiving it, the event is deleted from the xxx_jem_events table (manual, or vía script).The error occurs because the root event was deleted from the _jem_events table. The code checks for the root event associated with each child event. Since the root event no longer exists in your database, an error message is displayed. See line 388 in  \components\com_jem\views\event\view.html.php.

For example, for your database, the events with IDs 1010, 1011, 1012, 1013, 1014, 1015, etc., have recurrence_first_id = 1004. However, the root event with ID 1004 no longer exists in your database because it was deleted (see the attached image).

Solution and recommendation:

Instead of deleting events, you can automatically archive them once they have passed. You just need to enable the following setting in JEM Settings → Basic Settings → Event Handling → Handle Old Events = Archive old events + Number of Days = 1. This way, you won’t have the error, and the root event check will have data because the event will still exist, even if it’s archived.
 

Attachments:

Last edit: 1 week 1 day ago by McKillo.

Please Log in or Create an account to join the conversation.

Time to create page: 0.477 seconds