Unwanted State Is Kept For Slotlist Entries
Last updated on NOVEMBER 03, 2016
Applies to:Oracle WebCenter Sites - Version 22.214.171.124.0 and later
Information in this document applies to any platform.
We have a multivalued asset association of type any on our Article asset. We use this association to store images and articles that are to be rendered within the article page.
We use a slotlist, with its parentfield attribute set to the Association-named:. Within the slotlist we do a listloop for all assets in the list and read their id and type. From the type attribute we resolve what templates should be avaliable for that asset and store them in a variants-variable. In the loop, after retrieving the information I just described we call the following:
So, if in edit mode: Append a new slot, where a contributor can drag his content. Upon saving the asset, the template will be reloaded and the contributor can choose a template.
The problem is when we're adding new content to slots, and removing content from others there seems to be state stored somewhere. Lets say our association has 4 items, and the 4th is an Image set to use a SpecialImage-template.
When we delete 3 items from our list, save, and add 3 new ones we have a problem. If the 4'th item is not an Image, it fails. Because somehow content server stores this information and could then try to render an Article with a template made for Images.
This is unwanted behavior. There should be no residual state. We remove a slot and create a new one.
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
Million Knowledge Articles and hundreds of Community platforms