meta data for this page
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
sap_hybris_commerce:cms_cockpit_wcms:common_reasons_of_synchronisation_failures [2020/03/05 15:21] – check if sync is active Antonio Robirosa | sap_hybris_commerce:cms_cockpit_wcms:common_reasons_of_synchronisation_failures [2022/10/23 10:02] (current) – [Common reasons of synchronisation failures] Antonio Robirosa | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Common reasons of synchronisation failures ===== | ====== Common reasons of synchronisation failures ===== | ||
- | A common complain of the users which edit content using the CMS Cockpit is that the synchronisation stops working quite often. During | + | A common complain of the users which edit content using the CMS Cockpit is that the synchronisation stops working quite often. During |
+ | |||
+ | Hybris usually only reports “An exception occurred during synchronization” in the logs, so you have to further analyse that the cause of the failure is. | ||
===== Procedure to find out why the synchronization isn't working ===== | ===== Procedure to find out why the synchronization isn't working ===== | ||
Line 34: | Line 36: | ||
===== Errors Categories ===== | ===== Errors Categories ===== | ||
- | ^Category^Causes^Countermeasures^Will happen again?^ | + | ^ Category |
- | ^Duplicate CMS((CMS Items are pages, components, content slots for page or for template, content slots, navigation nodes, navigation nodes and links.)) Items (same UID in the a Catalogue Version)| Unknown | - Creation of unique indexes in the tables with CMS items. Please read the detailed explanation below. |No| | + | ^ The CatalogVersionSyncCronJob and CatalogVersionSyncJob don't synchronize any items after the first execution. |
- | ^Mandatory field with a null value or an invalid PK|- Unlink of the CMS Navigation Entries from the navigation nodes \\ - Bugs in the Impex Scripts which lead to null values in the items \\ - Removal of CMS Items, which where changed after the last synchronization, | + | ^ Duplicate CMS((CMS Items are pages, components, content slots for page or for template, content slots, navigation nodes, navigation nodes and links.)) Items (same UID in the a Catalogue Version) |
- | ^Edition mistakes| \\ - Reference to an object which is in a wrong catalogue \\ - Circular References between catalogues| - Limit the access to the catalogues. If the user can't see other catalogues, he can't choose the wrong one \\ - Training of the users to identify this error before calling the developers |Ja| | + | ^ Many ContentSlotsForPage or ContentSlotsForTemplate for the same position, slot and page | Rename of the content slots for Pages/ |
- | ^Type change of an existent CMS Item| - The same UID points to a CMS components of different types in the source and target catalogues. For example: The carousel components where created and synchronized. Then the same UIDs was used by the new carousels with popularity components. The synchronization will fail because the UID points to components with two different types. | - Remove the components in the target version and synchronize again\\ - Don't reuse the UID. A new component type means new UIDs |Nein| | + | ^ Mandatory field with a null value or an invalid PK | - Unlink of the CMS Navigation Entries from the navigation nodes \\ - Bugs in the Impex Scripts which lead to null values in the items \\ - Removal of CMS Items, which where changed after the last synchronization, |
+ | ^ Edition mistakes | ||
+ | ^ Type change of an existent CMS Item | ||
==== Examples of edition mistakes and empty mandatory fields ==== | ==== Examples of edition mistakes and empty mandatory fields ==== | ||
Line 56: | Line 60: | ||
**In every case the item with the error must have been modified after the last synchronization.** If it isn't, the sync process is going to ignore it unless you select "force update" | **In every case the item with the error must have been modified after the last synchronization.** If it isn't, the sync process is going to ignore it unless you select "force update" | ||
+ | |||
+ | ==== Useful tips to troubleshoot exceptions during the creation/ | ||
+ | |||
+ | If you get an error similar to: | ||
+ | < | ||
+ | d.h.p.c.j.s.AbstractItemCopyContext : An exception occured during synchronization for item: 8796388590637 of type: Content Slot-Beziehung für eine Seitenvorlage | ||
+ | </ | ||
+ | Put a breakpoint inside de.hybris.platform.catalog.jalo.synchronization.GenericCatalogCopyContext# | ||
+ | |||
+ | The cause are usually validate interceptors or after save listeners which prevent creating the target hybris item. | ||
+ | |||
+ | ==== Userful flexible search queries ==== | ||
+ | === Find navigation entries with invalid or missing PKs === | ||
+ | < | ||
+ | select {c.id} catalog, {cv.version} catalogVersion, | ||
+ | from {CMSNavigationEntry as ne | ||
+ | JOIN CatalogVersion as cv | ||
+ | ON {cv.pk} = {ne.catalogVersion} | ||
+ | JOIN Catalog as c | ||
+ | ON {c.pk} = {cv.catalog} | ||
+ | } | ||
+ | where {ne.item} is null | ||
+ | or NOT EXISTS ({{ | ||
+ | SELECT 1 | ||
+ | FROM {CMSItem AS i} | ||
+ | WHERE {i:pk} = {ne.item} | ||
+ | }}) | ||
+ | </ | ||
+ | |||
==== Duplicate CMS Items ==== | ==== Duplicate CMS Items ==== | ||
- | In one project the synchronisation created duplicate | + | In one project the synchronisation created duplicate |
==== Tips ==== | ==== Tips ==== | ||
Line 67: | Line 100: | ||
</ | </ | ||
- | --Tested on SAP Hybris 5.6 | + | --Tested on SAP Hybris |