Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. Bug Reports
  3. Internal sever error jQuery code

Internal sever error jQuery code

Scheduled Pinned Locked Moved Bug Reports
8 Posts 4 Posters 179 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mathilde
    wrote on last edited by
    #1

    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!

    Capture d’écran 2021-03-10 à 11.58.17.png

    1 Reply Last reply
    0
    • J Offline
      J Offline
      jsphbngrnd
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • RichardR Offline
        RichardR Offline
        Richard
        Global Moderator
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        • M Offline
          M Offline
          Mathilde
          wrote on last edited by
          #4

          Hi @Richard

          Thank you for your respond!
          Yes, everything is up to date, all plugins have been deactivated, and all CSS or JS removed but the problem still remain.
          I just sent an email with the information you asked.

          Best,
          Mathilde

          1 Reply Last reply
          0
          • RichardR Offline
            RichardR Offline
            Richard
            Global Moderator
            wrote on last edited by Richard
            #5

            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

            1 Reply Last reply
            0
            • M Offline
              M Offline
              Mathilde
              wrote on last edited by
              #6

              Dear @Richard,

              Yes, but i’m not sure to understand everything, I’m not very experimented.

              Could you please tell me how I should write my code, wrapping code in a 'Newpage Event’, so I can see if it’s work ? :)

              Thank you very much!

              Best,
              Mathilde

              1 Reply Last reply
              0
              • arminunruhA Offline
                arminunruhA Offline
                arminunruh
                Global Moderator
                wrote on last edited by
                #7

                Hey Mathilde,

                I believe this could be related to this:
                https://laytheme.com/troubleshooting.html#updating-redirects

                1 Reply Last reply
                1
                • M Offline
                  M Offline
                  Mathilde
                  wrote on last edited by
                  #8

                  hey @Armin-Unruh,

                  Yes it was related to that, thank you for your help!! It's working again :)
                  Have a nice day,

                  Mathilde

                  1 Reply Last reply
                  1
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  I also code custom websites or custom Lay features.
                  💿 Email me here: 💿
                  info@laytheme.com

                  Before you post:
                  1. When using a WordPress Cache plugin, disable it or clear your cache.
                  2. Update Lay Theme and all Lay Theme Addons
                  3. Disable all Plugins
                  4. 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:
                  1. Post a link to where the problem is
                  2. Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
                  3. If the problem is difficult to explain, post screenshots / link to a video to explain it
                  Online Users
                  C
                  craigfeldspar
                  Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
                  laytheme.com
                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Search