Jump to content

Recommended Posts

Posted

Hello forum,

This is really a weird one, because front end editing works in a earlier website we did to a customer. 

When I check the source code for current website it does initiate front end edit: 

<span id=pw-edit-1 class='pw-edit pw-edit-InputfieldPageTitle' data-name=title data-page=1021 data-lang='1017' style='position:relative'><span 	class=pw-edit-orig>Tekijät</span><span class=pw-edit-copy id=pw-editor-title-1021 style='display:none;-webkit-user-select:text;user-	select:text;' contenteditable>Tekijät</span></span>

 But when I double click nothing happens (yes I'm 100% sure I'm superuser and logged in)

I also tried to apply the front end with other methods than:

$page->edit('title');

But didn't work either.

We are using jquery 2.2.4, so it should not be a problem.

Is this a bug related to current master or something else?

Someone else having this problem as well?

  • 1 month later...
Posted

I think I had this problem in the past and I had to do the following in my template:

{% if page.editable() %}
        <script type="text/javascript" src="{{ config.urls.templates }}scripts/jquery-1.8.3.min.js"></script>
      {% else %}
        <script type="text/javascript" src="{{ config.urls.templates }}scripts/jquery-3.2.1.min.js"></script>
{% endif %}

This is written in Twig, but basically it shows how to check if the page is editable then use this version of jquery, else use a different version of jquery.

You might want to check your web browser's console to see if there are any errors on the page.

Hope that helps

  • 1 year later...
Posted

I prefer to load jquery-migrate for editors after jquery:

if ($page->editable()) { echo '<script src="/path-to-js/jquery-migrate-3.3.2.min.js?NoMinify" defer></script>'; }

This way you have at least the full functionality of the current jquery version for the editors, too.

The same problem is dicussed here.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...