I am creating a custom section to edit products; I would like to use some Umbraco datatypes to make my life easier, for example the richtext editor, which I have been having problems with.
I thought I'd start with something a bit easier and use the Tags datatype; it's half working!
As with the Richtext, the server side stuff all displays correctly, but none of the client-side functionality works; with the Tags, I get "Uncaught TypeError: Object #<Object> has no method 'autocomplete'" which implies to me that something is wrong with jQuery UI.
Everything works on the normal sections; I am basing my custom section page on the correct Umbraco master, and everything looks like it should be working.
First of all, has anyone come across this?
Secondly, is there a way of disabling the ClientDependencyHandler and just having normal script includes so I can spot the difference between my page and the normal working sections? I tried removing everything related in web.config but that just didn't load anything. Which is entertaining.
Okay, a bit closer! I went into editContent.aspx and included various extra scripts from there; that still didn't do it as the autocomplete was not in there.
I fixed this by adding a JsInclude to Application/JQuery/jquery.autocomplete.js, whihc then worked but was not styled. I then hardcoded a reference to /umbraco/css/umbracoGui.css, and it all looked like it was working - the autocomplete works, the drop down is displayed and styled - however, I get no updates, and the checkbox list of applied tags is not displayed.
Looking at the XHR logging, it seems that the autocomplete is sending a POST back to the page it is on - which of course, being my page, knows nothing about this action (it inherits from umbracoEnsuredPage, but that doesn't seem to know either).
Is there anyway around this? Is it actually possible to use the Umbraco data editors in your own custom section? Or should I give up now and just code everything bespoke? I am heading that way at the moment!
Disabling ClientDependencyHandler / Datatypes / Custom section
I am creating a custom section to edit products; I would like to use some Umbraco datatypes to make my life easier, for example the richtext editor, which I have been having problems with.
I thought I'd start with something a bit easier and use the Tags datatype; it's half working!
As with the Richtext, the server side stuff all displays correctly, but none of the client-side functionality works; with the Tags, I get "Uncaught TypeError: Object #<Object> has no method 'autocomplete'" which implies to me that something is wrong with jQuery UI.
Hmmm, should have searched on Google rather than the forum search; you can disable ClientDependency with:
Still like to know if anyone has seen and solved this issue though :o)
Sorry for talking to myself like this, but I figure it might help someone else if I put up my findings :o)
Basically, the Umbraco sections put up a shed load more scripts than my custom section, including, probably importantly in this case, <script type="text/javascript" src="/umbraco_client/Application/JQuery/jquery.autocomplete.js?cdv=1">
I can hardcode these in to get everything working, but it'd be nice to know what it is that includes them in the built in pages.
Okay, a bit closer! I went into editContent.aspx and included various extra scripts from there; that still didn't do it as the autocomplete was not in there.
I fixed this by adding a JsInclude to Application/JQuery/jquery.autocomplete.js, whihc then worked but was not styled. I then hardcoded a reference to /umbraco/css/umbracoGui.css, and it all looked like it was working - the autocomplete works, the drop down is displayed and styled - however, I get no updates, and the checkbox list of applied tags is not displayed.
Looking at the XHR logging, it seems that the autocomplete is sending a POST back to the page it is on - which of course, being my page, knows nothing about this action (it inherits from umbracoEnsuredPage, but that doesn't seem to know either).
Is there anyway around this? Is it actually possible to use the Umbraco data editors in your own custom section? Or should I give up now and just code everything bespoke? I am heading that way at the moment!
is working on a reply...