9 votes

How to Render Javascript per page or component?

An alternative to @Gatogordo's option is to use a modular approach to JavaScript using something like requirejs. I wrote a post about using requirejs to organize your js with Sitecore a while a go. ...
Richard Seal's user avatar
  • 19.9k
9 votes
Accepted

Example of populating list in experience profile page with JSON data

I suggest you use a SearchDataSource and then bind it to your ListControl. Check this post for binding example: https://visionsincode.wordpress.com/2016/10/17/put-json-data-in-your-searchdatasource-...
gorhal's user avatar
  • 318
7 votes

Sitecore 9.1 Experience editor throwing JS errors

For us, the problem was an Html.Glass().Editable(...) inside the href of a link. That did not break the Experience Editor in Sitecore 8.1. The init method of Sitecore.PageModes.ChromeManager throws ...
L1NU5's user avatar
  • 126
6 votes
Accepted

Why is my Ajax url not recognizing my sitecore controller or hitting my breakpoint in my sitecore controller?

It's worth mentioning that the route in the question is called out in a setting. The comment above Mvc.IllegalRoutes explains itself a bit. <!-- MVC: Pipe separated list of route URL's that are ...
Teeknow's user avatar
  • 2,477
6 votes
Accepted

Video component YouTube elements are not clickable

The video component is handled by mediaelement.js, you'll need to edit the JavaScript file for this service in order to fix this issue. If you go to /sitecore/media library/Base Themes/Core Libraries/...
Jack Hayward's user avatar
6 votes

Is there a way to write to the Sitecore logs via Javascript? (8.2)

Sitecore supports client-side event logging using JSNLog. Sitecore client logging uses JSNLog which has been wrapped to allow Sitecore to configure it via a patch and to make use of the existing ...
Mahendra Shekhawat's user avatar
5 votes
Accepted

How do I construct a reasonable JS implementation of canExecute() for an Experience Editor Button?

You would have to perform request to the server to check whether your current template meet certain criteria. Request class: using Sitecore.ExperienceEditor.Speak.Server.Contexts; using Sitecore....
Alan Płócieniak's user avatar
5 votes

Is it possible to edit fields in the Page Editor that are shown on hover?

For non-rendered fields, or things that are handled via javascript, etc, I use a combination of Edit Frames and EE views. The EE Views let you present the content in a way that can expose content and ...
Jon Upchurch's user avatar
4 votes

Why is my Ajax url not recognizing my sitecore controller or hitting my breakpoint in my sitecore controller?

First off, @PatrickBarron is absolutely correct about your route. However, there is one other issue that I see. Have you tried dropping the word "Controller" off the name of your controller when ...
Zachary Kniebel's user avatar
4 votes

Example of populating list in experience profile page with JSON data

I think you will find your answer in this blog from Jonathan Robbins. It is quite some code - too much to copy here. An overview of what is all in his example: SubPageCode rendering The Border ...
Gatogordo's user avatar
  • 19.8k
4 votes

How to Render Javascript per page or component?

This might be an opinion based question.. but I'll give the approach I usually take. In general I would keep all css and javascript bundled and minified together. This means visitors will load some ...
Gatogordo's user avatar
  • 19.8k
4 votes
Accepted

Add custom redirect on SPEAK logout

EDIT: Update based on comments If you check the definition of LogoutArgs used in the processor, there is a property called RedirectUrl that is of type: Sitecore.Text.UrlString - if you set this ...
Richard Seal's user avatar
  • 19.9k
4 votes
Accepted

Sitecore FXM with Coveo, dynamic html does not seem to render

Simon, I found an answer. There is an FXM variant of $(document).ready (more details here) So solution is to customize SearchBoxView and substitute existed inline js code with FXM-aware js code: &...
Yury Fedarovich's user avatar
4 votes

Whats is the correct way to implement FXM generated script

In a distributed environment, you must enable the following two configuration files on all the servers: Sitecore.FXM.Bundle.config Sitecore.FXM.config Also, make sure that the following ...
Vlad Iobagiu's user avatar
  • 18.1k
4 votes

How to show a loading image mean while a submit form is being executed in Sitecore 9 Forms

You can add some javascript on your webpage to listen on your submit button and show a loader icon. To have some handles, you can add custom css classes on your submit buttons. This can be done, ...
Bart Verdonck's user avatar
4 votes

Create new user with JSS

It does not exist now. For that you would need an web API which also contains some backend validation to not blow up your user database. In backend you can easily create users using Sitecore API. At ...
Tamás Tárnok's user avatar
3 votes
Accepted

A serious error occurred please contact the administrator

with in Sitecore.ExperienceEditor.Speak.Server.RequestArgs class the method name to execute defaults to Process. Check the last line in below method. public RequestArgs(string commandPath, ...
phani's user avatar
  • 804
3 votes

Why is my Ajax url found when I test in preview mode, but not when I bring up the page in a url I get not found errors

I would recommend creating a custom route for Ajax functionality that doesn't reside in the Sitecore Shell. From my understanding, using the default route of /api/Sitecore only works if you are logged ...
Dylan Young's user avatar
  • 4,304
3 votes

How to Render Javascript per page or component?

Sitecore Habitat solution might have what you are looking for. Pipeline: For each rendering you specify a js/css asset or a line of script. In the mvc.getPageRendering pipeline it gathers up all ...
Chris Auer's user avatar
  • 13.1k
3 votes

jQuery not working properly with Experience Editor

At least you can use the same version of jQuery as it used in Sitecore version, usually /sitecore/shell/Controls/Lib/jQuery/jquery-1.6.4.min.js is used almost for all versions of Sitecore for ...
Sergey's user avatar
  • 31
3 votes

Sitecore 9.1 Experience editor throwing JS errors

I encountered this error when a rendering's Data Source item had a Rich Text field with an unexpected block of Experience Editor markup saved within it. Removing the <span> corrected the issue. ...
medkg15's user avatar
  • 171
3 votes
Accepted

Trigger Google Analytics Events on Sitecore WFFM form submission

The success behavior for a WFFM form offers two options: rendering a success message on the same form page (replacing the form) or redirecting the user to a success page. It would be very hard to ...
Alessandro Faniuolo's user avatar
2 votes
Accepted

Angular JS directive with MVC integration Experience Editor errors

There is a helper method @Html.RawJsEncodedString in my post that you need to use here. You need to wrap you @Html.Sitecore().Field("Title") in that method so that it will encode quotes and correctly ...
Alex Smagin's user avatar
2 votes

JS scripts optimization results in syntax error

This seem to be not a bug in SXA Could check whether you can download some media item (js/css) from media library and see how it behave? I can see server response with error appended to a file after ...
Alan Płócieniak's user avatar
2 votes

Undefined error when clicking Publish in Experience Editor

We were able to track down the issue. It had to do with a pipeline patch in the mvc.getRenderer pipeline--we were patching in before "Sitecore.Mvc.Pipelines.Response.GetRenderer.GetViewRenderer, ...
Mark's user avatar
  • 203
2 votes

Sitecore jQuery version compatibility

There are some ideas here that you might be able to use Steve: Dealing with jQuery version collisions in WFFM e.g unloading jquery after testing it: if (typeof jQuery != 'undefined' && ...
Adam Seabridge's user avatar
2 votes

Sitecore Experience Editor not working with ".slick" command

I know this is old but I faced a similar issue with slick and experience editor. Slick by default will assume that all direct children of the carousel div should be slides and since EE injects its own ...
AJ -'s user avatar
  • 219
2 votes

Whats is the correct way to implement FXM generated script

You need to set the FXM.Hostname setting to a hostname that is handled by your CD server. Use a config patch like this: <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> <...
Ben Golden's user avatar
  • 3,303
2 votes
Accepted

How to extend SXA components scripts?

Starting form SXA 1.7 we've added an option to extend the component's script and we are using it also in the SXA to change the behaviour of few components in the Edit mode. You can create new Theme ...
Dawid Rutkowski's user avatar
2 votes
Accepted

loading partial view from jquery

As there are many ways to solve this issue, I ended up using a combo of modifying my controller code and pulling in the view through an ajax call. Here's the final solution. Controller [HttpGet] ...
Nick's user avatar
  • 159

Only top scored, non community-wiki answers of a minimum length are eligible