Closed odelonmiranda closed 4 years ago
Hello,
you need to write a custom contentextractorcallback: https://github.com/la-haute-societe/craft-elasticsearch#contentextractorcallback
Because the default contentextractorcallback function crawl the html content from the page via guzzle.
Hey there, I hope I'm not resurrecting this issue unnecessarily, but I don't think this can be resolved by writing a custom contentextractorcallback
(by itself). It looks like Guzzle throws exceptions on 404 status codes by default, which is getting swallowed by the try/catch
in la-haute-societe/craft-elasticsearch/src/services/ElementIndexerService.php:248
.
In Guzzle, it looks like it's possible to turn off exceptions for 400/500 statuses: https://docs.guzzlephp.org/en/stable/request-options.html#http-errors … it seems like this (handled in la-haute-societe/craft-elasticsearch/src/services/ElementIndexerService.php:241
), coupled with testing for headless mode is necessary before we can adjust the contentextractorcallback
method in the config.
I'm going to see if I can submit a PR on this in the next week or so if somebody isn't able to look into this before then.
We are using a headless implementation of CraftCMS Encountering 404 error.
But since we are using headless we don't have any template