cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Problem with multivalued classifications

Former Member
0 Kudos
2,549

Hi all,

after upgrading from Hybris 6.7.0.2 to v1808 we are facing errors with the usage of multivalued classification values (ProductFeatures).

 ERROR [SyncWorker<000001JO 1 of 1>] [AbstractItemCopyContext] error setting partOf attribute features : item 8796264235627 no longer valid (was removed): object no longer valid
 item 8796264235627 no longer valid (was removed): object no longer valid

Did anyone of you faced the same error? Is there any Hotfix-Solution for it?

Regards,

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi ,

we're currently facing the same issue with multi valued features.

We recognized, that there is a difference in the implementation between 6.7 and 1808.

The GenericCatalogCopyContext has an additional method preProcessMultiValuedProductFeatures(...) which is called in the translate(..) method.

In our case, we're using classification on variants - the electronics store is using classification only on main products. As far as we know, there are no problems in the electronics store, maybe the classification on variants is the problem. Do you have a similar product model?

We thought it might be a solution if we extend the CopyContext. Do you have any further ideas?

Thanks and regards Florian

Former Member
0 Kudos

Hi Florian,

nope, our product model differs. We are using classification attributes both on the base product and on the variants and both have multivalued attributes.

For now we commented those attributes (waiting for a fix from hybris side) as we're still in development and there is no need to hurry. So i forwarded this finding to our PO who should have raised a SAP Bug.

I will take a look at your finding the next days. Also came to the point that it is somewhere in the CopyContext, but needed to stop further investigation. 😕

Regards, Tim

tino_kissig
Active Participant
0 Kudos

You are right. This was introduced in 6.6.0.8.

https://help.hybris.com/6.6.0/hcd/cba026d2b36c4ab18f89525df92cc815.html

This method removes always all multivalued product features from the target product.

This seems to be a "fix" for https://jira.hybris.com/browse/ECP-2451 "The value of the multivalued classification attribute is deleted from online catalog after synchronization"

Answers (2)

Answers (2)

Former Member
0 Kudos

Still not fixed...

Former Member
0 Kudos

Hi.

i was able to reproduce the problem with an ootb B2C-Accelerator of 1808, by classifying a variant product with a multivalued classification attribute.

Here is the impex I've used:

 $classificationCatalog = Apparel-Classification
 
 # Classification catalog
 INSERT_UPDATE ClassificationSystem;id[unique=true]
                                   ;$classificationCatalog
 
 # Insert Classifications System Version
 INSERT_UPDATE ClassificationSystemVersion;catalog(id)[unique=true];version[unique=true];active
                                          ;$classificationCatalog;1.0;true
 
 
 
 
 
 $productCatalog = apparelProductCatalog
 $catalogVersion = catalogversion(catalog(id[default = $productCatalog]), version[default = 'Staged'])[unique = true, default = $productCatalog:Staged]
 $classCatalogVersion = catalogversion(catalog(id[default = '$classificationCatalog']), version[default = '1.0'])[unique = true, default = '$classificationCatalog:1.0']
 $classSystemVersion = systemVersion(catalog(id[default = '$classificationCatalog']), version[default = '1.0'])[unique = true]
 $class = classificationClass(ClassificationClass.code, $classCatalogVersion)[unique = true]
 $supercategories = source(code, $classCatalogVersion)[unique = true]
 $categories = target(code, $classCatalogVersion)[unique = true]
 $attribute = classificationAttribute(code, $classSystemVersion)[unique = true]
 $defaultAttributeValues = defaultAttributeValues(code, $classSystemVersion)
 $unit = unit(code, $classSystemVersion)
 
 
 # Insert Classifications
 INSERT_UPDATE ClassificationClass; $classCatalogVersion; code[unique = true]       ; allowedPrincipals(uid)[default = 'customergroup']
                                  ;                     ; apparel_Classification  ;
 
 INSERT_UPDATE ClassificationAttributeValue; $classSystemVersion; code[unique = true]; name[lang=en];
                                           ;                    ; hasLining_1        ; has Lining
                                           ;                    ; hasLining_2        ; has no Lining
 
 
 INSERT_UPDATE ClassificationAttribute; $classSystemVersion; code[unique = true]; name[lang = de]   ; $defaultAttributeValues
                                      ;                    ; hasLining          ; Lining            ; hasLining_1,hasLining_2
 
 
 INSERT_UPDATE ClassAttributeAssignment; $class                ; $attribute    ; position; $unit; attributeType(code[default = enum]); multiValued[default = true]; range[default = false]; localized[default = false]; mandatory[default = false]
                                       ; apparel_Classification ; hasLining     ; ; ; ; ; ; ; ;
 
 
 
 
 
 UPDATE Product;$catalogVersion;code[unique=true];supercategories(code)[mode=append];
               ;;M25687_W;apparel_Classification;
               ;;M25687_B;apparel_Classification;
               ;;M34704_B;apparel_Classification;
               ;;M35392;apparel_Classification;
               ;;M18729;apparel_Classification;
 
 
 $clAttrModifiers=system='$classificationCatalog',version='1.0',translator=de.hybris.platform.catalog.jalo.classification.impex.ClassificationAttributeTranslator
 $feature=@hasLining[$clAttrModifiers];
 UPDATE Product;$catalogVersion;code[unique=true];$feature;
               ;;M25687_W;hasLining_1;
               ;;M25687_B;hasLining_1;
               ;;M34704_B;hasLining_2;
               ;;M35392;hasLining_1;
               ;;M18729;hasLining_1;

best regards, Andre

Former Member
0 Kudos

Have you filed a bug at SAP?

geffchang
Active Contributor
0 Kudos

Does the error occur during impex import, or during the sync?

Former Member
0 Kudos

It appears during sync.

mpern
Product and Topic Expert
Product and Topic Expert
0 Kudos

I've just tried to reproduce it, but it seems to work with 1808.2 Can you please also try it with the latest patch? With any luck this is resolved

EDIT ok, stacktraces are still thrown, but the sync itself works correctly

Former Member
0 Kudos

Sounds like they just try-catch'ed it :-D

Former Member
0 Kudos

Anyway thanks for info! We will check that!