Internal sever error jQuery code
-
Dear Laytheme,
Some time ago I wanted to make a circle turn at the same time as the scroll, for that I used the following jQuery code in the part "Custom <head> content ».
<script> jQuery(window).scroll(function() { var offset = jQuery(window).scrollTop(); offset = offset * 0.4; jQuery('.fixed-element-circle').css({ '-moz-transform': 'rotate(' + offset + 'deg)', '-webkit-transform': 'rotate(' + offset + 'deg)', '-o-transform': 'rotate(' + offset + 'deg)', '-ms-transform': 'rotate(' + offset + 'deg)', 'transform': 'rotate(' + offset + 'deg)', }); }); </script>
It worked perfectly fine so far, but since a few days now, once I click on "save changes" on the custom css and html page, I land on an "Internal server error » message.
After some tests to try to solve the problem, I realized it happened with all Jquery code I use, so I had to take them off.
I don’t understand why, can you please give me some help with that ?
Thank you in advance!
-
Hey Laytheme, I'm experiencing the same issue on two websites!
If you have any idea how to fix this please let us know :D -
Dear @Mathilde @jsphbngrnd
Could you please post a link to your websites, and as always to be sure before moving forwards:
-
Wordpress, Lay Theme & Laytheme's Addons are all up to date ?
-
Any Custom CSS or JS that may interfere is temporarily removed.
-
Any third-party plugins de-activated to see if this resolves the issue.
I know this has happened after a recent update, so likely a bug and will need to forward it - If the above do not help:
Could you please send your website address, /wp-admin/ username and password and a link to this topic to info@laytheme.com?
Will stay posted and talk soon!
Best
Richard -
-
Dear @Mathilde @jsphbngrnd
Please make sure:
Have you read the documentation about applying jQuery/Javascript to LayTheme & wrapping code in a 'Newpage Event' ?https://laytheme.com/documentation.html#custom-javascript
<script> window.laytheme.on("newpageshown", function(layoutObj, type, obj){ }); </script>
Make sure before proceeding :)
Best
Richard -
-
Hey Mathilde,
I believe this could be related to this:
https://laytheme.com/troubleshooting.html#updating-redirects -
hey @Armin-Unruh,
Yes it was related to that, thank you for your help!! It's working again :)
Have a nice day,Mathilde
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it