picture attribute not behaving like a media container

Options

The Image on Product (picture attribute) is setup as openTextMediaReferenceSelector.

After an asset is assigned to picture, customer is expecting that the Media Container of the picture is set. Their frontend (e-commerce site) code is looking to display a certain format of a Media Container.

Since the asset assignment is not setting a media container, no image is coming up on the frontend site. (see screenshot below).

I asked them to set the picture as openTextMediaReferenceCollectionSelector. I think even with that, we are not seeing the media container populated.

 

We looked at the picture assignment for a product that they assigned using OOTB Hybris Image editor before. That does show the Media Container with different formats.

How do we set to populate the Media Container of picture?

 

 

Untitled1.png

Comments

  • Hi,

     

    Adding media containers implicitly from assigning to picture is a standard feature; it just needs configuration. For any attribute which when assigned also should create an assignment to gallery attribute and media container you need a local.properties configuration like this:

     

    otmm.otmmAssetSync.mapTo.picture=thumbnail,others,galleryImages

    Which would declare that if you assign something to picture, then also the galleryImages attribute should be assigned. The rendition configuration created for galleryImages will be looked up as well to decide what formats will be part of the media container, so you also need declaration of the galleryImages renditions for example like this:

    otmm.renderings.BITMAP.galleryImages=1,2,3,4,5,6

    (where in turn rendition configuration needs to exist for the enlisted rendition numbers)

    The principle is described in the DAMLink hybris documentation3.1.2 – Configure assignment of implicit attributes

     

    From: eLink Entry: Discuss Digital Asset Management for SAP Solutions [mailto:damforsap@elinkkc.opentext.com]
    Sent: den 13 januari 2016 09:09
    To: eLink Recipient
    Subject: picture attribute not behaving like a media container

     

    [Attachments exceeded pre-set size limits. Use the links provided to access]

    picture attribute not behaving like a media container

     

    Posted by Kosaraju, Niranjan On 01/13/2016 03:08 AM

     

     

    The Image on Product (picture attribute) is setup as openTextMediaReferenceSelector.

    After an asset is assigned to picture, customer is expecting that the Media Container of the picture is set. Their frontend (e-commerce site) code is looking to display a certain format of a Media Container.

    Since the asset assignment is not setting a media container, no image is coming up on the frontend site. (see screenshot below).

    I asked them to set the picture as openTextMediaReferenceCollectionSelector. I think even with that, we are not seeing the media container populated.

     

    We looked at the picture assignment for a product that they assigned using OOTB Hybris Image editor before. That does show the Media Container with different formats.

    How do we set to populate the Media Container of picture?

     

     

    Untitled1.png

     


    Attachment Links:

    Untitled1.png (167 KB)


    [To post a comment, use the normal reply function]

    Forum:

    Discuss Digital Asset Management for SAP Solutions

    Content Server:

    Knowledge Center

     

    Christian Askland
    Director, Product Management

    image

  • The issue is not with implicit attributes like galleryImages, thumbnails etc. The issue is with explicit attribute "picture".

    If you look at the screenshot, I highlighted picture attribute that does not have Media Container set.

     

    Thanks,

    Niranjan

  • Well, you must have an implicit attribute from picture to galleryImages in order for this to happen. That will trigger the actual creation of the Media Container but also cross reference it properly (to be set in container field you highlight).

     

    This is how it looks in our own demo system (RDP to tmdemo.opentext.com), for the main picture attribute assigned with our integration. Since we have from picture also mapped galleryImages a container will be created during assignment and also the media item set for the picture will then reference the created container. See my screenshots below. So AFAIK if you configure it properly this is built to support the standard store front accelerators that rely on the galleryImages / Media Containers to pick the right asset.But you must at one point have an implicit mapping to a Media Container attribute from the picture attributein which normally in standard hybris is done with assigning the gallery attribute in parallel to the individual media attributes.

     

    image

    image

     

    From: eLink Entry: Discuss Digital Asset Management for SAP Solutions [mailto:damforsap@elinkkc.opentext.com]
    Sent: den 13 januari 2016 09:35
    To: eLink Recipient
    Subject: RE RE picture attribute not behaving like a media container

     

    RE RE picture attribute not behaving like a media container

     

    Posted by Kosaraju, Niranjan On 01/13/2016 03:34 AM

     

     

    The issue is not with implicit attributes like galleryImages, thumbnails etc. The issue is with explicit attribute "picture".

    If you look at the screenshot, I highlighted picture attribute that does not have Media Container set.

     

    Thanks,

    Niranjan


    [To post a comment, use the normal reply function]

    Topic:

    picture attribute not behaving like a media container

    Forum:

    Discuss Digital Asset Management for SAP Solutions

    Content Server:

    Knowledge Center

     

    Christian Askland
    Director, Product Management

    image

  • The reason I didn't have implicit attribute from picture to galleryImages is that Epson doesn't want galleryImages to be generated from picture. They wanted galleryImages to be generated from normals.

    Anyway just to get to the position that you are in, I set galleryImages to be derived from picture like this:

     

    otmm.otmmAssetSync.mapTo.picture=thumbnail,galleryImages

     

     

    But, now I'm getting the following error. What am I doing wrong?

     

     

    INFO   | jvm 1    | main    | 2016/01/13 17:09:04.216 | DEBUG [Thread-46] [10.20.197.165] [AbstractOTMMFacadeImpl] logout():Get from hybris session=s1824889551392, the otmm login session=OtmmSession{loginSession=null; sessionId=null; onBehalfOfUserId=productmanager; asyncStatus=EMPTY}
    INFO   | jvm 1    | main    | 2016/01/13 17:09:04.217 | DEBUG [Thread-46] [10.20.197.165] [OtmmConnectorConfigurationImpl] Use SSO (property "otmm.server.sso", arguments) has value "FALSE"
    INFO   | jvm 1    | main    | 2016/01/13 17:09:04.217 | ERROR [Thread-46] [10.20.197.165] [ExceptionHandler] handleException(): Log ID 17:09_13/01/16_446160
    INFO   | jvm 1    | main    | 2016/01/13 17:09:04.218 | com.opentext.hybris.otmmconnector.exceptions.OtmmRuntimeException: [17:09_13/01/16_446160] de.hybris.platform.servicelayer.exceptions.ModelSavingException: [de.hybris.platform.servicelayer.interceptor.impl.UniqueAttributesInterceptor@599982c5]:ambiguous unique keys {catalogVersion=CatalogVersionModel (8796093153881), qualifier=galleryImages/a8babd19d09710401e8cc156dc351ad0782f1e4b} for model MediaContainerModel (<unsaved>) - found 1 item(s) using the same keys
    INFO   | jvm 1    | main    | 2016/01/13 17:09:04.220 |  at com.opentext.hybris.otmmconnector.service.impl.AssetAssignmentServiceImpl.performSynchronousAssetAssignment(AssetAssignmentServiceImpl.java:374)
    INFO   | jvm 1    | main    | 2016/01/13 17:09:04.221 |  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    INFO   | jvm 1    | main    | 2016/01/13 17:09:04.221 |  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    INFO   | jvm 1    | main    | 2016/01/13 17:09:04.221 |  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    INFO   | jvm 1    | main    | 2016/01/13 17:09:04.222 |  at java.lang.reflect.Method.invoke(Method.java:606)
    INFO   | jvm 1    | main    | 2016/01/13 17:09:04.222 |  at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
    INFO   | jvm 1    | main    | 2016/01/13 17:09:04.223 |  at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
    INFO   | jvm 1    | main    | 2016/01/13 17:09:04.223 |  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
    INFO   | jvm 1    | main    | 2016/01/13 17:09:04.224 |  at org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:110)
    INFO   | jvm 1    | main    | 2016/01/13 17:09:04.225 |  at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    INFO   | jvm 1    | main    | 2016/01/13 17:09:04.225 |  at java.lang.Thread.run(Thread.java:745)
    INFO   | jvm 1    | main    | 2016/01/13 17:09:04.226 | Caused by: de.hybris.platform.servicelayer.exceptions.ModelSavingException: [de.hybris.platform.servicelayer.interceptor.impl.UniqueAttributesInterceptor@599982c5]:ambiguous unique keys {catalogVersion=CatalogVersionModel (8796093153881), qualifier=galleryImages/a8babd19d09710401e8cc156dc351ad0782f1e4b} for model MediaContainerModel (<unsaved>) - found 1 item(s) using the same keys
    INFO   | jvm 1    | main    | 2016/01/13 17:09:04.227 |  at de.hybris.platform.servicelayer.internal.model.impl.wrapper.ModelWrapper.invokeValidateInterceptors(ModelWrapper.java:279)
    INFO   | jvm 1    | main    | 2016/01/13 17:09:04.228 |  at de.hybris.platform.servicelayer.internal.model.impl.wrapper.ModelWrapper.validate(ModelWrapper.java:216)
    INFO   | jvm 1    | main    | 2016/01/13 17:09:04.228 |  at de.hybris.platform.servicelayer.internal.model.extractor.impl.DefaultModelExtractor.process(DefaultModelExtractor.java:60)
    INFO   | jvm 1    | main    | 2016/01/13 17:09:04.229 |  at de.hybris.platform.servicelayer.internal.model.impl.DefaultModelService.performPersistenceOperations(DefaultModelService.java:625)
    INFO   | jvm 1    | main    | 2016/01/13 17:09:04.230 |  at de.hybris.platform.servicelayer.internal.model.impl.DefaultModelService.saveAllInternal(DefaultModelService.java:620)
    INFO   | jvm 1    | main    | 2016/01/13 17:09:04.230 |  at de.hybris.platform.servicelayer.internal.model.impl.DefaultModelService.saveAll(DefaultModelService.java:600)
    INFO   | jvm 1    | main    | 2016/01/13 17:09:04.231 |  at de.hybris.platform.servicelayer.internal.model.impl.DefaultModelService.save(DefaultModelService.java:548)
    INFO   | jvm 1    | main    | 2016/01/13 17:09:04.232 |  at com.opentext.hybris.otmmconnector.sync.MediaContainerBuilder.buildMediaContainer(MediaContainerBuilder.java:83)
    INFO   | jvm 1    | main    | 2016/01/13 17:09:04.232 |  at com.opentext.hybris.otmmconnector.sync.AssetToMediaContainerListHandler.apply(AssetToMediaContainerListHandler.java:52)
    INFO   | jvm 1    | main    | 2016/01/13 17:09:04.233 |  at com.opentext.hybris.otmmconnector.sync.AssetSynchronizationImpl.performSyncProcess(AssetSynchronizationImpl.java:642)
    INFO   | jvm 1    | main    | 2016/01/13 17:09:04.234 |  at com.opentext.hybris.otmmconnector.sync.AssetSynchronizationImpl.performAssignment(AssetSynchronizationImpl.java:318)
    INFO   | jvm 1    | main    | 2016/01/13 17:09:04.234 |  at com.opentext.hybris.otmmconnector.sync.AssetSynchronizationImpl.perform(AssetSynchronizationImpl.java:384)
    INFO   | jvm 1    | main    | 2016/01/13 17:09:04.235 |  at com.opentext.hybris.otmmconnector.service.impl.AssetAssignmentServiceImpl.runAssetSyncJob(AssetAssignmentServiceImpl.java:219)
    INFO   | jvm 1    | main    | 2016/01/13 17:09:04.236 |  at com.opentext.hybris.otmmconnector.service.impl.AssetAssignmentServiceImpl.access$0(AssetAssignmentServiceImpl.java:212)
    INFO   | jvm 1    | main    | 2016/01/13 17:09:04.236 |  at com.opentext.hybris.otmmconnector.service.impl.AssetAssignmentServiceImpl$1.execute(AssetAssignmentServiceImpl.java:334)
    INFO   | jvm 1    | main    | 2016/01/13 17:09:04.237 |  at com.opentext.hybris.otmmconnector.service.impl.AssetAssignmentServiceImpl$1.execute(AssetAssignmentServiceImpl.java:1)
    INFO   | jvm 1    | main    | 2016/01/13 17:09:04.238 |  at de.hybris.platform.servicelayer.session.impl.DefaultSessionService.executeInLocalView(DefaultSessionService.java:107)
    INFO   | jvm 1    | main    | 2016/01/13 17:09:04.238 |  at com.opentext.hybris.otmmconnector.service.impl.AssetAssignmentServiceImpl.doExportAndAssign(AssetAssignmentServiceImpl.java:330)
    INFO   | jvm 1    | main    | 2016/01/13 17:09:04.239 |  at com.opentext.hybris.otmmconnector.service.impl.AssetAssignmentServiceImpl.performSynchronousAssetAssignment(AssetAssignmentServiceImpl.java:367)
    INFO   | jvm 1    | main    | 2016/01/13 17:09:04.240 |  ... 10 more
    INFO   | jvm 1    | main    | 2016/01/13 17:09:04.240 | Caused by: de.hybris.platform.servicelayer.interceptor.InterceptorException: [de.hybris.platform.servicelayer.interceptor.impl.UniqueAttributesInterceptor@599982c5]:ambiguous unique keys {catalogVersion=CatalogVersionModel (8796093153881), qualifier=galleryImages/a8babd19d09710401e8cc156dc351ad0782f1e4b} for model MediaContainerModel (<unsaved>) - found 1 item(s) using the same keys
    INFO   | jvm 1    | main    | 2016/01/13 17:09:04.242 |  at de.hybris.platform.servicelayer.interceptor.impl.UniqueAttributesInterceptor.onValidate(UniqueAttributesInterceptor.java:159)
    INFO   | jvm 1    | main    | 2016/01/13 17:09:04.242 |  at de.hybris.platform.servicelayer.internal.model.impl.wrapper.ModelWrapper.invokeValidateInterceptors(ModelWrapper.java:272)
    INFO   | jvm 1    | main    | 2016/01/13 17:09:04.243 |  ... 28 more

     

    Thanks,

    Niranjan