Skip to content

Error loading plugin dokuwiki/plugin/gallery/classes/BasicFormatter #181

@uninvolving

Description

@uninvolving

Hello

I have a found an issue with using the plugin's most basic use case with my configuration. When I simply put {{gallery>:namespace}} in a page, I receive an error in preview. When publishing changes, the entire page breaks. The error in my logs when I try to preview is:

2023-09-15 19:59:57ParseError: syntax error, unexpected 'Options' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)/var/www/html/dokuwiki/lib/plugins/gallery/classes/BasicFormatter.php(14)
    #0 [internal function]: load_autoload('dokuwiki/plugin...')
    #1 /var/www/html/dokuwiki/lib/plugins/gallery/classes/XHTMLFormatter.php(5): spl_autoload_call('dokuwiki\\plugin...')
    #2 /var/www/html/dokuwiki/inc/load.php(112): require('/var/www/html/d...')
    #3 [internal function]: load_autoload('dokuwiki/plugin...')
    #4 /var/www/html/dokuwiki/lib/plugins/gallery/syntax/main.php(95): spl_autoload_call('dokuwiki\\plugin...')
    #5 /var/www/html/dokuwiki/inc/parser/renderer.php(119): syntax_plugin_gallery_main->render('xhtml', Object(Doku_Renderer_xhtml), Array)
    #6 /var/www/html/dokuwiki/inc/parserutils.php(700): Doku_Renderer->plugin('gallery_main', Array, 5, '{{gallery>:name...')
    #7 /var/www/html/dokuwiki/inc/Ui/PageView.php(56): p_render('xhtml', Array, NULL)
    #8 /var/www/html/dokuwiki/inc/Action/Preview.php(29): dokuwiki\Ui\PageView->show()
    #9 /var/www/html/dokuwiki/inc/template.php(100): dokuwiki\Action\Preview->tplContent()
    #10 [internal function]: tpl_content_core('preview')
    #11 /var/www/html/dokuwiki/inc/Extension/Event.php(133): call_user_func_array('tpl_content_cor...', Array)
    #12 /var/www/html/dokuwiki/inc/Extension/Event.php(199): dokuwiki\Extension\Event->trigger('tpl_content_cor...', true)
    #13 /var/www/html/dokuwiki/inc/template.php(85): dokuwiki\Extension\Event::createAndTrigger('TPL_ACT_RENDER', 'preview', 'tpl_content_cor...')
    #14 /var/www/html/dokuwiki/lib/tpl/dokuwiki/main.php(61): tpl_content()
    #15 /var/www/html/dokuwiki/inc/actions.php(27): include('/var/www/html/d...')
    #16 /var/www/html/dokuwiki/doku.php(126): act_dispatch()
    #17 {main}
2023-09-15 19:59:57E_ERROR: Class 'dokuwiki\plugin\gallery\classes\BasicFormatter' not found/var/www/html/dokuwiki/lib/plugins/gallery/classes/XHTMLFormatter.php(5)
    #0 [internal function]: dokuwiki\ErrorHandler::fatalShutdown()
    #1 {main}

And when trying to view the page after publishing:

    2023-09-15 19:55:50ParseError: syntax error, unexpected 'Options' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)/var/www/html/dokuwiki/lib/plugins/gallery/classes/BasicFormatter.php(14)
    #0 [internal function]: load_autoload('dokuwiki/plugin...')
    #1 /var/www/html/dokuwiki/lib/plugins/gallery/syntax/main.php(97): spl_autoload_call('dokuwiki\\plugin...')
    #2 /var/www/html/dokuwiki/inc/parser/renderer.php(119): syntax_plugin_gallery_main->render('metadata', Object(Doku_Renderer_metadata), Array)
    #3 /var/www/html/dokuwiki/inc/parserutils.php(540): Doku_Renderer->plugin('gallery_main', Array, 5, '{{gallery>:test...')
    #4 /var/www/html/dokuwiki/inc/parserutils.php(299): p_render_metadata('playground:play...', Array)
    #5 /var/www/html/dokuwiki/inc/common.php(266): p_get_metadata('playground:play...')
    #6 /var/www/html/dokuwiki/doku.php(97): pageinfo()
    #7 {main}
2023-09-15 19:55:50Error: Class 'dokuwiki\plugin\gallery\classes\BasicFormatter' not found/var/www/html/dokuwiki/lib/plugins/gallery/syntax/main.php(97)
    #0 /var/www/html/dokuwiki/inc/parser/renderer.php(119): syntax_plugin_gallery_main->render('metadata', Object(Doku_Renderer_metadata), Array)
    #1 /var/www/html/dokuwiki/inc/parserutils.php(540): Doku_Renderer->plugin('gallery_main', Array, 5, '{{gallery>:test...')
    #2 /var/www/html/dokuwiki/inc/parserutils.php(299): p_render_metadata('playground:play...', Array)
    #3 /var/www/html/dokuwiki/inc/common.php(266): p_get_metadata('playground:play...')
    #4 /var/www/html/dokuwiki/doku.php(97): pageinfo()

I am using version 2023-09-13, which I installed through the extension manager, and my version of DokuWiki is Release 2023-04-04 "Jack Jackrum".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions