Author Topic: 1.4.2: Fatal error: Call to a member function getCardUrl()...  (Read 5105 times)

Karl

  • Sr. Member
  • ****
  • Posts: 339
    • ICQ Messenger - 464979879
    • View Profile
"Fatal error: Call to a member function getCardUrl() on a non-object in /home/mydomain.tld/public_html/application/views/milestone/view.php on line 135"

I deleted a user. After this deletion I can not open some tasks and milestones. I always get the above error.

How can I get access to these milestones?

Karl

  • Sr. Member
  • ****
  • Posts: 339
    • ICQ Messenger - 464979879
    • View Profile
Re: 1.4.2: Fatal error: Call to a member function getCardUrl()...
« Reply #1 on: July 01, 2009, 11:37:31 am »
Any ideas in this case?

Pet

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 638
  • Always mining for solutions!
    • View Profile
    • The Bet!
Re: 1.4.2: Fatal error: Call to a member function getCardUrl()...
« Reply #2 on: July 06, 2009, 03:12:27 am »
Karl, I'm just doing some wild guessing, but have you tried re-creating the user you deleted, so that you can access the tasks and milestones?  Perhaps you can then reassign them.
Support OpenGoo - Sponsor a Feature! | Follow me on Twitter | OG Support Chat | Did you turn debugging on?

ignacio

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
Re: 1.4.2: Fatal error: Call to a member function getCardUrl()...
« Reply #3 on: July 09, 2009, 05:03:23 pm »
Hi Karl,

Change line 135 for:

Code: [Select]
$content .= '<span class="taskCompletedOnBy">(' .lang('completed on by', format_date($task->getCompletedOn()), $task->getCompletedBy() instanceof User ? $task->getCompletedBy()->getCardUrl() : '#', $task->getCompletedBy() instanceof User ? clean($task->getCompletedBy()->getDisplayName()) : lang('n/a')) . ')</span>
Basically, what this change does is first checking if the task is completed by a user and if it is then it gets the user's info. We have now scheduled an app-wide test searching for this kind of bug, trying to access a deleted user.

Thanks.