plugin upgrade to 2.2

plugin upgrade to 2.2

by 康 陈 -
Number of replies: 8

I am upgrading a plugin from 1.9 to 2.2. Now ,it can be installed ,but when I create an instance in a course, it always error;

this is the error:

Coding error detected, it must be fixed by a programmer: MFORMS: Coding error, text formats are handled only by new editor element.

More information about this error

Stack trace:
  • line 26 of \lib\form\format.php: coding_exception thrown
  • line 566 of \lib\pear\HTML\QuickForm.php: call to MoodleQuickForm_format->MoodleQuickForm_format()
  • line 602 of \lib\pear\HTML\QuickForm.php: call to HTML_QuickForm->_loadElement()
  • line 30 of \mod\programming\mod_form.php: call to HTML_QuickForm->addElement()
  • line 164 of \lib\formslib.php: call to mod_programming_mod_form->definition()
  • line 71 of \course\moodleform_mod.php: call to moodleform->moodleform()
  • line 256 of \course\modedit.php: call to moodleform_mod->moodleform_mod()
Output buffer: <div class="notifytiny">function moodle_form::setHelpButton() is deprecated<ul style="text-align: left"><li>line 1552 of \lib\formslib.php: call to debugging()</li><li>line 28 of \mod\programming\mod_form.php: call to MoodleQuickForm->setHelpButton()</li><li>line 164 of \lib\formslib.php: call to mod_programming_mod_form->definition()</li><li>line 71 of \course\moodleform_mod.php: call to moodleform->moodleform()</li><li>line 256 of \course\modedit.php: call to moodleform_mod->moodleform_mod()</li></ul></div><div class="notifytiny">The method old_help_icon() is deprecated, please fix the code and use help_icon() method instead<ul style="text-align: left"><li>line 1578 of \lib\outputrenderers.php: call to debugging()</li><li>line 1568 of \lib\formslib.php: call to core_renderer->old_help_icon()</li><li>line 28 of \mod\programming\mod_form.php: call to MoodleQuickForm->setHelpButton()</li><li>line 164 of \lib\formslib.php: call to mod_programming_mod_form->definition()</li><li>line 71 of \course\moodleform_mod.php: call to moodleform->moodleform()</li><li>line 256 of \course\modedit.php: call to moodleform_mod->moodleform_mod()</li></ul></div>
Average of ratings: -
In reply to 康 陈

Re: plugin upgrade to 2.2

by Gopi Nath -

I am also upgrading a custom plugin from 1.9 to 2.2.3.  Also getting the same error as above.

Please provide us a clear documentation for creating custom blocks and module in Moodle 2.2.3.

Thanks in advance.

Gopi

Attachment error.png
In reply to Davo Smith

Re: plugin upgrade to 2.2

by Gopi Nath -

Hi smith,

I have followed the above links, which was updated by you.  Eventhough I getting the following  error  "Plugin "mod_assess" is defective or outdated, can not continue, sorry"

Please guide me to proceed further.  I have attached the screenshot for reference.

Thanks,

Gopi

Attachment error1.png
In reply to Gopi Nath

Re: plugin upgrade to 2.2

by Davo Smith -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Look just underneath the red box and it tells you exactly what is wrong - 'Missing mandatory en language pack'.

Make sure you create:

mod/assess/lang/en/assess.php

And put all your English lanugage strings in there.

Average of ratings: Useful (1)
In reply to Davo Smith

Re: plugin upgrade to 2.2

by Gopi Nath -

I have created the assess.php like you said, language pack error got solved. 
Again i getting the error as "Coding error detected, it must be fixed by a programmer: MFORMS: Coding error, text formats are handled only by new editor element."

Please correct me if i am wrong.  I have attached the screenshots for your reference.

Thanks.

Attachment error.png
In reply to Gopi Nath

Re: plugin upgrade to 2.2

by Davo Smith -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

See my previously posted link about using the form 'editor' element.

In reply to Davo Smith

Re: plugin upgrade to 2.2

by Gopi Nath -

Hi smith,

I have created a new custom block in moodle 2.2.3 as per the coding standard which was given in the documentation. Eventhough, the new custom block is not working, i got the following error.

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

Please guide me ...Thanks in advance..

Attachment error2.png