Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-84336

AI placement errors when enabled provider doesn't implement all actions

XMLWordPrintable

    • 1
    • Team Hedgehogs 2025 Sprint 1.1

      Experimenting with AI providers for my project week, I discovered that if the enable provider instance doesn't implement every placement action (generate text, generate image, summarise text) then when using the AI placements administration UI the following errors are observed and you can never view the settings for each action:

      Warning: Undefined array key "core_ai\aiactions\generate_image" in /var/www/html/ai/classes/manager.php on line 312
       
      Warning: Trying to access array offset on value of type null in /var/www/html/ai/classes/manager.php on line 312
       
      Exception - core_ai\manager::is_provider_action_enabled(): Return value must be of type bool, null returned
       
      More information about this error
      Debug info:
      Error code: generalexceptionmessage
      Stack trace:
       
          line 312 of /ai/classes/manager.php: TypeError thrown
          line 327 of /ai/classes/manager.php: call to core_ai\manager->is_provider_action_enabled()
          line 88 of /ai/classes/manager.php: call to core_ai\manager->is_action_enabled()
          line 347 of /ai/classes/manager.php: call to core_ai\manager->get_providers_for_actions()
          line 141 of /ai/classes/table/aiplacement_action_management_table.php: call to core_ai\manager->is_action_available()
          line 833 of /lib/table/classes/flexible_table.php: call to core_ai\table\aiplacement_action_management_table->col_namedesc()
          line 218 of /ai/classes/table/aiplacement_action_management_table.php: call to core_table\flexible_table->format_row()
          line 201 of /ai/classes/table/aiplacement_action_management_table.php: call to core_ai\table\aiplacement_action_management_table->out()
          line 77 of /ai/classes/admin/admin_setting_action_manager.php: call to core_ai\table\aiplacement_action_management_table->get_content()
          line 1652 of /lib/adminlib.php: call to core_ai\admin\admin_setting_action_manager->output_html()
          line 157 of /admin/settings.php: call to admin_settingpage->output_html()
      

      Broken by MDL-82977

            pholden Paul Holden
            pholden Paul Holden
            Huong Nguyen Huong Nguyen
            Jun Pataleta Jun Pataleta
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 30 minutes
                2h 30m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.