Internal Server Error in Frontend

  • Norman
  • Norman's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 4 months ago #236 by Norman
Norman created the topic: Internal Server Error in Frontend
hello,
i'm using simple calendar for quite some time now, so far with joomla 1.5.x. i know this is very old, thats why i'm currently setting up a new site with joomla 3.1.5 and the latest version of simple calendar. the installation works without any problems and i created two categories and put them in the mainmenu. but when i click on them in the frontend, i get an Internal Server Error.

500 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OR cat.id=11) AND cat.access IN (1,1,5) AND a.state = '1'' at line 6 SQL=SELECT COUNT(*) FROM jos31_simplecalendar as a INNER JOIN jos31_categories AS cat ON a.catid = cat.id LEFT JOIN jos31_simplecalendar_organizers AS org ON a.organizer_id = org.id LEFT JOIN jos31_simplecalendar_statuses AS s ON a.statusid = s.id WHERE (CASE WHEN a.end_dt > a.start_dt THEN a.end_dt ELSE a.start_dt END) >= CAST(CURDATE() AS date) AND (cat.id= OR cat.id=11) AND cat.access IN (1,1,5) AND a.state = '1' You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OR cat.id=11) AND cat.access IN (1,1,5) AND a.state = '1' ORDER BY a.start_dt as' at line 6 SQL=SELECT a.*, cat.id AS catid, cat.alias AS catalias, cat.title AS catname, cat.access AS category_access, org.id AS gid, org.name AS org_name, org.abbr AS org_abbr, org.contact_name AS org_contact_name, org.contact_email AS org_contact_email, org.contact_website AS org_contact_website, org.latlon AS org_latlon, org.contact_telephone AS org_contact_telephone, s.id AS status_id, s.name AS status_name, s.color AS status_color, CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(':', a.id, a.alias) ELSE a.id END AS slug, CASE WHEN CHAR_LENGTH(cat.alias) THEN CONCAT_WS(':', cat.id, cat.alias) ELSE cat.id END AS catslug FROM jos31_simplecalendar as a INNER JOIN jos31_categories AS cat ON a.catid = cat.id LEFT JOIN jos31_simplecalendar_organizers AS org ON a.organizer_id = org.id LEFT JOIN jos31_simplecalendar_statuses AS s ON a.statusid = s.id WHERE (CASE WHEN a.end_dt > a.start_dt THEN a.end_dt ELSE a.start_dt END) >= CAST(CURDATE() AS date) AND (cat.id= OR cat.id=11) AND cat.access IN (1,1,5) AND a.state = '1' ORDER BY a.start_dt asc, a.start_time, a.id You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OR cat.id=11) AND cat.access IN (1,1,5) AND a.state = '1'' at line 6 SQL=SELECT COUNT(*) FROM jos31_simplecalendar as a INNER JOIN jos31_categories AS cat ON a.catid = cat.id LEFT JOIN jos31_simplecalendar_organizers AS org ON a.organizer_id = org.id LEFT JOIN jos31_simplecalendar_statuses AS s ON a.statusid = s.id WHERE (CASE WHEN a.end_dt > a.start_dt THEN a.end_dt ELSE a.start_dt END) >= CAST(CURDATE() AS date) AND (cat.id= OR cat.id=11) AND cat.access IN (1,1,5) AND a.state = '1'


in the apache error-log there is one entry at the same time:

[Thu Aug 08 17:13:38 2013] [error] [client x.x.x.x] PHP Notice: Trying to get property of non-object in /var/www/serv3/www_tv-frankenstein_de/html/components/com_simplecalendar/models/events.php on line 257, referer: www2.tv-frankenstein.de/


i'm not good at php, so any help would be greatly appreciated.
if you would like to see the error yourself, the site is www2.tv-frankenstein.de , then click on "Kalender".
the server is a redhat enterprise linux 6.4 with php-5.3.3 and mysql 5.1.69.

thanks in advance
-norman

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

  • Norman
  • Norman's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 4 months ago #242 by Norman
Norman replied the topic: Internal Server Error in Frontend
nobody?
:(

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

More
4 years 4 months ago - 4 years 3 months ago #244 by andred12
andred12 replied the topic: Internal Server Error in Frontend
Hi Norman,
please search in your Menu-Link to the calendar for the problem.

I had two different entries in the category section - this caused the error.

Please tell me if this works.

Best regards
andre
Last Edit: 4 years 3 months ago by andred12.
The following user(s) said Thank You: Norman

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

  • Norman
  • Norman's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 4 months ago #245 by Norman
Norman replied the topic: Internal Server Error in Frontend
a trillion thanks, that was the solution.
i think this should be improved in upcoming versions, to make it "idiot proof".

thanks again, you made my day!
:-)

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

More
4 years 3 months ago #252 by admin
admin replied the topic: Internal Server Error in Frontend

andred12 wrote: I had two different entrees in the Cathegory Section - this caused the error.


Hi Andre,
first off, thanks for posting the 'solution'. May I ask you more details on what you mean by "two different entries"? The event list may show items from more than one category (or at least this is the way it's meant to be)...

Fabrizio

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

  • Norman
  • Norman's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 3 months ago #255 by Norman
Norman replied the topic: Internal Server Error in Frontend
hi fabrizio

i hope i can explain.
when creating the menu for the frontend, you have to choose the menu type. after choosing "simple calendar", i chose "list view". (i'm using a german joomla, i hope thats the correct name in an english joomla.)
then you have to choose the category of the list.
from the drop-down, i chose "all categories" and then the category i actually wanted, so i had two categories in that field.
after andre's hint, i removed "all categories", and the error in the frontend was gone.
to make it idiot-proof like i said, it should not be possible to put two categories in that field.

thanks a lot

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

Time to create page: 0.289 seconds
Powered by Kunena Forum