Website Issue due to JS Error

Hi

I was trying to create a page with Elementor Pro plugins (Landing page with redirect) which didn’t work.

There is a JS Error which is preventing this.

Gabriel replied
Jun 3, 9:45
Thank you for sending that Arosha.

The issue is due to the js error linked to your theme.
This has to be sent to your theme support as it can lead to further issues.
When a default theme of WordPress such as Twenty Sixteen is used the form works properly and the redirect as well.
The JS error seen in the console of the browser:

main.min.js?ver=20180213:1 Uncaught TypeError: Cannot read property ‘top’ of undefined
at HTMLDocument. (main.min.js?ver=20180213:1)
at i (jquery.js?ver=1.12.4:2)
at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4:2)
at Function.ready (jquery.js?ver=1.12.4:2)
at Function.holdReady (jquery.js?ver=1.12.4:2)
at Object. (scripts.js?ver=4.9.6:69)
at Object. (jquery.js?ver=1.12.4:2)
at i (jquery.js?ver=1.12.4:2)
at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4:2)
at Object.e.(/thank-you/anonymous function) [as resolve] (https://www.ethnicspeeddating.com.au/wp-includes/js/jquery/jquery.js?ver=1.12.4:2:29192)

I need to fix this. How do I fix this as it’s linked to you theme?

  • landing page.

My website - www.ethnicspeeddating.com.au

Thanks
Arosha

Hello Arosha,

Thank you for getting in touch.

The error seems to be appeared only on this page, in which the go to top button doesn’t present.

To fix it, try adding a new blank Text Editor module/element. In the text editor, switch to Text mode. Then insert this code:

<a class="go-top" style="opacity: 0;"><i class="fa fa-angle-up"></i></a>

31 AM

Then clear any applied cache before reloading your page, as it usually blocks recent changes to take effect. https://codex.wordpress.org/I_Make_Changes_and_Nothing_Happens

Let me know how it works.

Regards,
Kharis

Hi

This didn’t work at all. The issue is this page is the Template I used for this page is Elementor Canvas. The other pages are full width template. I can’t use this template for this as I don’t want the header for the landing page.

Please can you give me some other suggestion.

Thanks
Arosha

Hello Arosha,

Please try adding the below HTML code with Text editor element whenever Elementor Canvas template enabled.

   <div class="site-header" style="height:30px; opacity:0; position: absolute; top: -9999px;"></div>

24 AM

Regards,
Kharis