General help

Picture of Christos Savva
error/decode_rule_incorrect_name Error


When I am trying to Restore a course or duplicate an activity I get the following error


This problem was created today, yesterday I was able to duplicate activities fine.

Can anyone help me with this problem?


I forgot to mention the Moodle Version

Moodle 2.2+ (Build: 20111223)

Average of ratings: -
Picture of Christos Savva
Re: error/decode_rule_incorrect_name Error

Well it was a plugin issue, I disabled the plugin and now its working

Average of ratings: -
Picture of William Mair
Re: error/decode_rule_incorrect_name Error


Can I ask which plugin caused the problem because I am getting the same error while trying to duplicate an activity?


Average of ratings: -
Picture of William Mair
Re: error/decode_rule_incorrect_name Error

OK, so I found the answer to my problem and thought I'd share in case someone else comes across it.

My issue was with a plugin that I had created by copying an existing one and changing the name through all the files.

The error was caused by the setting FEATURE_BACKUP_MOODLE2 being set to true on the lib.php file of my plugin and although that was correct, I realised it was something erroring in the backup/restore process.

In the backup_<pluginname>_activity_task.class.php and the restore_<pluginname>_activity_task.class.php files, when I had done a Find/Replace it had replaced the VIEWBYID preg_replace (in backup) and in the new restore_decode_rule code (in restore) to lowercase <pluginname> rather than uppercase.

Setting this to all uppercase worked and fixed my problem.

Hope that makes sense to anyone who comes across this.

Average of ratings:Useful (2)
C'est moi :-)
Re: error/decode_rule_incorrect_name Error
Group Documentation writersGroup Particularly helpful MoodlersGroup TestersGroup Translators


Thanks for your usefull message : It helped me to find that i had the same error in one of my plugins (compilatioassignment), and correct it smile

In a unix command line, you can type this to find faulting mod plugins :

grep "VIEWBYID" mod/*/backup/moodle2/*_activity_task.class.php


Average of ratings: -
Picture of Irith Herman
תשובה ל: Re: error/decode_rule_incorrect_name Error

Hi I have got the same problem!

Error code: decode_rule_incorrect_name
$a contents: qpracticeVIEWBYID
how can I know which plugi is incorrect?


Average of ratings: -