{"id":16116412,"date":"2022-10-19T22:13:35","date_gmt":"2022-10-19T22:13:35","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/learndash-error\/"},"modified":"2022-10-19T22:13:35","modified_gmt":"2022-10-19T22:13:35","slug":"learndash-error","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/learndash-error\/","title":{"rendered":"LearnDash error"},"content":{"rendered":"<p>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.  <\/p>\n<pre><code>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\nStack trace:\n#0 \/home\/xxxx\/public_html\/wp-includes\/class-wp-hook.php(307): LD_REST_Essays_Controller_V2-&gt;rest_collection_params_filter()\n#1 \/home\/xxxx\/public_html\/wp-includes\/plugin.php(191): WP_Hook-&gt;apply_filters()\n#2 \/home\/xxxx\/public_html\/wp-includes\/rest-api\/endpoints\/class-wp-rest-posts-controller.php(2891): apply_filters()\n#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-&gt;get_collec<\/code><\/pre>\n","protected":false},"template":"","class_list":["post-16116412","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/16116412","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/16116412\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=16116412"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}