U4-6724 - Moving content with JSON Tags adds extra characters

Created by Jonas Boye 17 Jun 2015, 15:26:34 Updated by Paul Sterling 12 Jan 2016, 21:06:49

Relates to: U4-7697

What did you do?

  • Installed 7.2.6 + Fanoe
  • Changed Tag datatype to JSON instead af CSV
  • Added a Tag property to Doctype
  • Added tags to my content
  • Moved some content from one parent to another
  • Added this to my view @foreach (var tag in UmbracoContext.Application.Services.TagService.GetAllContentTags()) {

    @tag.Text

}

What did you expect to happen? To see a list of my tags

What actually happened? Some of the tags had quotes and square brackets like this: {{Our Umbraco "Umbraco" "Hello"] ["World"}}

2 Attachments

Comments

Craig Noble 27 Jun 2015, 12:11:23

Ill look into this


Craig Noble 28 Jun 2015, 22:17:03

I've replicated a bug and created a fix for this.

Will provide more information in a new comment and provide a pull request for it.


Craig Noble 28 Jun 2015, 23:14:15

Problem: The TagPropertyDefinition class that provides the tag definition on how to parse the tag is always in CSV modes. This affects the way the TagExtractor parses the value - which is causing this issue.

There was also an additional issue when prevalues were retrieved for the tag property type, line 456 in VersionableRepositoryBase. Distinct was being called, which meant 'storageType' wasn't being returned and only 'group' was being returned. Shortly after this, the TagExtractor is called with the prevalues retrieved.

Solution: I fixed the line retrieving prevalues on line 456. I have also updated the TagPropertyDefinition to check the 'storageType' prevalue and check if it is set to be JSON and set the TagCacheStorageType accordingly.

Pull request: https://github.com/umbraco/Umbraco-CMS/pull/733


Priority: Normal

Type: Bug

State: Fixed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted: Pull request

Affected versions: 7.2.6

Due in version: 7.3.0

Sprint:

Story Points:

Cycle: