Syntax-Error (debug message) after installation and activation of plugin

Issue #9 resolved
peta3000 created an issue

Dear devs

I installed filter_amanote as ZIP on my local testing moodle instances (versions: 4.1 as well as 3.11), activated it, made sure all preconditions are met:

  • Amanote filter is enabled (Site administration > Plugins > Filters > Manage filters)
  • Web services are enabled (Site administration > Advanced feature)
  • Moodle mobile web service is enabled (Site administration > Plugins > Web services > External services).
  • REST protocol is activated (Site administration > Plugins > Web services > Manage protocols)
  • Capability webservice/rest:use is allowed for authenticated users (Site administration > Users > Permissions > Define Roles > Authenticated Users > Manage roles)

I then enabled debugging and right after I activate the filter and create a course I get the following error (I guess flagged as systax-error of SQL-query):

An error occurred: Error reading from database (ERROR: syntax error at or near "'id'" LINE 2: mdl_files.id as 'id', ^ SELECT mdl_files.id as 'id', mdl_course_modules.id as 'cmid', mdl_course_modules.instance as 'modinstance', mdl_context.id as 'contextid', mdl_files.mimetype, mdl_files.component, mdl_files.filearea, mdl_files.filepath, mdl_files.filename FROM mdl_course_modules LEFT JOIN mdl_context ON mdl_context.instanceid = mdl_course_modules.id LEFT JOIN mdl_files ON mdl_files.contextid = mdl_context.id AND mdl_course_modules.course = $1 WHERE mdl_files.component in ('mod_resource', 'mod_label', 'mod_folder') AND mdl_files.source IS NOT NULL AND mdl_files.filename != '.' [array ( 0 => '2', )])#0 /var/www/html/lib/dml/moodle_read_slave_trait.php(293): moodle_database->query_end(false) #1 /var/www/html/lib/dml/pgsql_native_moodle_database.php(341): pgsql_native_moodle_database->read_slave_query_end(false) #2 /var/www/html/lib/dml/pgsql_native_moodle_database.php(1027): pgsql_native_moodle_database->query_end(false) #3 /var/www/html/filter/amanote/filter.php(256): pgsql_native_moodle_database->get_records_sql('SELECT\n ...', Array) #4 /var/www/html/filter/amanote/filter.php(114): filter_amanote->get_annotatables(Object(stdClass), NULL) #5 /var/www/html/filter/amanote/filter.php(79): filter_amanote->generate_json_params() #6 /var/www/html/filter/amanote/filter.php(64): filter_amanote->insert_script(Object(moodle_page)) #7 /var/www/html/lib/filterlib.php(291): filter_amanote->setup(Object(moodle_page), Object(context_system)) #8 /var/www/html/lib/pagelib.php(1723): filter_manager->setup_page_for_globally_available_filters(Object(moodle_page)) #9 /var/www/html/lib/pagelib.php(751): moodle_page->initialise_theme_and_output() #10 /var/www/html/lib/pagelib.php(1006): moodle_page->magic_get_theme() #11 /var/www/html/course/format/classes/base.php(1252): moodle_page->get_renderer('format_topics') #12 /var/www/html/course/view.php(140): core_courseformat\base->get_renderer(Object(moodle_page)) #13 {main}
line 155 of /filter/amanote/filter.php: call to debugging()

Would you have a clue?

Best regards

peta

Comments (2)

  1. Log in to comment