Disqus and Blade


I am currently using Sage 9 and I encountered this error below in my server.

Fatal error: Uncaught InvalidArgumentException: Unrecognized extension in file: in /home/forge/kobyinc.celertron.com/build_production/blog/wp-content/themes/kobyinc/vendor/illuminate/view/Factory.php:258 Stack trace: #0 /home/forge/kobyinc.celertron.com/build_production/blog/wp-content/themes/kobyinc/vendor/illuminate/view/Factory.php(227): Illuminate\View\Factory->getEngineFromPath(NULL) #1 /home/forge/kobyinc.celertron.com/build_production/blog/wp-content/themes/kobyinc/vendor/illuminate/view/Factory.php(112): Illuminate\View\Factory->viewInstance(NULL, NULL, Array) #2 [internal function]: Illuminate\View\Factory->file(NULL, Array, Array) #3 /home/forge/kobyinc.celertron.com/build_production/blog/wp-content/themes/kobyinc/app/lib/Sage/Template/Blade.php(127): call_user_func_array(Array, Array) #4 /home/forge/kobyinc.celertron.com/build_production/blog/wp-content/themes/kobyinc/app/lib/Sage/Template/Blade.php(62): Roots\Sage\Template\Blade->__call('file', Array) #5 /home/forge/kobyinc.celertron.com/build_production/blog in /home/forge/kobyinc.celertron.com/build_production/blog/wp-content/themes/kobyinc/vendor/illuminate/view/Factory.php on line 258

Any idea how to fix this?

Nvm Found that Disqus is the culprit. Isn’t working with blade.

Any chance you figured out how to get Disqus working with blade?

For what it’s worth, we just rolled Sage 9 to our production site and Disqus is working fine. We actually use a plugin called “Disqus Conditional Load” instead of the Disqus plugin itself, so that may be why it works for us.

Not sure if something changed with Sage since this was originally written to make it more compatible with Disqus, but thought I would point it out. We have thousands of comments and they all display fine.

Errr… oops. Update on this one. We did finally run into a problem. We just added some custom plugins that created a few new CPTs and they all threw 500 errors on the single-cpt pages. After some debugging we realized it was Disqus (in our case Disqus Conditional Load) that was causing the problem.

But Disqus continues to load fine on standard post pages with our Sage theme, so we just added the following conditional to the content-single.blade.php file:

@if( is_singular('post') )
  @php comments_template('/partials/comments.blade.php') @endphp

…and things are back to working fine for us.