netgen / ezplatformsearch

eZ Platform Search is an eZ Publish legacy extension that integrates eZ Platform search capabilities into eZ Publish legacy
https://netgen.io
GNU General Public License v2.0
10 stars 5 forks source link

Switch from ezpublish.api.persistence_handler to ezpublish.api.storagine #16

Closed lolautruche closed 5 years ago

lolautruche commented 5 years ago

Switch from ezpublish.api.persistence_handler to ezpublish.api.storage_engine in order to avoid unwanted side effects when indexing. An example is when having a ezbinaryfile field. When loading the field value, \eZ\Publish\Core\MVC\Symfony\FieldType\BinaryBase\ContentDownloadUrlGenerator will be called in order to generate value for BinaryFile\Value::$uri. Problem is that using ezplatformsearch, the URI will be generated using admin siteaccess and cached as is in persistence cache.

This patch does not completely fix the problem, which is at the fieldtype level but using ezpublish.api.storage_engine workarounds the issue and avoids it to repeat with similar field types.

emodric commented 5 years ago

Thanks @lolautruche!

emodric commented 5 years ago

Released it as 1.2.3

lolautruche commented 5 years ago

Thanks !