Closed dasistwas closed 3 years ago
also there are some styling issues, but maybe due to custom css.
The id shown in the debug is a workshop id not a book id: mod/workshop/view.php?id=131534
@dasistwas Odd. Stack trace and code reads like a core issue. Need to think of how can be fixed in theme and why does not affect Boost.
@dasistwas Given https://www.php.net/manual/en/function.call-user-func-array.php what version of PHP are you running please?
7.4
@dasistwas Thank you. I believe I've fixed it with https://github.com/Wunderbyte-GmbH/moodle-theme_squared/commit/fbfef7be95708a7648313e6b4b3fd1551f589e2a. I've tested with both the Workshop and Book activities. Please pull from 'master' of Squared and test. It's an oddity whereby the code documentation say its a string, when rather it is an array of strings when called from Workshop's view.php on line 564 as stated in the stack trace. The magic 'call' is decoding the parameter array correctly and assigning the relevant order for the parameter list, its just that 'classes' is being passed an array by Mod Workshop when it should not, hence core code has the call to 'renderer_base::prepare_classes' before it does anything with it, and it has a 'is_array' check that when true, 'impodes' the array into a string with a space as a delimiter.
@gjb2048 great analysis of the problem. The fix solved the problem. Thank you.
When I open the workshop activity, I get this error:
Error does not appear when using theme boost with same activity.