Hi, When using PHP 8.2 FastCGI or PHP 8.0 FastCGI with a new virgin install of DokuWiki version "2023-04-04a Jack Jackrum" with latest code from https://github.com/tstaerk/mediasyntax, I get the following error:
Error: Attempt to assign property "toplevel_id" on null
An unforeseen error has occured. This is most likely a bug somewhere. It might be a problem in the mediasyntax plugin.
More info has been written to the DokuWiki error log.
If I switch back to using PHP 7.4 FastCGI the problem disappears.
Weirdly, on one of my 10 different DokuWiki websites, It seems to have solved itself by switching back and forth 2 times on my ISP from PHP 8.2 to 7.4 and then back again to 8.2. Maybe the ISP had some problem with their PHP upgrade process? But on my website https://www.ayurvedic.io/doku.php?id=start&do=admin&page=extension&tab=search&q=mediasyntax when I install the MediaSyntax plugin, I get the same error of: Attempt to assign property "toplevel_id" on null". Switching back and forth between ISP PHP versions 7.4 and 8.2 is NOT solving it.
Here is my DokuWiki error log from LogViewer:
2023-05-21 23:24:28
Error: Attempt to assign property "toplevel_id" on null
/home/a7j5do2x9y5qkr8v2k/devopscloud.io/lib/plugins/mediasyntax/action.php(71)
#0 /home/a7j5do2x9y5qkr8v2k/devopscloud.io/inc/Extension/EventHandler.php(80): action_plugin_mediasyntax->handle_parser(Object(dokuwiki\Extension\Event), NULL)
#1 /home/a7j5do2x9y5qkr8v2k/devopscloud.io/inc/Extension/Event.php(74): dokuwiki\Extension\EventHandler->process_event(Object(dokuwiki\Extension\Event), 'BEFORE')
#2 /home/a7j5do2x9y5qkr8v2k/devopscloud.io/inc/Extension/Event.php(132): dokuwiki\Extension\Event->advise_before(false)
#3 /home/a7j5do2x9y5qkr8v2k/devopscloud.io/inc/Extension/Event.php(199): dokuwiki\Extension\Event->trigger(NULL, false)
#4 /home/a7j5do2x9y5qkr8v2k/devopscloud.io/inc/parser/handler.php(137): dokuwiki\Extension\Event::createAndTrigger('PARSER_HANDLER_...', Object(Doku_Handler))
#5 /home/a7j5do2x9y5qkr8v2k/devopscloud.io/inc/Parsing/Parser.php(123): Doku_Handler->finalize()
#6 /home/a7j5do2x9y5qkr8v2k/devopscloud.io/inc/parserutils.php(234): dokuwiki\Parsing\Parser->parse('\n==Denmark==\n\nR...')
#7 /home/a7j5do2x9y5qkr8v2k/devopscloud.io/inc/parserutils.php(198): p_get_instructions('==Denmark==\n\nRe...')
#8 /home/a7j5do2x9y5qkr8v2k/devopscloud.io/inc/parserutils.php(525): p_cached_instructions('/home/a7j5do2x..', false, 'denmark')
#9 /home/a7j5do2x9y5qkr8v2k/devopscloud.io/inc/parserutils.php(299): p_render_metadata('denmark', Array)
#10 /home/a7j5do2x9y5qkr8v2k/devopscloud.io/inc/common.php(266): p_get_metadata('denmark')
#11 /home/a7j5do2x9y5qkr8v2k/devopscloud.io/doku.php(97): pageinfo()
#12 {main}
P.S. I also posted here: https://github.com/tstaerk/mediasyntax/issues/31