Problems with CMS editor and FullpageJS

So I’m using FullpageJS to create whole scrollable pages. However, my client is having trouble editing the page with the CMS editor. I found already a topic from September 2016 with a solution using jQuery’s noConflict:

Solution:

// needed to use noConflict
$160 = jQuery.noConflict(true);

var Webflow = Webflow || [];

Webflow.push(function () {
  // check is the CMS editor is there
  if (Webflow.env('editor') != undefined) {
    $160('#fullpage').fullpage({
    });
  } 
});

However, when I try to do this, and CMS Editor is active, I get this error with the Webflow-Editor.js file:

Is there a way to solve this, or some changes I can make to my page to enable compatibility?

Here is the link to my page:

Hopefully someone can help me. Thanks in advance!

i don’t have a direct solution for you, but this is whats happening for me, the website still functions fully. No problems at all. I use that exact code indeed, however since the last time i checked the website, im getting the above…

other than that. no problems.

im only using this code related to the scripts

<script src="http://code.jquery.com/jquery-latest.min.js"></script>

<script>
// needed to use noConflict
$160 = jQuery.noConflict(true);
  
var Webflow = Webflow || [];

Webflow.push(function () {  
// check is the CMS editor is there
  if (Webflow.env('editor') != undefined) { 

    $160('#fullpage').fullpage(
      );       

  }        
});
</script>

You do not need these if you place all custom code either in Site Footer or Page Footer code areas, as jQuery will be already loaded by Webflow:

<script src="http://code.jquery.com/jquery-latest.min.js"></script>

// needed to use noConflict
$160 = jQuery.noConflict(true);

So remove your own jQuery include, and change your code to this:

Webflow.push(function () {
  // check is the CMS editor is there
  if (Webflow.env('editor') != undefined) {
    $('#fullpage').fullpage({

    });
  } 
});

Thanks! this worked, sort of. I had to use (Webflow.env('editor') != true) instead. However, once you have logged in once as an editor, the page remembers that you’re an editor and will keep failing to load FullpageJS, so you have to clear the Site Cache to be able to remove any trace of the Webflow editor, and be able to load FullpageJS again correctly.

1 Like

Hey guys, have you discovered any workaround regarding this? One that doesn’t require you to clear the cache everytime you enter the editor?

1 Like