Error resolving SpeakUI scripts in Sitecore

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

2017-03-31_152916

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

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

2017-03-31_153237

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:

2017-03-31_153530.png

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"/>

2017-03-31_153809.png

Hope this helps!

Advertisements

, , , , , , , , , , , , , ,

  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: