Comments (6)
Hmmm... been digging into this a bit.
The Umbraco FileUploadPropertyValueEditor's ConvertEditorToDb() method expects a "files" collection in editorValue.AdditionalData (https://github.com/umbraco/Umbraco-CMS/blob/7.1.2/src/Umbraco.Web/PropertyEditors/FileUploadPropertyValueEditor.cs#L87) which apparently isn't supplied to Archetype's ArcheTypePropertyEditor ConvertEditorToDb() method (https://github.com/imulus/Archetype/blob/master/app/Umbraco/Umbraco.Archetype/PropertyEditors/ArcheTypePropertyEditor.cs#L114).
It looks like the trouble starts on the client with the fileUploadController's "filesSelected"-event not being fired (https://github.com/umbraco/Umbraco-CMS/blob/7.1.2/src/Umbraco.Web.UI.Client/src/views/propertyeditors/fileupload/fileupload.controller.js#L84). This event handler is supposed to call fileManager.setFiles() (https://github.com/umbraco/Umbraco-CMS/blob/7.1.2/src/Umbraco.Web.UI.Client/src/common/services/filemanager.service.js#L26) to save the selected files in scope. Upon save/publish, the ContentEditController's performSave() method (https://github.com/umbraco/Umbraco-CMS/blob/7.1.2/src/Umbraco.Web.UI.Client/src/views/content/content.edit.controller.js#L149) is called, which in turn calls fileManager.getFiles() to fetch the files saved on scope. Ultimately this leads to contentResource.saveContentItem() (https://github.com/umbraco/Umbraco-CMS/blob/7.1.2/src/Umbraco.Web.UI.Client/src/common/resources/content.resource.js#L29) being called with an empty files collection.
I dunno... does it make sense?
from archetype.
Makes sense in respect to it not working :-).
You got a lot further than me in debugging to get to the "why" - so does this essentially mean it is an Umbraco issue that we'll need to wait to have them fix? Or is it an issue with Archetype?
If its an Umbraco issue or if your fix will take a while then I need to explore other avenues for the property editor experience (this is for a site launching on May 15th). One option I am looking at is to implement my own file upload PE that plays nicely with Archetype - sounds like that would potentially fix the issue?
Regards,
Matt
from archetype.
No... I think it's an Archetype issue. Maybe some wiring up of things that doesn't get done or doesn't work when wrapping the PE in the Archetype fieldset.
@kgiszewski do you have any idea? Is this isolated to the Upload PE or could Archetype have a more general problem with PE's that rely on $scope.$on(...) to work?
from archetype.
The only two core property editors that we have issues with is Upload and Image Cropper. I haven't had a chance to track down what is happening, but I suspect an event is not being fired or something is getting missed on page reload.
The present work around is to avoid upload/image cropper in Archetype directly. Rather use a media picker/MNTP instead. If you want to use the image cropper, it can replace the upload field on the image
media type directly.
from archetype.
No worries - the work-around you mentioned works for me!
from archetype.
Fixed in #281
from archetype.
Related Issues (20)
- Content picker (and probably media picker) label templates don't work in 7.6 HOT 2
- Fail to convert the value when GetValue<int>() ? HOT 4
- Console Error Relating to Preview Images HOT 5
- Missing Placeholder Translation Text for Icon Filter HOT 8
- Convert DataType Drop Down to Select2 HOT 5
- Allow Complex (e.g., JSON) Default Property Values HOT 4
- ToPublishedContentSet Throws Exception for Orphaned Properties HOT 2
- Support Promises and Injected Services for Label Templates HOT 15
- Automatic Newer Version Checks HOT 9
- Fieldset Labels Don't Sanitize Rich Text Immediately HOT 16
- Custom label template broken HOT 12
- Label Templates Not Fully Resolving in Umbraco 7.4.3 HOT 11
- Upgrade Check Ironically Fails to Run on Upgraded Archetype Installs HOT 2
- Label Template not working after Upgrade to 1.17.1 HOT 12
- Courier bundled in (again) HOT 4
- Archetype has been sunset HOT 16
- Fail to convert the value when GetValue<int>() ? HOT 3
- Label template empty until opening archetype HOT 2
- Automapper excpetion -Archetype.Api.ArchetypeDataTypeController
- Update archetype fieldset model field HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from archetype.