Author Topic: 500 Internal Server Error When Trying To View Event Properties  (Read 15682 times)

counterpower

  • Newbie
  • *
  • Posts: 9
    • View Profile
Hi, I just upgraded to 1.3 stable and, after creating an event, I cannot bring up the event properties by clicking on it in the calendar. I can view properties and edit events that were created before the upgrade.

If I paste in the correct url string to edit the broken event that screen comes up successfully.

Please help!

I have attached a screenshot of the error.

ignacio

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
Re: 500 Internal Server Error When Trying To View Event Properties
« Reply #1 on: March 18, 2009, 06:55:49 pm »
Set DEBUG to true in config/config.php so that you can get a more descriptive error message.

afro

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: 500 Internal Server Error When Trying To View Event Properties
« Reply #2 on: March 19, 2009, 03:24:59 am »
I have the same kind of "500 error" since the update from a 1.2.1 to the 1.3.
But i meet it when saving the creation of an event. Nothing is created and after having set the DEBUG on true, here is the error :

Code: [Select]
Fatal error: Call to undefined method ObjectReminders::clearbyobjectanduser() in /.../application/models/ProjectDataObject.class.php on line 1445
Any idea ?

Thank you

ignacio

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
Re: 500 Internal Server Error When Trying To View Event Properties
« Reply #3 on: March 19, 2009, 11:10:33 am »
Check file 'application/models/object_reminders/ObjectReminders.class.php' and see if there's a line that starts with "static function clearByObjectAndUser" (there should be one).

counterpower

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: 500 Internal Server Error When Trying To View Event Properties
« Reply #4 on: March 19, 2009, 12:16:10 pm »
Set DEBUG to true in config/config.php so that you can get a more descriptive error message.

The error reads as:
Code: [Select]
Fatal error: Call to a member function hasProjectPermission() on a non-object in /.../application/views/event/viewevent.php on line 134
« Last Edit: March 20, 2009, 10:41:22 am by counterpower »

afro

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: 500 Internal Server Error When Trying To View Event Properties
« Reply #5 on: March 20, 2009, 06:54:54 am »
After having checked that file from the 1.3 I downloaded, there is no "static function clearByObjectAndUser" at all.

The only line where clearByObjectAndUser is mentionned is that line 1445 starting by return ObjectReminders... situated in the part starting from l.1443 "function clearReminders"

I suppose something is missing in the code.

counterpower

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: 500 Internal Server Error When Trying To View Event Properties
« Reply #6 on: March 20, 2009, 10:38:03 am »
After having checked that file from the 1.3 I downloaded, there is no "static function clearByObjectAndUser" at all.

The only line where clearByObjectAndUser is mentionned is that line 1445 starting by return ObjectReminders... situated in the part starting from l.1443 "function clearReminders"

I suppose something is missing in the code.

I *did* find that code in my install on line 104, but our errors are indicating different files for our respective culprits.

Ignacio, is there anything I should check for in /application/views/event/viewevent.php  ?

Thanks for your help and this great application.

Loran

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: 500 Internal Server Error When Trying To View Event Properties
« Reply #7 on: March 21, 2009, 05:27:32 pm »
I have the same problem.

ignacio

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
Re: 500 Internal Server Error When Trying To View Event Properties
« Reply #8 on: March 23, 2009, 09:54:30 am »
There are two separate errors

Afro, to fix yours try downloading again or replacing file ObjectReminders.class.php. There must have been a problem when you uploaded version 1.3.


ignacio

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
Re: 500 Internal Server Error When Trying To View Event Properties
« Reply #9 on: March 23, 2009, 09:56:03 am »
Counterpower, try changing line 134 of 'application/views/event/viewevent.php' from:
Code: [Select]
if ($inv_user->hasProjectPermission($event->getProject(), ProjectUsers::CAN_READ_EVENTS)) {
to:
Code: [Select]
if ($inv_user instanceof User && $inv_user->hasProjectPermission($event->getProject(), ProjectUsers::CAN_READ_EVENTS)) {

Loran

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: 500 Internal Server Error When Trying To View Event Properties
« Reply #10 on: March 23, 2009, 10:33:12 am »
This modyfication helps with problem but invotations didn't work now.

counterpower

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: 500 Internal Server Error When Trying To View Event Properties
« Reply #11 on: March 23, 2009, 03:09:13 pm »
This modyfication helps with problem but invotations didn't work now.

It's true. I can view events properly now, but event invitations are not stored in the event. I try inviting people, it says it's successful, but when I go back into the event all the invitations are unchecked. Please let us know if there's anything else we can help with to solve this bug. Thanks!

robertpetersen

  • Newbie
  • *
  • Posts: 39
    • View Profile
    • Konweb.dk
Re: 500 Internal Server Error When Trying To View Event Properties
« Reply #12 on: March 26, 2009, 06:19:36 pm »
Any news here? I have exactly the same error

Fatal error: Call to a member function hasProjectPermission() on a non-object in /var/www/vhosts/firedog.dk/httpdocs/application/views/event/viewevent.php on line 134

Have been following all the advices..
now the error is this:

Fatal error: Call to a member function getEmail() on a non-object in /var/www/vhosts/firedog.dk/httpdocs/application/models/notifier/Notifier.class.php on line 411
« Last Edit: March 26, 2009, 06:29:22 pm by robertpetersen »
Best Regards, Robert

vzk

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: 500 Internal Server Error When Trying To View Event Properties
« Reply #13 on: March 27, 2009, 04:28:26 am »
+ 1 for me.
Testing on a local MAMP installation on MacOSX 10.5.6

The debug error message is:
Code: [Select]
Fatal error: Call to a member function hasProjectPermission() on a non-object in /Users/volker/Sites/opengoo/application/views/event/viewevent.php on line 134

ignacio

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
Re: 500 Internal Server Error When Trying To View Event Properties
« Reply #14 on: March 27, 2009, 10:52:30 am »
Try updating to 1.3.1. It should fix this problem.