-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSON not minified & errors out by persisting to dataNvarchar in cmsPropertyData #92
Comments
OK... ValueType is set to JSON on the PropertyEditor attribute, which in theory should persist as ntext. This could be an Umbraco bug... |
OK this appears not to be an Umbraco bug, but a dependency problem with Teacommerce, as the built-in Image Cropper functions correctly and persists to the dataNtext column in cmsPropertyData. Interestingly, the variant editor is the only datatype that's not using the new package.manifest format. I'm wondering if that may fix the issue. |
Some good investigation work @benjaminhowarth1 Pretty interesting. If the same can be achieved with the manifest file, that is currently done via the code file, I'm happy to move it. The only thing we need to consider however is what happens for people upgrading? Will it loose the value because it's now looking elsewhere? Is there a way to move the value over? We have an in build migration system, so that might be what we need to use. |
We should be able to identify any propertyType using the editor, then update the cmsPropertyData accordingly. That would do it. |
Minification of JSON in Umbraco is covered here & I've submitted a corresponding PR. |
Isn't the main problem here that something is persisted to nvarchar instead of ntext? The datatype should have a
From reading this forum post, adding that now will unfortunately not work for existing installs, the only way to fix it is to remove and re-add the datatype. Of course you could probably go into the FYI modifying the database schema as you did here will probably lead to upgrade problems in the future. |
The issue is the PropertyEditor attribute does have |
Variant data is persisted to the dataNvarchar column in Umbraco 7.15, which is capped at 500 characters. Also, the JSON is not minified (unsure if this is just a debug/release issue), which leads to a ridiculous amount of whitespace, as per https://our.umbraco.com/packages/website-utilities/tea-commerce/tea-commerce-support/99189-bug-in-data-truncation-on-cmspropertydata.
PR incoming shortly.
The text was updated successfully, but these errors were encountered: