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

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

by rupamoy bhattacharya -
Number of replies: 12

Hi,

I'm using moodle 2.6 (Build: 20131118) in Windows 2008 R2 platform with Mysql server 5.1.73-community-log where during course enrollment of students getting the following error. But for Administrators there is no such error. Have checked course enrollment settings and that seems ok.

 

Does anyone have any idea how to get rid of this error.

Thanks in advance.

 

regards,

Rupamoy Bhattacharya

Attachment Capture.JPG
Average of ratings: -
In reply to rupamoy bhattacharya

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

by rupamoy bhattacharya -

Hi,

 

Still waiting for your suggestions.

 

Regards,

Rupamoy Bhattacharya

In reply to rupamoy bhattacharya

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

by Pieter van der Hijden -

IMHO this message also appears when some data seem te be corrupt.

My suggestion would be:

  1. Backup the course including everything.
  2. Restore the course as a fresh copy.
  3. Hopefully the problem has been solved in the copied course. If not, the error message might be more meaningful.
  4. If solved, you can delete the original course and continue to work with the copy.
In reply to Pieter van der Hijden

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

by rupamoy bhattacharya -

Hi,

 

Thanks for the information you provided, but already this workaround is implemented but in some cases it is not working. We are try to fetch more information by putting on debugging mode.

 

If something more you have about this kindly communicate.

 

Regards,

Rupamoy Bhattacharya

In reply to rupamoy bhattacharya

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

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Start by turning on debugging and see if it gives you more information. 

In reply to Emma Richardson

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

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Let us know what messages debugging turns up.  What kind of enrollment are you using?  Have you checked permissions?  

In reply to Emma Richardson

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

by rupamoy bhattacharya -

Hi Emma,

 

Yes, I have checked the permissions and it is OK. I'm using self enrollment. This issue is not occuring for all the courses, for few only. I'm getting the following error after debugging on.

 

Have checked in org and other sources, suggestions are to handle null values . Tried but not working , also not such confident about the fix.

Do you have any clues.

 

Regards,

Rupamoy Bhattacharya

 

 

Attachment Capture.JPG
In reply to rupamoy bhattacharya

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

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Ok, so you have now established that this is not an enrollment issue, there is something wrong with those causes.  The error message is pointing to your Quickcourselist block.  Is this block only in those courses?  Try disabling the block site wide or at least removing it from the offending courses and see if enrollment works correctly.  If so, then you have your problem - I would try upgrading or reinstalling the block.  Could be that it is just not compatible with this version of Moodle and you might have to leave it uninstalled for a while.

In reply to Emma Richardson

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

by rupamoy bhattacharya -

Yess.. I was also in such a thought.. will try and let you update.

Thanks for replying smile

In reply to rupamoy bhattacharya

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

by rupamoy bhattacharya -

Hi,

Removing quickcourselist block does not work.. Got some clue in another site, like..

a very simple fix and general good practice that you should always initialize your object before you try to set a property. The very simple fix for this is simply to add a new StdClass; call right before the error with the variable it is trying to access.

$items[$i] = new StdClass;
$items[$i]->title   = $crs_post_title;

But not able to implement this code in moodle.

 

Regards,

Rupamoy Bhattacharya

 

 

 

 

In reply to rupamoy bhattacharya

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

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Before you start trying to hack the code, I still think you should try and remove the problem.  Are you still getting the same error referring to the quick list block?  Have you tried uninstalling it altogether?

In reply to Emma Richardson

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

by rupamoy bhattacharya -

yes problem is still there.. I have deactivated block but not uninstalled the same.. Ook.. I'll try reinstalling the same and let you update..

Re-installation is better option rather hacking the code.

In reply to rupamoy bhattacharya

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

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Uninstall totally, test with block uninstalled.  If enrollment now works, try reinstalling.  If problem reoccurs, you will need to wait for updates or contact developer of block and uninstall block until resolution is found.