We have moved to GitHub Issues
Created by Sebastiaan Janssen 08 Jan 2013, 15:35:37 Updated by Shannon Deminick 17 Jan 2013, 22:40:47
Neither the dropdown for Macro's nor the one for Razor scripts are working.
No JS errors.
very odd, i didn't actually change the code for the template editor :P except maybe CSS, will have a look!
This one is very hard to debug, my first thought was to go back in history to see where anything changed in editTemplate and any JS/Css associated with it and splitbutton but I can't see any changes that would affect this in any way. I've debugged and stepped into the splitbutton.js code (which is really tedious because its obfuscated) and the events are firing on click. It goes so far as to call the jquery UI .menu method to invoke the menu but for some reason the drop down list is not displayed. I've tried to directly edit the css in chrome to make it display and can't even do that. Very strange indeed.
Ok, found out why it wasn't working. The jquery.splitbutton.js was being loaded too early in the editTemplate.aspx but this was not changed in recent history as far as I can see so this was an absolute major fluke that this ever worked in the first place. Was due to this:
<umb:JsInclude ID="JsInclude" runat="server" FilePath="splitbutton/jquery.splitbutton.js" PathNameAlias="UmbracoClient" Priority="1" />
which sets the priority to "1" which means it will load before many other things including things this library relies on like jquery ui, etc... I have removed the priority which by default makes it 100.
So the dropdowns do now show, but they don't insert anything. Also the "Insert inline macro" button seems to have disappeared, I suspect it has something to do with these changes as well.
Really strange, as I mentioned I really haven't changed anything in the template editor and what was there before shouldn't have worked in the first place. Will have a look to see what's up.
How about using Microsoft Ajax Minifier? http://ajaxmin.codeplex.com/
@Seb no worries about the JS in that file it is old and legacy. Will cleanup with the correct way to do split buttons soon (like it is done in the view editor)
Assignee: Shannon Deminick
Backwards Compatible: True
Affected versions: 6.0.0
Due in version: 6.0.0