-
Bug
-
Resolution: Fixed
-
Minor
-
3.11.11, 4.0.5, 4.0.6, 4.1, 4.1.1
-
PHP 8.0
-
MOODLE_311_STABLE, MOODLE_400_STABLE, MOODLE_401_STABLE
-
MOODLE_400_STABLE, MOODLE_401_STABLE
-
MDL-76725-401 -
Hello,
we have detected a bug in the Wiki module in Moodle 3.11.11 with the NWiki wiki format (same with Creole format). When uploading and adding an image to the wiki page, the following error occurs: "Exception - Unknown named parameter $subwikiid" and does not allow to save the changes. We have checked that this only happens with php8 (8.0.x), if you switch to php7, the problem disappears. It seems to match the problem of this issue.
Stack trace:
|
line 336 of /mod/wiki/parser/markups/wikimarkup.php: Error thrown |
line 329 of /mod/wiki/parser/markups/wikimarkup.php: call to wiki_markup_parser->real_path() |
line 241 of /mod/wiki/parser/markups/nwiki.php: call to wiki_markup_parser->format_image() |
line 252 of /mod/wiki/parser/parser.php: call to nwiki_parser->image_tag_rule() |
line ? of unknownfile: call to generic_parser->tag_callback()
|
line 237 of /mod/wiki/parser/parser.php: call to preg_replace_callback() |
line 228 of /mod/wiki/parser/parser.php: call to generic_parser->process_tag_rule() |
line 197 of /mod/wiki/parser/parser.php: call to generic_parser->rules() |
line ? of unknownfile: call to generic_parser->block_callback()
|
line 177 of /mod/wiki/parser/parser.php: call to preg_replace_callback() |
line 150 of /mod/wiki/parser/parser.php: call to generic_parser->process_block_rule() |
line 60 of /mod/wiki/parser/parser.php: call to generic_parser->parse() |
line 638 of /mod/wiki/locallib.php: call to wiki_parser_proxy::parse() |
line 288 of /mod/wiki/locallib.php: call to wiki_parse_content() |
line 256 of /mod/wiki/locallib.php: call to wiki_refresh_cachedcontent() |
line 2039 of /mod/wiki/pagelib.php: call to wiki_save_page() |
line 1996 of /mod/wiki/pagelib.php: call to page_wiki_save->print_save() |
line 138 of /mod/wiki/edit.php: call to page_wiki_save->print_content() |
Testing instructions:
- Make sure your server are running PHP 8.0.X and Moodle 3.11.11.
- Create a new moodle course.
- Create a new wiki activity: set format to NWiki (force format) and fill required inputs. Leave all other options default.
- Go to "Wiki activity / Files" and upload an image.
- Go to "Wiki activity / Edit" and insert the image you previously uploades from the "Insert an image" dropdown.
- Save.
- Error "Exception - Unknown named parameter $subwikiid" is displayed.
- Expected: Wiki page loads and renders the image.
Same happens with the Creole Wiki format.
Regards
- has been marked as being related by
-
MDL-70920 PHP 8.0: Allows named Parameters; call_user_func_array() with wrong parameter names breaks
-
- Closed
-