General help

 
 
Picture of random hero
Hidden Link - Coding error detected, it must be fixed by a programmer: PHP catchable fatal error
 

Our teachers use a hidden link file to link to their syllabus, course schedules, etc. It has worked fine in the past, but now all of a sudden we are getting the following error. I did update to the latest weekly build of 2.5 yesterday, from the previous weeks build. This jargon means nothing to me, so I would appreciate any help. Thanks.

Coding error detected, it must be fixed by a programmer: PHP catchable fatal error

Debug info: Argument 3 passed to global_navigation::load_activity() must be an instance of navigation_node, boolean given, called in [dirroot]/lib/navigationlib.php on line 1205 and defined
Error code: codingerror
Stack trace:
  • line 406 of /lib/setuplib.php: coding_exception thrown
  • line 2019 of /lib/navigationlib.php: call to default_error_handler()
  • line 1205 of /lib/navigationlib.php: call to global_navigation->load_activity()
  • line 2937 of /lib/navigationlib.php: call to global_navigation->initialise()
  • line 766 of /lib/pagelib.php: call to navbar->has_items()
  • line 4 of /theme/archaius/layout/general.php: call to moodle_page->has_navbar()
  • line 847 of /lib/outputrenderers.php: call to include()
  • line 777 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
  • line ? of unknownfile: call to core_renderer->header()
  • line 1479 of /lib/setuplib.php: call to call_user_func_array()
  • line 79 of /mod/page/view.php: call to bootstrap_renderer->__call()
  • line 79 of /mod/page/view.php: call to bootstrap_renderer->header()
 
Average of ratings: -
Picture of random hero
Re: Hidden Link - Coding error detected, it must be fixed by a programmer: PHP catchable fatal error
 
Still need help.
 
Average of ratings: -
Picture of Steven Cobb
Re: Hidden Link - Coding error detected, it must be fixed by a programmer: PHP catchable fatal error
 

I'm not yet well versed in the core of Moodle, but I'm pretty familiar with PHP and considering no one else has spoke up...I'll see what I can do.

The script is failing to create an object that contains the navigation for the course activities. It fails right at the point of a static method call. There could be some issues with your version of PHP. What version of PHP is your server using?

 
Average of ratings: -
Picture of random hero
Re: Hidden Link - Coding error detected, it must be fixed by a programmer: PHP catchable fatal error
 

PHP Version 5.3.10-1ubuntu3.6

 
Average of ratings: -
Picture of ICB BNE
Re: Hidden Link - Coding error detected, it must be fixed by a programmer: PHP catchable fatal error
 

I aso had same issue and reported it several weeks ago. Since we couldn't reproduce the error case had been closed. If you like you may visit and reopen the case again or vote for it.

https://tracker.moodle.org/browse/MDL-39828

 

 
Average of ratings: -
Picture of random hero
Re: Hidden Link - Coding error detected, it must be fixed by a programmer: PHP catchable fatal error
 

So I took a snapshot of the VM for safety's sake, reinstalled Linux, reinstalled Moodle, restored SQL and moodledata, tried again, and still the same issue. It's become a major problem...

 
Average of ratings: -
Picture of random hero
Re: Hidden Link - Coding error detected, it must be fixed by a programmer: PHP catchable fatal error
 

I thought perhaps it was something in our moodledata folder, or our SQL database, so I reinstalled Linux/Moodle clean, didn't import anything, and tried again, and it still gives me this issue. 

To recreate the issue I make a page within moodle that has some content, copy the URL, hide the page, then make a link to the hidden page within a lable, etc., and as the course's teacher or the moodle admin, the link works, when I change my role to a student, it gives me the PHP errors.

 
Average of ratings: -
Me
Re: Hidden Link - Coding error detected, it must be fixed by a programmer: PHP catchable fatal error
 

Not using 2.5 at the moment, but seems like the catchable error it is objecting to is that You have hidden the file, and expect a student to be able to see it once linked to.

- Is the page you linked to on a topic that is just not seen,
- or is it hidden (made invisible) by clicking the eye for the page or the visibility for the topic it is within?

The second of these would still allow the teacher or admin to view it while stopping the student.

The error should not appear as should be trapped, but I am guessing that you want the student to be able to load the page anyway.

 
Average of ratings: -
Mary Cooch
Re: Hidden Link - Coding error detected, it must be fixed by a programmer: PHP catchable fatal error
Group Documentation writersGroup Moodle Course Creator Certificate holdersGroup Moodle HQGroup Particularly helpful MoodlersGroup TestersGroup Translators

Just for future reference, here is the tracker issue MDL-40329 (not able to replicate it)

 
Average of ratings: -
Picture of Sarah Jane
Re: Hidden Link - Coding error detected, it must be fixed by a programmer: PHP catchable fatal error
 

Hi there - getting the same issue.

Steps to replicate this:

create course and page. hide page but add a link within the topic to the page.

Switch to client mode - error showing

If login as client - you see Sorry, this activity is currently hidden, which Mary says should happen.

I read with interest the tracker above which is now closed but I would still like to be able to create a page, hide the page but link to it the page within the text of a topic. How can this be done?

Sarah x

 
Average of ratings: -
Picture of AL Rachels
Re: Hidden Link - Coding error detected, it must be fixed by a programmer: PHP catchable fatal error
Group DevelopersGroup Particularly helpful MoodlersGroup Testers

Hi Sarah,

The way I do this is to start with one more topic section than I want for the course or for the students to see. I put the activity/activities I want to be hidden in that extra topic section. I then edit the course settings and decrease number of sections by one which will make it totally hidden from students. Admin and teachers will still be able to edit the section as it will show as being orphaned.

Hope this helps,

AL

 
Average of ratings:Useful (1)
Picture of Sarah Jane
Re: Hidden Link - Coding error detected, it must be fixed by a programmer: PHP catchable fatal error
 

Hi there Al

This makes sense. Thank you will try it and see how I get on.

Thanks for responding. Sarah x

 
Average of ratings: -
Picture of Sarah Jane
Re: Hidden Link - Coding error detected, it must be fixed by a programmer: PHP catchable fatal error
 

Hi Al

Works perfectly - thank you x

 
Average of ratings: -
Picture of AL Rachels
Re: Hidden Link - Coding error detected, it must be fixed by a programmer: PHP catchable fatal error
Group DevelopersGroup Particularly helpful MoodlersGroup Testers

Hi Sarah,

You're welcome.

I didn't think to mention it before, but I actually put most of my "hidden" stuff in another course in orphaned topics if I plan on using it in multiple courses. I do not want to have to go to multiple locations to update them when I discover something needs to be changed or modified.

Most of the items are "How-to's" in Books and Wiki's with step-by-step directions on how to do things. I usually include links that will take the student back to their correct course/assignment when they finish the directions. If a student clicks on the wrong link, he gets an error since he is not enrolled there.

AL

 
Average of ratings:Useful (1)
Picture of Sarah Jane
Re: Hidden Link - Coding error detected, it must be fixed by a programmer: PHP catchable fatal error
 

This is a good idea - thank you for sharing x

 
Average of ratings: -