JavaScript Algolia and WordPress search page suddenly not working, console showing “Uncaught typeError” algolia wordpress search,algolia search wordpress plugin

I built a search page with WordPress & Algolia Search, and it's been working fine for a few months, but suddenly, I am getting the following error:

Uncaught TypeError: Cannot read property 'matchedWords' of undefined

The facet filters are no longer working and the search results are not being displayed.

Page in question is: https://habyts.com/activities-for-kids

I can't pinpoint anything having changed since it stopped working, so I don't really know how to fix this error.

The Algolia WordPress plugin has been updated a few days ago to 2.3.0, but I loaded the search page a few times after the update and it was working, it's only a day or so after the update that it broke and started showing the console error.

Please help!

Thanks in advance.

Answer:1

The Uncaught TypeError: Cannot read property 'matchedWords' of undefined error is raised because there is a field that no longer is present in your Algolia index.

From version 1.x to 2.x of the plugin, there have beens some changes and we have already seen this error once.

To solve it, you need to manually delete all the indices from your Algolia dashboard, and then trigger re-indexing of all the indices from the admin of the Algolia plugin.

In case you also did customize the autocomplete/search page template, you would need to make sure the fields used in those are still available in the data sent to Algolia.

Answer:2

I deleted all my Algolia Indices, and reindexed everything required, and reverted back to my old instantsearch hit template, which indeed worked again, with search highlighting working again.

One thing doesn't work though. I was previously using data.images.medium to display thumbnails of each search result. For some reason this no longer works, as in no image is displayed. There are no console errors present and I can't figure out what's changed.

I can get data.images.thumbnail working to display a thumbnail with each search result. I want however to grab a higher resolution image, which I was previously able to do using data.images.medium...

Any ideas?

Answer:3

I wanna create such a field with JS and Jquery.

I wanna create such a field with JS and Jquery.

  1. picture positioning on wall
  2. picture positioning in latex
  3. image positioning with css
  4. picture positioning in html
  5. positioning picture in word
  6. positioning image with text

Website behaves differently when Data Saver option is on in Mobile Chrome Browser. What is the best way to determine whether Data Saver is enabled or not using JavaScript.

Website behaves differently when Data Saver option is on in Mobile Chrome Browser. What is the best way to determine whether Data Saver is enabled or not using JavaScript.

  1. check whether data is normally distributed
  2. check whether data is normally distributed python
  3. check if data is normally distributed
  4. check if dataframe is empty
  5. check if data exists in table sql
  6. check if data attribute exists jquery
  7. check if data is json javascript
  8. check if data is normally distributed r
  9. check if data is normally distributed python
  10. check if data is array javascript
  11. check if data exists in table oracle
  12. check if data is undefined javascript
  13. check if data exist in database php
  14. check if data already exists mysql
  15. check if data is object javascript
  16. check if data exist in database laravel
  17. check if data is normally distributed excel
  18. check if data table is empty
  19. check if data is json
  20. check if data frame r

I have a list in my ionic project with some icons that I want to click. But I cannot get the click to be picked up either by the htmll onclick() or by the AngularJS ng-click. My html looks like this: ...

I have a list in my ionic project with some icons that I want to click. But I cannot get the click to be picked up either by the htmll onclick() or by the AngularJS ng-click. My html looks like this: ...

  1. icon ionic list
  2. ionic icon list item
  3. icon list ionic 4
  4. icon list ionic 2
  5. tab icon ionic list
  6. ionic icon name list
  7. ionic ion icon list
  8. ionic icon class list
  9. ionic list icon right
  10. ionic list icon left

I have a string like "D-30-25-4", then I want 30 and 25 as the desired result I have tried this value = "D-30-25-4"; value1= parseInt(value.substring(5,7)); // 25 value12 = parseInt(value....

I have a string like "D-30-25-4", then I want 30 and 25 as the desired result I have tried this value = "D-30-25-4"; value1= parseInt(value.substring(5,7)); // 25 value12 = parseInt(value....

  1. remove character special javascript
  2. remove character special php
  3. remove character special c#
  4. remove character special java
  5. remove special character from string javascript
  6. remove special character from string python
  7. remove special character from string
  8. remove special character in excel
  9. remove special character from string c#
  10. remove special character python
  11. remove special character from string in php
  12. remove special character from string java
  13. remove special character
  14. remove special character from string in ios
  15. remove special character online
  16. remove special character in sql
  17. remove special character in r
  18. remove special character regex
  19. remove special character from string in sql
  20. remove special character from string r