Gravatar for chris.weiss@rbaconsulting.com

Question by chrisweiss, Aug 15, 2016 1:50 PM

Purpose of PageEditorDeferRefresh.js?

(I'm using Coveo for Sitecore 4.0, June release, with Sitecore 8.1 Update 2)

I've been working with the Search components for a while and I stumbled across an issue in Experience Editor. Basically, if I try to add a component to a page that already has a SearchViewResources and SearchBoxView on it (which is every page), the page will not refresh so the component never gets added. I've identified the PageEditorDeferRefresh.js file in the SearchViewResources.cshtml as the culprit.

I've tried commenting it out and Experience Editor starts working normally. I've even tried that when in a search view updating some facets and it's been okay.

So my question is, what am I missing by taking it out?

1 Reply
Gravatar for sbelzile@coveo.com

Answer by Sébastien Belzile, Aug 15, 2016 2:27 PM

Hi Chris,

This file is a "hack" to refresh Coveo components when their properties are being edited in the Experience editor. I do not know what are the effects of removing it: I suppose your Coveo components will not refresh after you edited their properties. I think you should see a couple of JS errors as well when closing your components properties.

Removing it will have no effects on your sites in prod: the file is included only when editing a page in the page editor.

Question to reproduce your issue: The component you are trying to add: is it a Coveo component, something custom? It happens with both?

Gravatar for chris.weiss@rbaconsulting.com

Comment by chrisweiss, Aug 15, 2016 2:51 PM

I have the issue with several components, but they we all made by us. I haven't dug too hard into what happens when we update Coveo components (although what I did try worked okay), but they probably won't be changed by the client.

I think what we'll do is keep that js file commented out for now and leave a note saying if anything needs to be updated within the editor for the Coveo controls, to uncomment it.

Thanks!

Gravatar for sbelzile@coveo.com

Comment by Sébastien Belzile, Aug 15, 2016 2:53 PM

I will log an issue to the Sitecore team to investigate this.

Ask a question