Closed martinsam closed 2 years ago
Your error logs suggest to me that the $blog_id variable contains an error response. Are you able to dump out its contents before the call the add_user_to_blog in line 219 of lti-tool/includes/WPTool.php so we can see what it does not seem to like? Thanks.
It's empty, I try to force with a good value
Thanks. Not sure how it can be empty if the log file is reporting is an being a WP_Error object. If it were empty I would expect it to be caught by the check on line 198.
Closing this issue as there has been no activity. Hopefully it has been resolved; if not please let me know. Thanks.
LTI advantage seems to work well.
Configuration is now automatically :
Automation helps me understand the urls used
I don't forget to activate the external tool in Moodle and I don't forget to activate "Lti Platforms" in Wordpress.
From Moodle, after adding a course (LTI - Wordpress) I observe the following error :
[Thu Mar 24 16:32:30.248513 2022] [php7:notice] [pid 21] [client 172.18.0.1:61438] [DEBUG] SELECT context_pk, consumer_pk, title, lti_context_id, type, settings, created, updated FROM opq_lti2_context WHERE (context_pk = ?) [Thu Mar 24 16:32:30.252272 2022] [php7:notice] [pid 21] [client 172.18.0.1:61438] [DEBUG] SELECT consumer_pk, name, consumer_key, secret, platform_id, client_id, deployment_id, public_key, lti_version, signature_method, consumer_name, consumer_version, consumer_guid, profile, tool_proxy, settings, protected, enabled, enable_from, enable_until, last_access, created, updated FROM opq_lti2_consumer WHERE consumer_pk = ? [Thu Mar 24 16:32:30.325719 2022] [php7:error] [pid 21] [client 172.18.0.1:61438] PHP Fatal error: Uncaught Error: Object of class WP_Error could not be converted to string in /var/www/html/wp-includes/ms-functions.php:220\nStack trace:\n#0 /var/www/html/wp-content/plugins/lti-tool/includes/WPTool.php(219): add_user_to_blog(Object(WP_Error), 14672, 'administrator')\n#1 /var/www/html/wp-content/plugins/celtic-lti/vendor/celtic/lti/src/System.php(1060): LTI_Tool_WPTool->onLaunch()\n#2 /var/www/html/wp-content/plugins/celtic-lti/vendor/celtic/lti/src/Tool.php(470): ceLTIc\\LTI\\Tool->doCallback()\n#3 /var/www/html/wp-content/plugins/lti-tool/lti-tool.php(210): ceLTIc\\LTI\\Tool->handleRequest()\n#4 /var/www/html/wp-includes/class-wp-hook.php(307): lti_tool_parse_request(Object(WP))\n#5 /var/www/html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)\n#6 /var/www/html/wp-includes/plugin.php(522): WP_Hook->do_action(Array)\n#7 /var/www/html/wp-includes/class-wp.php(396): do_action_ref_array('parse_request', Array)\n#8 /var/www/html/wp-includes/class-wp.php(758): WP->parse_request('')\n#9 /var/www/html/wp- in /var/www/html/wp-includes/ms-functions.php on line 220 172.18.0.1 - - [24/Mar/2022:16:32:29 +0000] "POST /?lti-tool HTTP/1.1" 500 5108 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:98.0) Gecko/20100101 Firefox/98.0"
Could you help me please to understand this ? (I use multisite in WP , it's a problem ? )