thanks for bringing that up. I had to implement a custom http handler in order to get the picked node name back to manually initialize the media picker control on edit. So my guess would be that this is not working for you at the moment, most likely cause is a missing entry in the web.config file (I am using the excellent PackageActionsContrib package to add that entry).
You should also have 2 entries for the handler in your web.config file, one in httpHandlers (IIS6) and one in handlers (IIS7) which hook up TheFarm.Umbraco.EmbeddedContent.UmbracoNodeNameHandler to umbraco/REST/umbraconodename, can you find these?
@sascha: just to clarify, the package action does work. I had no handler in the web.config, because I do not run the package installer. So I suppose I deserve the pain ;-)
Despite having made all the necessary entries to the web.config (in IIS6 and IIS7 section), the selected content/media items still don't show on existing items...
I checked with Firebug and Fiddler what requests are being made while editing and updating items in the backend, and I didn't see any calls to umbraco/REST/umbraconodename being made at all.
I'm using Umbraco 4.6.1 and version 1.1 of the plugin. I uninstalled an reinstalled the plugin already - unfortunately, this didn't solve my problem...
Does someone have any other suggestions what I could try?
I have implemented a backup solution, which will be used if the handler is not responsive/can't be found. The Embedded Content control will create a new web service when it gets first used at /umbraco/webservices/UmbracoNodeNameService.asmx. When you browse to the url you should see one method, ReadUmbracoNodeName. Can you please verify if that works on your machine?
Thanks for your answer, I checked and the web service is present and working as intended. But the previously selected nodes still didn't show up. I did some further testing and I think I found the reason why: The properties of my items had "bad" aliases. My mediapicker property had an alias of "image" and the one for the contentpicker was called "link". I changed their aliases to "theImage" and "theLink" and suddenly everything worked fine. After some digging around in the javascript code, I could narrow it down to the following javascript function: TheFarm.Umbraco.EmbeddedContent.EditItem
$(valuexml).find('item').each(function () { if ($(this).attr('id') == id) { $(this).children().each(function () { propertyid = $(this).attr('propertyid'); value = $(this).text(); //check for different types type = $(this).attr('type'); if (type == 'Simple editor') { value = $(this).html().replace(/</gi, '<').replace(/>/gi, '>').replace(/&/gi, '&'); EC.FillField(dtdid, value, type, propertyid); } else { EC.FillField(dtdid, $(this).text(), type, propertyid); } }); } });
And here is what happens: The valuexml variable contains the correct data/item nodes, including the "bad" properties with their respective values. However, inside the .each() loop over the properties, $(this).text() is always an empty string "" for the properties "link" and "image". Also, this is only happening in Firefox and not in IE (the code for IE uses a different way of accessing the properties/xml).
Changing the aliases of the mentioned properties did the trick for me. But a solution with javascript would of course be much nicer...
looks like my last reply wasn't properly saved by the forum... Anyway, thanks for your marvellous analysis. To solve the issue hopefully once and for all I've now used another JS library for parsing the XML (http://dojotoolkit.org/), and this one seems to do the trick quite well across all browsers.
Just uploaded version 1.1.1, unfortunately I get an error when I try to edit the package page, so I'm afraid you'll have to download the package yourself from here. Pleaes let me know if that fixes your issue!
Losing images?
- Create a structure including an ImagePicker.
- Edit content, click "add", pick an image, add.
- Click "edit": the image is not set (only "choose")
It works with text fields, not with images. Probably a MediaPicker initialization issue....
Hi Stephen,
thanks for bringing that up. I had to implement a custom http handler in order to get the picked node name back to manually initialize the media picker control on edit. So my guess would be that this is not working for you at the moment, most likely cause is a missing entry in the web.config file (I am using the excellent PackageActionsContrib package to add that entry).
If you go to http://[your-umbraco-hostname]/umbraco/REST/umbraconodename?id=[an existing node id], what do you get?
You should also have 2 entries for the handler in your web.config file, one in httpHandlers (IIS6) and one in handlers (IIS7) which hook up TheFarm.Umbraco.EmbeddedContent.UmbracoNodeNameHandler to umbraco/REST/umbraconodename, can you find these?
Many thanks,
Sascha
Had no handler in the web.config. Oops.
Can you re-install it to see if the package action works this time on your machine?
Goes together with this thread: http://our.umbraco.org/projects/backoffice-extensions/embedded-content/bugs/16500-WebResource-bug
@sascha: just to clarify, the package action does work. I had no handler in the web.config, because I do not run the package installer. So I suppose I deserve the pain ;-)
I'll add the web.config file entries to the package page for everybody who likes to add this package manually. :)
Thanks for clarification,
Sascha
Hi all,
Despite having made all the necessary entries to the web.config (in IIS6 and IIS7 section), the selected content/media items still don't show on existing items...
I checked with Firebug and Fiddler what requests are being made while editing and updating items in the backend, and I didn't see any calls to umbraco/REST/umbraconodename being made at all.
I'm using Umbraco 4.6.1 and version 1.1 of the plugin. I uninstalled an reinstalled the plugin already - unfortunately, this didn't solve my problem...
Does someone have any other suggestions what I could try?
Hi Matthias,
I have implemented a backup solution, which will be used if the handler is not responsive/can't be found. The Embedded Content control will create a new web service when it gets first used at /umbraco/webservices/UmbracoNodeNameService.asmx. When you browse to the url you should see one method, ReadUmbracoNodeName. Can you please verify if that works on your machine?
Many thanks,
Sascha
Hi Sascha
Thanks for your answer, I checked and the web service is present and working as intended. But the previously selected nodes still didn't show up. I did some further testing and I think I found the reason why: The properties of my items had "bad" aliases. My mediapicker property had an alias of "image" and the one for the contentpicker was called "link". I changed their aliases to "theImage" and "theLink" and suddenly everything worked fine. After some digging around in the javascript code, I could narrow it down to the following javascript function: TheFarm.Umbraco.EmbeddedContent.EditItem
And here is what happens: The valuexml variable contains the correct data/item nodes, including the "bad" properties with their respective values. However, inside the .each() loop over the properties, $(this).text() is always an empty string "" for the properties "link" and "image". Also, this is only happening in Firefox and not in IE (the code for IE uses a different way of accessing the properties/xml).
Changing the aliases of the mentioned properties did the trick for me. But a solution with javascript would of course be much nicer...
Cheers,
Matthias
Hi Matthias,
looks like my last reply wasn't properly saved by the forum... Anyway, thanks for your marvellous analysis. To solve the issue hopefully once and for all I've now used another JS library for parsing the XML (http://dojotoolkit.org/), and this one seems to do the trick quite well across all browsers.
Just uploaded version 1.1.1, unfortunately I get an error when I try to edit the package page, so I'm afraid you'll have to download the package yourself from here. Pleaes let me know if that fixes your issue!
Thanks again,
Sascha
Hi Sascha
Very nice! Installed version 1.1.1, changed back my property names and everything works fine in IE and Firefox. Thank you for that quick fix!!
Cheers,
Matthias
Sweet, glad it's working for you now! :)
Sascha
is working on a reply...