moodleou / moodle-mod_oublog

Alternative blog module for Moodle 2 (including course blogs)
31 stars 29 forks source link

Recursive error attempting to add instance on M31 with debug enabled #66

Closed logan-reynolds closed 7 years ago

logan-reynolds commented 8 years ago

I realize this module is not yet officially released for Moodle 3.1 yet, but just wanted to identify the following problem I saw when testing with debug on in a M3.1 site which caused severe browser slowdown. In attempting to add instance to course with debug on I get the following error which is only partial output (result produced a 7.5MB text file of array values from backtrace):

QuickForm Error: element already exists Element 'tags' already exists in HTML_QuickForm::addElement() Backtrace : Array ( [0] => Array ( [file] => /mnt/code/www/moodle_sand/lib/pear/HTML/QuickForm.php [line] => 1991 [function] => __construct [class] => PEAR_Error [type] => -> [args] => Array ( [0] => element already exists [1] => -6 [2] => 16 [3] => pear_handle_error [4] => Element 'tags' already exists in HTML_QuickForm::addElement() ) ) [1] => Array ( [file] => /mnt/code/www/moodle_sand/lib/pear/PEAR.php [line] => 543 [function] => __construct [class] => HTML_QuickForm_Error [object] => HTML_QuickForm_Error Object ( [error_message_prefix] => QuickForm Error: [mode] => 16 [level] => 1024 [code] => -6 [message] => element already exists [userinfo] => Element 'tags' already exists in HTML_QuickForm::addElement() [backtrace] => Array RECURSION [callback] => pear_handle_error ) [type] => -> [args] => Array ( [0] => -6 [1] => 16 [2] => pear_handle_error [3] => Element 'tags' already exists in HTML_QuickForm::addElement() ) )

mtpmcdermott commented 7 years ago

There appear to be a few conflicts between the OUBlog Tag feature and the Moodle Core usetags feature. When usetags is enabled duplicate tag headings are shown when adding the OUBlog as an activity:

duplicatetagheadings

OUBlog is using the same field names as the core tags which causes the second tag section to be blank. When debug notifications are enabled the message reported in this issue is shown.

I suspect that the lack of compatibility between the OUBlog tags and the Moodle Core tags is also responsible for issues #69 and #64.

Ultimately, I don't think these systems can or should play well together. There shouldn't be two way to tag the same thing. It'll be up to OU to decide if they way to keep the OUBlog tagging system or remove it in favor of the core Moodle tagging.

If it is decided to keep the OUBlog tagging, then Moodle Core will need to be updated to allow Activities to opt-out of the usetags feature.

jason-platts commented 7 years ago

Fixed on master...