Jump to content

Recommended Posts

Posted (edited)

I try to geht frontend editing to work, but there are js errors.
There are hints in the forum concerning jquery versions. I use some jquery for the frontend - at the moment version 3.6. 
When I delete the jquery reference in the head of the template, then frontend-editing works fine. In the other case it works too but the field editor ist shown very narrow to the left side of the modal.

So what ist correct way to handle both, jquery for the website and for frontend editing?

Update:

Could fix it by myself with moving all my script references from head to end of template file.

Edited by planmacher
  • Like 1
Posted
9 hours ago, planmacher said:

So what ist correct way to handle both, jquery for the website and for frontend editing?

Even though I haven't used jQuery in a long time I know that both backend and frontend are independent from another in most cases - unless you use some modules like FormBuilder or LoginRegisterPro which use jQuery on their own.

So therefore it shouldn't be a problem to use different version until some backend modules (like those mentioned aboved) come into play. There could still be issues for when you are an admin and both jQuery scripts are loaded (in some weird cases, like cache or whatever).

In your case ProcessWire's jQuery might be necessary for frontend-editing to make it work. Your solution works for now, but maybe you could try another approach like putting your scripts into an if-statement and only load your jQuery in case someone is NOT logged-in.
See: https://processwire.com/api/ref/user/is-loggedin/

 

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...