Closed harmstyler closed 8 years ago
I am unable to find a converter that doesn't rely on the object already being in the database, otherwise I would submit a PR.
Are we talking about location or content? Because you wrote:
before the new location has been committed to the database
In either case, we can catch the NotFoundException
and return if no content is found. But then what to do in these cases? Leave the object unindexed?
Sorry, yes, a content object. I am in favor of catching the NotFoundException
. In that case then could we create a new pending action to make sure the new content does eventually make it to the index?
Its not perfect. The the new page will not be accessible on the frontend siteaccesses for a few minutes if the site is using the search repository to serve the site, but it seems to be a good compromise to avoid submitting a patch upstream to the legacy kernel.
I'm up for it too. Pending action sounds reasonable :)
Closed by #4
When copying content in the admin, the function
addObject()
fails. It looks like this is because eZ, in the legacy kernel, triggers theaddObject()
before the new location has been committed to the database. TheeZPlatformSearch
plugin seems to require that objects exist in the database in order for theaddObject
function to work (https://github.com/netgen/ezplatformsearch/blob/master/search/plugins/ezplatformsearch/ezplatformsearch.php#L80).