Error resolving SpeakUI scripts in Sitecore

While working with Speak UI in Sitecore, I added a new Speak component rendering to my solution.


Once I added this rendering to my speak page, it started throwing a javascript error:

Script error for: /-/speak/v1/client/


After some poking around, I realized that this issue was occurring because of the space in my rendering name!

So while this url was giving a 404: http://redirectmanager.local/-/speak/v1/client/Redirects_Listing.js, the url with the space was working just fine:


So short of customizing the ResolveScript processor (see below screenshot) which is responsible for resolving the rendering script from your folder to the expected url with the set prefix (see below RequireJsCustomHandler setting), the work around would be to avoid spaces in your rendering names for this version and use underscores if you have to!

<!--   SPEAK HTML REQUIRE JS CUSTOM HANDLER             Specifies the prefix that should trigger the HTTP request customer handler (see the customHandlers section in the web.config file).             Default: /-/speak/v1/        -->
<setting name="Speak.Html.RequireJsCustomHandler" value="/-/speak/v1/" patch:source="Sitecore.Speak.config"/>


Hope this helps!


Sitecore rocks add component error

A quick post here, to troubleshoot an error I faced while trying to add a new speak component to my project using Sitecore Rocks.

While trying to add the component, I kept seeing this issue.
“Count not load file or assembly ‘Sitecore.Rocks, Version=, Culture=neytral, PublicKeyToken=a3d60f56f71b90’ or one of its dependencies. The system cannot find the file specified.”

Even though my Sitecore Rocks extension was updated only today, the error persisted.
For some reason however, uninstalling the extension and reinstalling the same and then restarting Visual Studio resolved the issue for me.
Hope this helps!

Any additional information on the root cause of this issue is welcome.