Closed (cannot reproduce)
Project:
Course
Version:
7.x-1.6
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
10 Aug 2015 at 08:13 UTC
Updated:
18 Oct 2015 at 00:43 UTC
Jump to comment: Most recent
Comments
Comment #2
modimanz commentedI am only getting the second message (line 61), not sure why node->course doesn't exist for you. You could try something similar to line 58, but this may be a symptom of a more serious problem.
Starting at Line 61: I added a check to see if the field was set. Good luck sir.
Comment #3
modimanz commentedIt may be better to change line 61 to do an isset() instead of the initial if(field) then it wouldn't need both, but i haven't looked at the code enough yet to know any more than that I did not want that error. As far as I know the field could have a false state.
Comment #4
modimanz commentedThis function seems to just be blocking the Add to Cart button when required so I don't think this will break anything.
If course is not loading into $node from course_node_load() hook then it is likely the node->nid is not found in the course_node table.
The code below resolves the errors, but again, I don't know the underlying cause.
function course_uc_form_alter
course_uc.module: line 57
Comment #5
modimanz commentedMy problem was corruption in one of my course module files. Updating the modules files fixed my issues.
Comment #6
djdevinGood to hear :)
Comment #7
lu_smithcon commentedI did a clean install and am no longer getting the message either.