Needs work
Project:
Course
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Mar 2013 at 17:24 UTC
Updated:
7 Nov 2013 at 22:51 UTC
Jump to comment: Most recent
I receive these messages for each course node content since a install the latest dev version.
Notice : Trying to get property of non-object in CourseObjectNode->optionsForm() (ligne 1176 in course_object.core.inc).
Notice : Trying to get property of non-object dans CourseObjectNode->getEditUrl() (ligne 1087 in course_object.core.inc).
Thanks for your help!
Simon
Comments
Comment #1
SimonMartineau commentedI understand why I received these messages: I deleted the object reffered by the outline so course can't get information about them. I think something have to be done to manage this kind of situation (deleted indication in the content line in the outline?).
Thanks.
Comment #2
djdevinThanks, yes it is trying to create a link to the node.
Comment #3
SimonMartineau commentedComment #4
djdevinLeaving this open - it's a bug so it should be fixed :)
Comment #5
djdevinWe need to think about this one.
When a node is deleted that is part of a course, what should happen?
1) Block the deletion
2) Delete the course object
3) Set the instance to 0 (which would cause a new node to be created on course save)
4) Find some other way to have a "broken" course node object
Comment #6
djdevinComment #7
djdevinComment #8
joshmmo commentedI would hesitate to just delete the course object because a user might accidentally delete a page which is linked and then wonder why the object is not working (if they have a large amount of content). I would display a message on the object list saying it was deleted and ask if the user wants to delete the object.
But I yet have been able to find a delete object button anywhere.... =(
Comment #9
djdevinThe way you delete an object is to go into its settings, then check 'Delete' and save the object. Then when you save the course it is deleted.
Comment #10
joshmmo commentedThanks,
Such an odd way to delete something.
Comment #11
djdevinHaha, I know.
The reasoning behind it is that you can't immediately delete a course object (the course outline is stored temporarily, similar to the ways Views displays and other Drupal modules behave) so you have to mark it as deleted first.
Ideally there would be a delete button on the course outline that would do the same thing.
Comment #12
djdevinOh, the other reason why is because if you delete a course object you are presented with another option to delete the linked content.
Comment #13
djdevin