Richard Aber
Forum Replies Created
-
Howdy @raster02,
I see this error as well, though I use en_US.
The PHP interpreter appears to be throwing a fatal error due to a missing
s
in aprintf()
call.There appears to be a typos on line 225 of admin/basic-info.php.string placeholder.
%1$Basic
…should be…
%1$sBasic
Side note: I see the same error in the Pro version.
Forum: Plugins
In reply to: [WP Search with Algolia] Being able to select specific Custom Post TypesHowdy @jdingman
The checkboxes on the WP-Admin -> Algolia Search -> Autocomplete screen are to configure Autocomplete, not to configure the search page or the
searchable_posts
index itself.The “All Posts” (
searchable_posts
) index is used by the Instantsearch.js (“Use Algolia with Instantsearch.js”) and PHP backed search (“Use Algolia in the backend”) integrations configured at WP-Admin -> Algolia Search -> Search Page. If you are trying to affect the search page specifically, thensearchable_posts
is indeed the index you want to work with.By default, the
searchable_posts
index will include content from all post types that were registered withexclude_from_search
set tofalse
. That is to say, post types that are normally searchable anyway (refer toAlgolia_Plugin::load_indices()
).After retrieving the array of registered searchable post types, they are passed through the
algolia_searchable_post_types
filter to allow for developer customization.To limit the post types available to the
searchable_posts
index, you would want to hook intoalgolia_searchable_post_types
, and return an array that _only contains_ the post types you _do_ want to index.For example, if I wanted to limit the post types that are allowed in the
searchable_posts
index to just two specific post types “book” and “movie”, I could do something like this:/** * Override the post types used for the "All Posts" (<code>searchable_posts</code>) index. * * @param array $searchable_post_types Array of searchable post types. * * @return array */ function myprefix_override_searchable_post_types( $searchable_post_types ) { return [ 'book', 'movie', ]; } add_filter( 'algolia_searchable_post_types', 'myprefix_override_searchable_post_types' );
After applying that filter in code, you would need to re-index by clicking the “Re-index search page records” button at top of WP-Admin -> Algolia Search -> Search Page, or by using the
wp algolia reindex
WP-CLI command.For clarification, as I think there may be some confusion around the checkboxes, the checkboxes on WP-Admin -> Algolia Search -> Autocomplete screen are for configuring one or more indexes to be used by the Autocomplete.js integration, which is generally tied to a search field in a widget, header, footer, not tied to the “search page” specifically. The “All Posts” (
searchable_posts
) index is available as a checkbox there, so that Autocomplete can use the same index that the search page uses. Alternatively, specific post types can be selected so that Autocomplete creates a new index for each individual post type. Searches in the Autocomplete drop down will then display headers for each index that was enabled on the WP-Admin -> Algolia Search -> Autocomplete screen.Does that information help?
Forum: Plugins
In reply to: [WP Search with Algolia] Zero or Poor Results conflicting with Algolia AdminHowdy @lcm404
The thread you reference is about a conflict with another plugin that modified the WP_Query object when a search was performed with the “Use Algolia in the backend” setting.
If you are using the “Use Algolia in the backend” setting, and your theme, or one of your plugins, has some sort of custom search behavior, or behavior that modifies the WP_Query object during a PHP backed search, then it could be a similar conflict.
WP Search with Algolia does not perform any configuration of typoTolerance settings. This means that both the Algolia indices created by the plugin, and the search clients (both PHP and JS), inherit the default typoTolerance setting of
true
.If you wish to modify that setting, there are multiple PHP filters available. If you use the autocomplete and instantsearch settings, then you can also copy the templates from the plugin and modify the JS to adjust the typoTolerance setting.
I have written up a gist with more information about customizing typoTolerance:
https://gist.github.com/richaber/0cff732a357d073779bb01cd02d8ceefTracking here https://github.com/WebDevStudios/wp-search-with-algolia/issues/107
If there is more information to add, please add it to the issue on Github.
Forum: Plugins
In reply to: [WP Search with Algolia] How is index data pushed to AlgoliaIf you are looking to build your own custom Algolia integrations, I would suggest referring to Algolia’s documentation. Here is their PHP documentation for example https://www.algolia.com/doc/api-client/getting-started/what-is-the-api-client/php/?language=php and they have libraries for use with other languages like JavaScript that you can find in their documentation as well.
Forum: Plugins
In reply to: [WP Search with Algolia] How is index data pushed to AlgoliaThe URL you referenced above does appear to have a section about using WP2Static with WP Search with Algolia https://wp2static.com/addons/algolia/
Beyond that, I am unfamiliar with WP2Static, and I cannot provide support for that particular plugin.
Forum: Plugins
In reply to: [WP Search with Algolia] How is index data pushed to AlgoliaHowdy @daymobrew
Are you using WP Search with Algolia, or are you trying to build a custom solution of your own?
As @ericmulder reported on Github, this appears to be due to an incompatibility or conflict with FacetWP.
https://github.com/WebDevStudios/wp-search-with-algolia/issues/97#issuecomment-707057012
As @ericmulder reported on Github, this appears to be due to an incompatibility or conflict with FacetWP.
https://github.com/WebDevStudios/wp-search-with-algolia/issues/98#issuecomment-707056777
Forum: Plugins
In reply to: [WP Search with Algolia] Algolia Injecting Title into Pinterest PinThe WP Search with Algolia plugin itself has no control over the media or text that Pinterest uses for pins.
The Pinterest issue described appears to be related to Pinterest’s scraper being a little too aggressive and following a link offsite in the autocomplete template.
Once we identified what the issue appeared to be, we moved the autocomplete template (and the Algolia JS libs) from the header to the footer, where Pinterest’s scraper has less of a chance of accidentally following that link offsite.
We have just released WP Search with Algolia 1.5.0 to implement that change.
Please note that Pinterest does cache the results of URLs it has previously scraped. We have no control over that.
The WP Search with Algolia plugin itself has no control over the media or text that Pinterest uses for pins.
The Pinterest issue described appears to be related to Pinterest’s scraper being a little too aggressive and following a link offsite in the autocomplete template.
Once we identified what the issue appeared to be, we moved the autocomplete template (and the Algolia JS libs) from the header to the footer, where Pinterest’s scraper has less of a chance of accidentally following that link offsite.
We have just released WP Search with Algolia 1.5.0 to implement that change.
Please note that Pinterest does cache the results of URLs it has previously scraped. We have no control over that.
Forum: Plugins
In reply to: [WP Search with Algolia] Algolia Injecting Title into Pinterest PinTracking on Github here: https://github.com/WebDevStudios/wp-search-with-algolia/issues/101#issuecomment-704620875
Tracking on Github here: https://github.com/WebDevStudios/wp-search-with-algolia/issues/101#issuecomment-704620875
Howdy @jdingman
I’ve opened a GitHub issue to track this here https://github.com/WebDevStudios/wp-search-with-algolia/issues/87
I have a strong suspicion that cURL is failing to connect to the Algolia servers, based on reports that I have read from Laravel Scout and Algolia PHP Client users.
It _might_ be possible to overcome the issue by installing a certificate on the server and updating the php.ini to use that certificate, again, I can’t actually test and verify that myself as I do not have a Windows machine to test that on.
More details are in the GitHub issue. If you have any more information that could prove useful, and if you have a GitHub account, feel free to add more information there.
Howdy @jdingman, is there any chance that there is an error like this in the server’s php error log?
cURL error 60: SSL certificate problem: unable to get local issuer certificate (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)