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
Event not found error only on classes
1 day 16 hours ago
Joomla 4.4.10
Jem 4.3.1
Mysql 8.0
php 8.2
Website ukjive.co.uk click on a freestyle and it displays correctly.
Go to classes ukjive classes and a warning "event not found" appears at the top although the event displays correctly.
I can't find what is triggering it and the only things that's happened recently is a user putting classes on with recurrence weekly for a year and a start and end time 5 years apart. I resorted to sql "set enddates = dates where locid =" to sort it out. I could understand if it caused a problem for that location but it's all class locations. there's nothing in the error log but a lot in deprecated. I'd be happy just to suppress the message.
Jem 4.3.1
Mysql 8.0
php 8.2
Website ukjive.co.uk click on a freestyle and it displays correctly.
Go to classes ukjive classes and a warning "event not found" appears at the top although the event displays correctly.
I can't find what is triggering it and the only things that's happened recently is a user putting classes on with recurrence weekly for a year and a start and end time 5 years apart. I resorted to sql "set enddates = dates where locid =" to sort it out. I could understand if it caused a problem for that location but it's all class locations. there's nothing in the error log but a lot in deprecated. I'd be happy just to suppress the message.
Please Log in or Create an account to join the conversation.
Re: Event not found error only on classes
1 day 15 hours ago
Can it be that the word "classes" is reserved for Joomla/Jem?
Please Log in or Create an account to join the conversation.
Re: Event not found error only on classes
1 day 9 hours ago
The site has been working for 6+ months without this problem showing up and as previously mentioned there is nothing in the error log. I believe it is something specific to Jem rather than a joomla thing. I'm going to turn on debugging for a while to see if I can get more information.
Please Log in or Create an account to join the conversation.
Re: Event not found error only on classes
1 day 9 hours ago
Update: turned on debugging - no errors
Please Log in or Create an account to join the conversation.
Re: Event not found error only on classes
1 day 9 hours ago
I searched for the error message and found. components/com_jem/language/en-GB/com_jem.ini719:COM_JEM_EVENT_ERROR_EVENT_NOT_FOUND="Event not found!"
frank@thunderthighs:~/website/ukj2070125$ then I searched for use of the error message and it was only used in components/com_jem/models/event.php it was referenced three times and the first two were 404's the third one is in a section to do with event registration but I don't have registration turned on so it should never get executed. protected function _doRegister($eventId, $uid, $uip, $status, $places, $comment, &$errMsg, $regid = 0, $respectPlaces = true) {
// $app = Factory::getApplication('site');
// $user = JemFactory::getUser();
// $jemsettings = JemHelper::config();
$registration = (empty($uid) || empty($eventId)) ? false : $this->getUserRegistration($eventId, $uid);
$onwaiting = 0;
try {
$event = $this->getItem($eventId);
}
// some gently error handling
catch (Exception $e) {
$event = false;
}
if (empty($event)) {
$errMsg = Text::_('COM_JEM_EVENT_ERROR_EVENT_NOT_FOUND');
return false;
}
$oldstat = is_object($registration) ? $registration->status : 0;
if ($status == 1 && $status != $oldstat) {
if ($respectPlaces && ($event->maxplaces > 0)) { // there is a max
// check if the user should go on waiting list
if ($event->booked >= $event->maxplaces) {
if (!$event->waitinglist) {
$this->setError(Text::_('COM_JEM_EVENT_FULL_NOTICE'));
return false;
}
$onwaiting = 1;
}
}
}
I'll check the database but I don't know what to look for really.
frank@thunderthighs:~/website/ukj2070125$ then I searched for use of the error message and it was only used in components/com_jem/models/event.php it was referenced three times and the first two were 404's the third one is in a section to do with event registration but I don't have registration turned on so it should never get executed. protected function _doRegister($eventId, $uid, $uip, $status, $places, $comment, &$errMsg, $regid = 0, $respectPlaces = true) {
// $app = Factory::getApplication('site');
// $user = JemFactory::getUser();
// $jemsettings = JemHelper::config();
$registration = (empty($uid) || empty($eventId)) ? false : $this->getUserRegistration($eventId, $uid);
$onwaiting = 0;
try {
$event = $this->getItem($eventId);
}
// some gently error handling
catch (Exception $e) {
$event = false;
}
if (empty($event)) {
$errMsg = Text::_('COM_JEM_EVENT_ERROR_EVENT_NOT_FOUND');
return false;
}
$oldstat = is_object($registration) ? $registration->status : 0;
if ($status == 1 && $status != $oldstat) {
if ($respectPlaces && ($event->maxplaces > 0)) { // there is a max
// check if the user should go on waiting list
if ($event->booked >= $event->maxplaces) {
if (!$event->waitinglist) {
$this->setError(Text::_('COM_JEM_EVENT_FULL_NOTICE'));
return false;
}
$onwaiting = 1;
}
}
}
I'll check the database but I don't know what to look for really.
Please Log in or Create an account to join the conversation.
Re: Event not found error only on classes
1 day 8 hours ago
By commenting out the three calls and uncommenting till the site worked again I got to around line 163
# Filter by categories
$cats = $this->getCategories('all');
if (!empty($cats)) {
$query->where('c.id IN (' . implode(',', $cats) . ')');
}
# Get the item
//$query->group('a.id');
// if ($error = $db->getErrorMsg()) {
// throw new Exception($error);
// }
try
{
$db->setQuery($query);
$data = $db->loadObject();
}
catch (RuntimeException $e)
{
Factory::getApplication()->enqueueMessage($e->getMessage(), 'notice');
}
if (empty($data)) {
throw new Exception(Text::_('COM_JEM_EVENT_ERROR_EVENT_NOT_FOUND'), 404);
}
# Filter by categories
$cats = $this->getCategories('all');
if (!empty($cats)) {
$query->where('c.id IN (' . implode(',', $cats) . ')');
}
# Get the item
//$query->group('a.id');
// if ($error = $db->getErrorMsg()) {
// throw new Exception($error);
// }
try
{
$db->setQuery($query);
$data = $db->loadObject();
}
catch (RuntimeException $e)
{
Factory::getApplication()->enqueueMessage($e->getMessage(), 'notice');
}
if (empty($data)) {
throw new Exception(Text::_('COM_JEM_EVENT_ERROR_EVENT_NOT_FOUND'), 404);
}
Please Log in or Create an account to join the conversation.
Time to create page: 0.756 seconds