Title: the_lar's Replies | WordPress.org

---

# the_lar

  [  ](https://wordpress.org/support/users/the_lar/)

 *   [Profile](https://wordpress.org/support/users/the_lar/)
 *   [Topics Started](https://wordpress.org/support/users/the_lar/topics/)
 *   [Replies Created](https://wordpress.org/support/users/the_lar/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/the_lar/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/the_lar/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/the_lar/engagements/)
 *   [Favorites](https://wordpress.org/support/users/the_lar/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 112 total)

1 [2](https://wordpress.org/support/users/the_lar/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/the_lar/replies/page/3/?output_format=md)…
[6](https://wordpress.org/support/users/the_lar/replies/page/6/?output_format=md)
[7](https://wordpress.org/support/users/the_lar/replies/page/7/?output_format=md)
[8](https://wordpress.org/support/users/the_lar/replies/page/8/?output_format=md)
[→](https://wordpress.org/support/users/the_lar/replies/page/2/?output_format=md)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Firefox issue with @wordpress/interactivity module load](https://wordpress.org/support/topic/firefox-issue-with-wordpress-interactivity-module-load/)
 *  Thread Starter [the_lar](https://wordpress.org/support/users/the_lar/)
 * (@the_lar)
 * [1 year ago](https://wordpress.org/support/topic/firefox-issue-with-wordpress-interactivity-module-load/#post-18663500)
 * Thanks so much for having a look at this. [@becleung](https://wordpress.org/support/users/becleung/)
   joy with the script addition above though, adding that to my theme resulted in
   a new error:
 * `Uncaught SyntaxError: import declarations may only appear at top level of a 
   module product-filter-price.js:1:1`
 * I’ll do what [@macmanx](https://wordpress.org/support/users/macmanx/) suggested
   and raise an issue with Woocommerce!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Search with Algolia] Enable insights on autocomplete?](https://wordpress.org/support/topic/enable-insights-on-autocomplete/)
 *  Thread Starter [the_lar](https://wordpress.org/support/users/the_lar/)
 * (@the_lar)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/enable-insights-on-autocomplete/#post-18590607)
 * Perfect, thanks for the helpful response [@tw2113](https://wordpress.org/support/users/tw2113/)–
   makes sense and I’ll look out for updates when this version comes along.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Redis Object Cache] Some custom functionality not working on staging site after activating Redis](https://wordpress.org/support/topic/some-custom-functionality-not-working-on-staging-site-after-activating-redis/)
 *  Thread Starter [the_lar](https://wordpress.org/support/users/the_lar/)
 * (@the_lar)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/some-custom-functionality-not-working-on-staging-site-after-activating-redis/#post-17543542)
 * I think I may have figured out what’s going on here, can I run this past you?
 * The particular bit of functionality of my theme uses `get_transient()` for a 
   bunch of keys – I know those transients are present so I don’t check first. BUT–
   the transients were created before I installed Redis, so presumably it’s returning`
   false` rather than the array of data I need, because Redis knows nothing about
   these keys?
 * So in this case, I just need to delete the transients and recreate them with 
   Redis enabled and active? Is that about right?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Redis Object Cache] Some custom functionality not working on staging site after activating Redis](https://wordpress.org/support/topic/some-custom-functionality-not-working-on-staging-site-after-activating-redis/)
 *  Thread Starter [the_lar](https://wordpress.org/support/users/the_lar/)
 * (@the_lar)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/some-custom-functionality-not-working-on-staging-site-after-activating-redis/#post-17543486)
 * Ah OK, yes my site uses `$wpdb` a lot – there’s a lot of custom functionality.
 * So basically I need to install Redis locally then and go from there in the first
   instance? When you say `wpdb` will give me trouble – specifically what kind of
   things and why? I’m pretty new to Redis so in basic terms what could break?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Redis Object Cache] Issue enabling plugin with roots/bedrock in production](https://wordpress.org/support/topic/issue-enabling-plugin-with-roots-bedrock-in-production/)
 *  Thread Starter [the_lar](https://wordpress.org/support/users/the_lar/)
 * (@the_lar)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/issue-enabling-plugin-with-roots-bedrock-in-production/#post-17526436)
 * OK, just found that changing the setting to `false`, enabling the plugin, then
   changing the setting back to `true` works and Redis continues running just fine.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Search with Algolia] Strategy for conversion tracking?](https://wordpress.org/support/topic/strategy-for-conversion-tracking/)
 *  Thread Starter [the_lar](https://wordpress.org/support/users/the_lar/)
 * (@the_lar)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/strategy-for-conversion-tracking/#post-17297000)
 * Hi Michael, I’ve actually done this using Mixpanel which is what we already use
   for lots of custom Event tracking on the site and it was going to be much easier
   it seemed to do it that way. Thanks anyway for the help though!
 * Have a great Christmas!
 * Kevin
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Search with Algolia] algoliasearch is not defined – just on my blog posts](https://wordpress.org/support/topic/algoliasearch-is-not-defined-just-on-my-blog-posts/)
 *  Thread Starter [the_lar](https://wordpress.org/support/users/the_lar/)
 * (@the_lar)
 * [3 years ago](https://wordpress.org/support/topic/algoliasearch-is-not-defined-just-on-my-blog-posts/#post-17085423)
 * Sure, I’d be happy to do that. We have a staging site so that would be idea. 
   As our custom theme is based on roots/sage, I’ve had to make some allowances 
   as detailed here – [https://discourse.roots.io/t/algolia-search-integration/15047/9?u=the_lar](https://discourse.roots.io/t/algolia-search-integration/15047/9?u=the_lar)–
   but possibly makes it a good test bed for alternative setups anyway.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Search with Algolia] algoliasearch is not defined – just on my blog posts](https://wordpress.org/support/topic/algoliasearch-is-not-defined-just-on-my-blog-posts/)
 *  Thread Starter [the_lar](https://wordpress.org/support/users/the_lar/)
 * (@the_lar)
 * [3 years ago](https://wordpress.org/support/topic/algoliasearch-is-not-defined-just-on-my-blog-posts/#post-17083108)
 * Fixed – taken most of the day but discovered that it was down to the way a freelancer
   we employed last year had set up the template for `posts` – clearly didn’t have
   a clue how blade works by extending a core layout file and was extending it again–
   this was resulting in `wp_footer` being called at least 3 times and ultimately
   generating a frankenstein version of our footer just on `post` types! As the 
   old saying goes, if you want something done properly – do it yourself!!! 🤦🏼‍♂️
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Search with Algolia] algoliasearch is not defined – just on my blog posts](https://wordpress.org/support/topic/algoliasearch-is-not-defined-just-on-my-blog-posts/)
 *  Thread Starter [the_lar](https://wordpress.org/support/users/the_lar/)
 * (@the_lar)
 * [3 years ago](https://wordpress.org/support/topic/algoliasearch-is-not-defined-just-on-my-blog-posts/#post-17081354)
 * [@tw2113](https://wordpress.org/support/users/tw2113/) I’ve done some more digging,
   looking at the source, on my `post` articles the autocomplete.php code is present
   where `wp_footer()` is hit but there’s a lot of scripts below that which aren’t
   present that definitely are there elsewhere, wp-utils.js being one of the missing
   scripts. The strange thing is, when I capture the output of `wp_footer()` by 
   putting in a breakpoint like you suggested and using `ob_start()` – the scripts
   are there, they just don’t make it onto the page for some reason! 🤷🏻‍♂️
 * Anyway I tried turning Algolia plugin off completely and the issue persists. 
   So obviously there’s an something going on with `post`‘s that’s not related to
   your plugin at all – it’s just never been picked up before. I’ll have to pick
   it apart and see what gives – thanks for your help anyway!
    -  This reply was modified 3 years ago by [the_lar](https://wordpress.org/support/users/the_lar/).
    -  This reply was modified 3 years ago by [the_lar](https://wordpress.org/support/users/the_lar/).
    -  This reply was modified 3 years ago by [the_lar](https://wordpress.org/support/users/the_lar/).
    -  This reply was modified 3 years ago by [the_lar](https://wordpress.org/support/users/the_lar/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Search with Algolia] algoliasearch is not defined – just on my blog posts](https://wordpress.org/support/topic/algoliasearch-is-not-defined-just-on-my-blog-posts/)
 *  Thread Starter [the_lar](https://wordpress.org/support/users/the_lar/)
 * (@the_lar)
 * [3 years ago](https://wordpress.org/support/topic/algoliasearch-is-not-defined-just-on-my-blog-posts/#post-17080971)
 * [@tw2113](https://wordpress.org/support/users/tw2113/) – to answer your question,
   the theme as I say is built on roots/sage 9 which uses blade templates, so all
   of my templates including single.blade.php (which is for `post`) use something
   like this…
 *     ```wp-block-code
       @extends('layouts.app')
       @section('content')
         {{--whatever--}}
       @endsection
       ```
   
 * Then my `layouts/app.blade.php` is something like this (very simplified version)…
 *     ```wp-block-code
       <!doctype html>
       <html {!! get_language_attributes() !!}>
         <head>
           @php wp_head() @endphp
         </head>
         <body>
           @yield('content')
           @php wp_footer() @endphp
         </body>  
       </html>
       ```
   
    -  This reply was modified 3 years ago by [the_lar](https://wordpress.org/support/users/the_lar/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Search with Algolia] algoliasearch is not defined – just on my blog posts](https://wordpress.org/support/topic/algoliasearch-is-not-defined-just-on-my-blog-posts/)
 *  Thread Starter [the_lar](https://wordpress.org/support/users/the_lar/)
 * (@the_lar)
 * [3 years ago](https://wordpress.org/support/topic/algoliasearch-is-not-defined-just-on-my-blog-posts/#post-17080947)
 * Strangely when I put a breakpoint into `includes/class-algolia-scripts.php` on
   around line 38 – it does get hit when I refresh my `post` – and there are no 
   errors showing up in my IDE console!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Search with Algolia] algoliasearch is not defined – just on my blog posts](https://wordpress.org/support/topic/algoliasearch-is-not-defined-just-on-my-blog-posts/)
 *  Thread Starter [the_lar](https://wordpress.org/support/users/the_lar/)
 * (@the_lar)
 * [3 years ago](https://wordpress.org/support/topic/algoliasearch-is-not-defined-just-on-my-blog-posts/#post-17080905)
 * [@tw2113](https://wordpress.org/support/users/tw2113/) – yeah so I can see that`
   wp-util` and `algoliasearch` are not being loaded on my `post` articles (for 
   whatever reason) – they just aren’t there in the Network tab of Firefox console–
   there’s no 404, just not there at all. They ARE there on my other post types –`
   page` `product` etc – [https://4x4tyres.co.uk/wheel-search/](https://4x4tyres.co.uk/wheel-search/)
   for example. Not sure what this is telling us but my guess is that the script
   you linked to above is maybe failing on `post` possibly because of a dependency
   issue (just a guess), but the fact that none of the scripts are even present 
   does imply an enqueuing error I think – would you agree?
    -  This reply was modified 3 years ago by [the_lar](https://wordpress.org/support/users/the_lar/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Search with Algolia] algoliasearch is not defined – just on my blog posts](https://wordpress.org/support/topic/algoliasearch-is-not-defined-just-on-my-blog-posts/)
 *  Thread Starter [the_lar](https://wordpress.org/support/users/the_lar/)
 * (@the_lar)
 * [3 years ago](https://wordpress.org/support/topic/algoliasearch-is-not-defined-just-on-my-blog-posts/#post-17080682)
 * Yeah so when I add those to my footer, it changes the error to:
 *     ```wp-block-code
       Uncaught TypeError: wp.template is not a function
           algolia_setup (index):1456
           algolia_setup (index):1455
           init common.js:89
           jQuery 10
           init common.js:73
           fire Router.js:38
           loadEvents Router.js:53
           <anonymous> main.js:96
           jQuery 13
       ```
   
 * So wp.template is not loaded also on posts – very odd!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Search with Algolia] algoliasearch is not defined – just on my blog posts](https://wordpress.org/support/topic/algoliasearch-is-not-defined-just-on-my-blog-posts/)
 *  Thread Starter [the_lar](https://wordpress.org/support/users/the_lar/)
 * (@the_lar)
 * [3 years ago](https://wordpress.org/support/topic/algoliasearch-is-not-defined-just-on-my-blog-posts/#post-17080561)
 * Yeah don’t think it’s Litespeed because I don’t use that on my local dev version
   on my own machine but still seeing the issue there too.
 * The custom theme I’ve built uses `roots/sage` and `roots/bedrock` not sure if
   that’s of any relevance, just weird how it’s only affecting my `post` ‘s
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Search with Algolia] Escaping HTML encoded text in autocomplete template?](https://wordpress.org/support/topic/escaping-html-encoded-text-in-autocomplete-template/)
 *  Thread Starter [the_lar](https://wordpress.org/support/users/the_lar/)
 * (@the_lar)
 * [3 years ago](https://wordpress.org/support/topic/escaping-html-encoded-text-in-autocomplete-template/#post-17077729)
 * Yeah so basically there doesn’t seem to be any way to decode html entities then.
 * Just using `{{ }}` instead of the triple version simply encodes the `&` at the
   start of `&quot;` so you end up with _Alloy Wheel 20&amp;quot; x 9&amp;quot;_
   😂
 * And using `<# #>` just outputs `data._snippetResult['content'].value` rather 
   than any value
 * I’ll just have to take a different approach and decode them before I send them
   to Algolia I guess.
    -  This reply was modified 3 years ago by [the_lar](https://wordpress.org/support/users/the_lar/).
    -  This reply was modified 3 years ago by [the_lar](https://wordpress.org/support/users/the_lar/).

Viewing 15 replies - 1 through 15 (of 112 total)

1 [2](https://wordpress.org/support/users/the_lar/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/the_lar/replies/page/3/?output_format=md)…
[6](https://wordpress.org/support/users/the_lar/replies/page/6/?output_format=md)
[7](https://wordpress.org/support/users/the_lar/replies/page/7/?output_format=md)
[8](https://wordpress.org/support/users/the_lar/replies/page/8/?output_format=md)
[→](https://wordpress.org/support/users/the_lar/replies/page/2/?output_format=md)