Conversation
@kjac Thanks for looking at this, but I can't seem to get this PR to fix the issue. Despite implementing this on 7.4.2 and clearing all the caches and what not, I'm still getting:
Here is the JSON that it is saving which is valid JSON:
Where |
Tracing code and it goes through here: and here: The latter is returning false. I'm confused by the form scope fixing his issue. Can you help me understand this a bit? I think the type is If that is all true, I'm not sure where the FWIW, the tags works but just has the annoying log entry at the moment. |
I don't have an IDE open at the moment, but I'll pull a random idea out of my *** in case it happens to be right. Umbraco has some detection of data on publish operations (or maybe it was when fetching property values... I forget). It checks if it looks like JSON, and if so it does something different with that data. Maybe having a tags on a normal Umbraco property allows for this process to work, but maybe with it nested within an Archetype this process gets bypassed? If you are curious about the JSON inference, it is actually causing a core bug. I wrote down the details here a while back: http://issues.umbraco.org/issue/U4-7382 Again, this is a long shot, but thought I'd mention it just in case. Might be worth comparing those parts of the code you linked with a tags inside and a tags outside of Archetype. |
Hmmm good thoughts. Thanks for posting that. |
Oh hey! I've just fixed the client side so the tags datatype works and doesn't throw exceptions to the JS console. Honestly I didn't think to check the Umbraco server logs for errors after the datatype started working client side... so it's quite possible something shows in the logs. I'll dig into this - hopefully this week, depending on how swamped I get with work :) |
My suspicion is that it might be an oddity with the core but I have no proof yet. If I get some time this week I might try to add |
Fixed it with this: 715a2bf I'm on my own branch now for this, will review further after lunch :) |
So this issue is two-fold.
I think @kjac has a fix for the JS in this PR. I've submitted a core PR to fix the logging issue: http://issues.umbraco.org/issue/U4-8345 The problem with the core side of the house is it'll only get resolved in later versions of Umbraco. i.e. someone using 7.2.x or 7.3.x will have to have their log spammed unless the core can backport this fix. @Nicholas-Westby I know I already released 1.12.4 today but if you want to run a custom build for a bit until the next patch release; at least your JS will not freak out. I'm doing some follow up testing right after this to make sure the JS part is at least working. |
This PR solves issue #326.
By reusing the existing hacks for the color picker and upload datatypes, we can support tags and probably also other (built-in or custom) datatypes.
NOTE: This only adds support for tags stored in JSON.
Issue #232 is probably also solved with this PR.