Affects Version/s: 7.0.0 DXP SP3, 7.0.0 DXP FP20, 7.0.X EE, Master
Staging framework has an issue that affects to the publication of changes when the last tag of a content has been removed.
This issue is happening because Staging logic is creating a new service context when importing the content whose values for the attributes assetTags and assetCategories are null. However, Asset Service that handles the logic to add/update tags or categories assumes that when a null assetTags or assetCategories is passed, the asset should not be modified at all. If the tags or categories should be removed from the asset, we should pass an empty list for either assetTags or assetCategories, but we shouldn't pass a null object.
Then, we need to modify the way staging populates these values in the service context so they match the values expected by the asset framework.
Next you can find the steps to reproduce it in Blogs or Documents and Media:
When Content Staging is active for Blogs and/or Documents and Media, publishing content with a tag to Live, then removing it in Staging and publishing again does not remove the tag from the content on Live.
Steps to Reproduce:
- Enable Local Live Staging, and Blogs and Documents and Media Staging
- Publish a Blog post and a Basic Document, both with a tag
- Publish to Live
- Verify that the tag appears on both contents on Live
- Return to Staging, and remove the tags on the content
- Publish to Live
- Check if the tag appears on live
The tags have been successfully removed from the content on both Live and Staging
The tags are removed on Staging, but not on Live.
This affects Blogs and Documents and Media, but not Web Content.
Reproduced on: Tomcat 8.0.32 + MySQL 5.7.17. Portal master GIT ID: 89e51986b026d8302a8aeae54e9ff09178c25a2f.