Index not auto building
We have a site where we are generating a report view of orders placed in CartThrob. The client reported not being able to see certain orders. Deduced that the orders post EE3 upgrade were not showing, ran the index again on that channel, they then showed up in the search. However, orders placed since running the index again are not being addd to the index automatically.
Replies
Low 28 Aug 2017 07:51
Are those report views entered in the system using EE's API (and thus triggering hooks), or are you directly inserting them into the DB? EE changed their hooks in EE3, so the hook "entry_submission_end" is not called anymore. Instead LS uses the EE3 hook "after_channel_entry_save" to automatically update the index.
James Carter 28 Aug 2017 13:02
The page outputs all orders in a paginated view on load. All orders are showing correctly. However, when a search is added to low search in the page, it should be searching all orders in one collection. It is only finding orders previous to the last time I manually ran an index.
Low 28 Aug 2017 13:06
The point is, if the entry (order) is added to the database in such a way that it doesn't trigger EE's extension hooks, there's not much LS can do. So, I'm not sure how CartThrob is adding those orders to its orders channel, but if it's not using EE's Entry Model methods, the new channel entry extension hooks won't be triggered, and therefore LS cannot add those new entries to its index automatically.
James Carter 28 Aug 2017 13:24
Thanks, will check-in with CartThrob.