Installing and upgrading help

code error : (mod_hsuforum\task\cron_task),Coding error detected, it must be fixed by a programmer: Function cron_setup_user() cannot be used in normal requests!

 
Picture of Eugene Passofaro
code error : (mod_hsuforum\task\cron_task),Coding error detected, it must be fixed by a programmer: Function cron_setup_user() cannot be used in normal requests!
 

Hi, I upgraded my moodle to 3.3 and now the cron tasks in the forums/advanced/moodlerooms/ gives this coding error. 

The others tasks work well.

Thanks!

Eugene 


 
Average of ratings: -
Picture of Howard Miller
Re: code error : (mod_hsuforum\task\cron_task),Coding error detected, it must be fixed by a programmer: Function cron_setup_user() cannot be used in normal requests!
Core developersDocumentation writersParticularly helpful MoodlersPlugin developers

mod_hsuforum is not part of core Moodle. I'm not familiar with the plugin - it's some Moodlerooms development I assume?

Are you sure this optional plugin is compatible with Moodle 3.3

 
Average of ratings: -
Picture of Eugene Passofaro
Re: code error : (mod_hsuforum\task\cron_task),Coding error detected, it must be fixed by a programmer: Function cron_setup_user() cannot be used in normal requests!
 

The error message for normal Moodle forum:


(mod_forum\task\cron_task),Coding error detected, it must be fixed by a programmer: Function cron_setup_user() cannot be used in normal requests!

 
Average of ratings: -
Picture of Howard Miller
Re: code error : (mod_hsuforum\task\cron_task),Coding error detected, it must be fixed by a programmer: Function cron_setup_user() cannot be used in normal requests!
Core developersDocumentation writersParticularly helpful MoodlersPlugin developers

This? - MDL-60514

 
Average of ratings: -
Picture of Eugene Passofaro
Re: code error : (mod_hsuforum\task\cron_task),Coding error detected, it must be fixed by a programmer: Function cron_setup_user() cannot be used in normal requests!
 

That looks like it. 

Thanks Howard,

Now what exactly to do? 


Eugene


 
Average of ratings: -
Picture of Howard Miller
Re: code error : (mod_hsuforum\task\cron_task),Coding error detected, it must be fixed by a programmer: Function cron_setup_user() cannot be used in normal requests!
Core developersDocumentation writersParticularly helpful MoodlersPlugin developers

Good question sad

There is a patch in the works - https://integration.moodle.org/job/Precheck%20remote%20branch/57214/artifact/work/patchset.diff

It should hopefully find its way into a release soon. Failing that, you could apply the patch.

 
Average of ratings: -
Picture of Eugene Passofaro
Re: code error : (mod_hsuforum\task\cron_task),Coding error detected, it must be fixed by a programmer: Function cron_setup_user() cannot be used in normal requests!
 

I don't mind giving it a try.  Where do I paste it in?   file etc. 


Eugene

 
Average of ratings: -
Picture of Eugene Passofaro
Re: code error : (mod_hsuforum\task\cron_task),Coding error detected, it must be fixed by a programmer: Function cron_setup_user() cannot be used in normal requests!
 

Hi Howard,


  Here is another message on the notifications page:

The following plugins in your system are using Events 1 API deprecated handlers: 'block_moodletxt, local_messageprovider'. Please, update them to use Events 2 API. See https://docs.moodle.org/dev/Event_2#Event_dispatching_and_observers.


Eugene

 
Average of ratings: -