Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Not all catalog events are propagated through remote event channel

Found in

EPiServer.Commerce 11.4.1

Fixed in

EPiServer.Commerce 11.5.0

(Or a related package)

Created

Nov 22, 2017

Updated

Dec 07, 2017

Area

Core

State

Closed, Fixed and tested


Description

CatalogEventBroadcaster propagates events through the remote event channel. COM-5489 fixed so that CatalogEventHandler.ContentUpdated, EventContext.EntryUpdated and EventContext.NodeUpdated are raised for meta data only updates. But CatalogEventBroadcaster looks only at the DTO data, so it does not replicate the meta object only updates.

This could prevent correct incremental indexing in Find for Commerce.

Steps to reproduce:
1. Set up a site with Find.Commerce. Make sure you have a identical copy of the catalog in an export file (either the one used to set up the site, or export the site's catalog).
2. Configure logging (EPiServerLog.config) to write debug log of remote catalog update events:
<log4net>
...
<logger name="EPiServer.Find.Commerce.CatalogContentEventListener">
<level value="Debug" />
<appender-ref ref="debugLogAppender" />
</logger>
...
</log4net>

The debugLogAppender can be configured like this:
<log4net>
...
<appender name="debugLogAppender" type="log4net.Appender.RollingFileAppender" >
<!-- Consider moving the log files to a location outside the web application -->
<file value="app_data\SiteDebug.log" />
<encoding value="utf-8" />
<staticLogFileName value="true"/>
<datePattern value=".yyyyMMdd.'log'" />
<rollingStyle value="Date" />
<threshold value="Debug" />
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
<appendToFile value="true" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %level %logger: %message%n" />
</layout>
</appender>
...
</log4net>
3. Re-import the catalog with overwrite (to make sure the catalog is identical to the export file). Events should be captured in the log. Possibly including some EntryIds.
4. Re-import again. Events should be captured in the log, but without EntryIds. This means no reindexing was triggered for anything (because nothing changed).
5. Go to the catalog UI and change some meta data property of a catalog entry, e.g. in the sample catalog change "Brand" of Tops-Tunics-CowlNeck to "NewBrand". Don't change anything else. Publish the change.
6. Go to Find/Overview/Explore and find the entry in step 5. Note how it is indexed with the value you just changed.
7. Re-import the catalog with overwrite. This will overwrite the meta data property you just changed.
Expected: The index is updated to reflect the restored value of the meta data property. The debug log shows an event with the entry ID of the updated entry.
Actual: The index still contains the value set in step 5. There is no event registered in the log for the entry, which explains why the indexing wasn't triggered.