• Resolved qwik3r

    (@qwik3r)


    I just installed this plugin and it instantly created a critical error on my site. According to the automatic error email that is sent out, it appears that LearnDash relies on part of the REST API and I guess by it being turned off by default messed something up. I had to rename my LearnDash folder to get back into the site.

    An error of type E_ERROR was caused in line 553 of the file /home/xxxx/public_html/wp-content/plugins/sfwd-lms/includes/rest-api/v2/class-ld-rest-essays-controller.php. Error message: Uncaught TypeError: Argument 2 passed to LD_REST_Essays_Controller_V2::rest_collection_params_filter() must be an instance of WP_Post_Type, null given, called in /home/xxxx/public_html/wp-includes/class-wp-hook.php on line 307 and defined in /home/xxxx/public_html/wp-content/plugins/sfwd-lms/includes/rest-api/v2/class-ld-rest-essays-controller.php:553
    Stack trace:
    #0 /home/xxxx/public_html/wp-includes/class-wp-hook.php(307): LD_REST_Essays_Controller_V2->rest_collection_params_filter()
    #1 /home/xxxx/public_html/wp-includes/plugin.php(191): WP_Hook->apply_filters()
    #2 /home/xxxx/public_html/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php(2891): apply_filters()
    #3 /home/xxxx/public_html/wp-content/plugins/sfwd-lms/includes/rest-api/v2/class-ld-rest-posts-controller.php(190): WP_REST_Posts_Controller->get_collec
Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Dave McHale

    (@dmchale)

    hi @qwik3r Sorry you’re having issues, but thanks for the report! I may have an idea on how to fix, and sent you a message on Slack to follow up. Hope to talk to you soon and see if we can get this fixed for you!

    Thread Starter qwik3r

    (@qwik3r)

    Thanks. I’ll check the message there.

    Plugin Author Dave McHale

    (@dmchale)

    hi @qwik3r

    I believe I’ve tracked down the issue! ?? Unfortunately I’m troubleshooting a UX update for the next version of this plugin that is holding up my next release, but this change WILL be included in the next version.

    If you would like to make an update now for yourself you can edit Line 32 of \disable-json-api\classes\disable-rest-api.php and change the init action to wp_loaded – in my local environment that seems to work without any negative side effects that I have noticed. But please let me know if you see any issues, if you decide to try this update!

    Thanks again for the report, and hope this helps you use the plugin without issue!

    Thread Starter qwik3r

    (@qwik3r)

    That seemed to do the trick in resolving the critical error. I’ll keep an eye out for any other issues. Thanks!

    I’m having some trouble connecting to Metorik even though that has been checked off as being enabled under the settings. ;\

    • This reply was modified 2 years, 1 month ago by qwik3r. Reason: update to problem
    • This reply was modified 2 years, 1 month ago by qwik3r.
    • This reply was modified 2 years, 1 month ago by qwik3r.
    Plugin Author Dave McHale

    (@dmchale)

    Glad it’s working @qwik3r !

    I can’t speak to the actual Metorik issue since I’m not sure how their endpoints work, but I can say that often it helps to look and see if the error talking to the endpoint has the “DRA” messaging in the response or not. And sometimes even if you’re logged in as a particular user/role, endpoints are sometimes accessed without authentication. I’d recommend looking at that as a starting point.

    Since we’ve confirmed the plugin no longer causes fatal errors on your site I’m going to close this ticket now, but feel free to let me know if you have any continued issues in a new ticket! Cheers

    Thread Starter qwik3r

    (@qwik3r)

    I have no idea how to look up what you’re suggesting. All I know is that the plugin is blocking it. When disabled it doesn’t block it. In their docs they state to make sure that app.metorik.com is not blocked. There are endpoints that show up in the settings for metorik, such as authentication, but turning those off does nothing. Please advise.

    Hey @qwik3r – Bryce from Metorik here. We use quite a few of the WooCommerce API endpoints, and also add some of our own through the Metorik Helper plugin, so you’ll just want to make sure those API endpoints aren’t disabled. Any specific issues, perhaps shoot us a message through our support so we can test for your site specifically and can let you know any errors. Cheers!

    Thread Starter qwik3r

    (@qwik3r)

    Thanks for chiming in @bryceadams. I can confirm that for ‘unauthenticated users’ in this plugin’s settings anything relating to Woocommerce and anything that says Metorik are not blocked. I’ve been in touch with @dmchale privately to try to resolve this as well.

    Thanks.

    Plugin Author Dave McHale

    (@dmchale)

    @qwik3r I think at this point taking @bryceadams up on his offer to look would be ideal, since nothing about DRA should be blocking anything if you’ve tried adjusting your settings to “allow full”. Since you’re unable to debug what I sent above, with luck Bryce and team can either find out what else is not working properly or at least help provide more information that I could run with on my end.

    Good luck, and keep me in the loop if you find more information!

    Thread Starter qwik3r

    (@qwik3r)

    Thanks.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘LearnDash error’ is closed to new replies.