Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning when using shortcode on frontpage #7

Open
dasistwas opened this issue Sep 11, 2024 · 2 comments
Open

Warning when using shortcode on frontpage #7

dasistwas opened this issue Sep 11, 2024 · 2 comments

Comments

@dasistwas
Copy link

I am on Moodle 4.1 and am using a shortcode on the frontpage. There is this message popping up.

Subplugin type "workshopallocation" should define class "\mod_workshop\plugininfo\workshopallocation"

    line 463 of /lib/classes/plugin_manager.php: call to debugging()
    line 403 of /lib/classes/plugin_manager.php: call to core_plugin_manager::resolve_plugininfo_class()
    line 655 of /lib/classes/plugin_manager.php: call to core_plugin_manager->get_plugins_of_type()
    line 101 of /filter/shortcodes/classes/local/registry/plugin_registry.php: call to core_plugin_manager->get_plugin_info()
    line 136 of /filter/shortcodes/classes/local/registry/plugin_registry.php: call to filter_shortcodes\local\registry\plugin_registry->fetch_definitions()
    line 75 of /filter/shortcodes/classes/local/registry/plugin_registry.php: call to filter_shortcodes\local\registry\plugin_registry->init()
    line 67 of /filter/shortcodes/classes/local/processor/standard_processor.php: call to filter_shortcodes\local\registry\plugin_registry->get_handler()
    line 234 of /filter/shortcodes/lib/helpers.php: call to filter_shortcodes\local\processor\standard_processor->filter_shortcodes\local\processor\{closure}()
    line 79 of /filter/shortcodes/classes/local/processor/standard_processor.php: call to filter_shortcodes_process_text()
    line 98 of /filter/shortcodes/classes/local/processor/standard_processor.php: call to filter_shortcodes\local\processor\standard_processor->internal_process()
    line 57 of /filter/shortcodes/filter.php: call to filter_shortcodes\local\processor\standard_processor->process()
    line 515 of /lib/filterlib.php: call to filter_shortcodes->filter()
    line 188 of /lib/filterlib.php: call to moodle_text_filter->filter_stage_post_clean()
    line 230 of /lib/filterlib.php: call to filter_manager->apply_filter_chain()
    line 1359 of /lib/weblib.php: call to filter_manager->filter_text()
    line 95 of /course/format/classes/output/local/content/section/summary.php: call to format_text()
    line 76 of /course/format/classes/output/local/content/section/summary.php: call to core_courseformat\output\local\content\section\summary->format_summary_text()
    line 145 of /course/format/classes/output/local/content/section.php: call to core_courseformat\output\local\content\section\summary->export_for_template()
    line 92 of /course/format/classes/output/local/content/frontpagesection.php: call to core_courseformat\output\local\content\section->export_for_template()
    line 504 of /lib/outputrenderers.php: call to core_courseformat\output\local\content\frontpagesection->export_for_template()
    line 108 of /course/format/classes/output/section_renderer.php: call to plugin_renderer_base->render()
    line 2195 of /course/renderer.php: call to core_courseformat\output\section_renderer->render()
    line 132 of /index.php: call to core_course_renderer->frontpage_section1()

Somehow it looks like workshopallocation is considered as a subplugin, but there is only these subplugins:
workshopallocation_manual
workshopallocation_random
workshopallocation_scheduled

@dasistwas
Copy link
Author

This message only appears immediately after "Purge caches" is being done. Otherwise the code is not executed.

@FMCorz
Copy link
Member

FMCorz commented Sep 11, 2024

Hi @dasistwas,

That's rather odd. The error seems to indicate that Moodle in unable to locate the class in the file mod/workshop/plugininfo/workshopallocation, which is triggered by core itself. As you stated, this is solved once the cache have reset, which leaves us wondering whether shortcodes is creating an odd circular dependencing causing classes to be unknown at that particular moment.

We will look into it, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants