Index sync error with WordPress plugin

Hi guys.

I’ve set up the Algolia WordPress plugin on about 40 websites but I’ve had the following issue on 2 of them while trying to index. The error is “An error occurred: Element must be mapped in system”. It occurred for Posts on the one site and Pages on another. The sites are running the latest version of the plugin (2.2.0) and WordPress (4.7.4) and latest version of PHP7 and MariaDB. Any help would be greatly appreciated.


1 Like

Hi @simon,

I’d definitely be willing to find out what the error is.

Do you have anything in your PHP logs?

You say it works on 38 websites but didn’t on 2 of them? Are you able to maybe figure out what might be different on those 2 websites where the error occurs?

Looking forward to solve this.

Hey @rayrutjes

Thank you for the quick response. Please see below a debug.log file for each of the two offending sites. All the sites use pretty much the same plugin configuration. I noticed in the log some Visual Composer related errors. NOTE: in the logs I’ve replaced the domain with “domain” for privacy reasons.

Thanks for the logs!

So the problem is arises when the visual composer tries to replace some shortcodes.

For the indexing, we trigger the_content hook, to ensure shortcodes get replaced in the content.

It seems like the visual composer as an issue rendering a specific gallery shortcode when not in a real rendering context.

3 options:

  • Remove the shortcode that causes the issue.
  • Try to remove some dependencies required by the shortcode replacement
  • Disable replacing shortcodes

Let me know what you think are valid solutions.

So for the second link it mentions “vc_images_carousel” so I went through all pages on that site and made sure all carousels display correctly and images loaded. I then tried to re-index pages and it now says “An error occurred: Page should be provided.” I must mention I have updated to the latest version of the plugin (2.2.2). This same error occurs on the other site mentioned previously but the ones that previously worked continue to work. See below the debug.log for the new error.

We change the variable name from ‘p’ to ‘page’ in one of the latest release.
My guess is that the JS script has not been updated in your browser.

Do you mind trying opening a private navigation chrome tab and load the admin of your site in there and let me know if indexing works?

Thanks for your help.

Thanks for your help. It looks like that latest error was due to the JS change. Cleared all caches and it indexed without issues. It seems the “vs_images_carousel” error was indeed caused by some images not being linked properly. Hope this helps anyone else with the same issue.

1 Like

Thanks for your feedback.

Regarding the shortcode issue, you could probably report the issue to the authors so that they can handle the edge case :wink:

1 Like