elementor icon indicating copy to clipboard operation
elementor copied to clipboard

🐞 Bug report: Instant.js

Open nathansimons opened this issue 3 years ago • 41 comments

Prerequisites

  • [X] I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
  • [X] The issue still exists against the latest stable version of Elementor.

Description

There is a js error in the console. I have tested by disabling all plugin but it still persists.

Error: Uncaught SyntaxError: Identifier 'a' has already been declared (at instant-page.min.js?ver=3.7.1:formatted:1:1)

Steps to reproduce

  • Click here: https://scheckterspeed.co.za/steps-to-sell-your-car/

  • Inspect page

  • View console

Isolating the problem

  • [X] This bug happens with only Elementor plugin active (and Elementor Pro).
  • [X] This bug happens with a Blank WordPress theme active (Hello theme).
  • [X] I can reproduce this bug consistently using the steps above.

System Info

== Server Environment == Operating System: Linux Software: Apache MySQL version: mariadb.org binary distribution v10.4.25 PHP Version: 7.4.29 PHP Memory Limit: 96M PHP Max Input Vars: 5000 PHP Max Post Size: 128M GD Installed: Yes ZIP Installed: Yes Write Permissions: All right Elementor Library: Connected

== WordPress Environment == Version: 6.0 Site URL: https://scheckterspeed.co.za Home URL: https://scheckterspeed.co.za WP Multisite: No Max Upload Size: 128 MB Memory limit: 40M Max Memory limit: 1024M Permalink Structure: /%postname%/ Language: en-ZA Timezone: Africa/Johannesburg Admin Email: [email protected] Debug Mode: Inactive

== Theme == Name: Twenty Twenty-One Child Version: 1.0.0 Author: Elicus Technologies Child Theme: Yes Parent Theme Name: Twenty Twenty-One Parent Theme Version: 1.6 Parent Theme Author: the WordPress team

== User == Role: administrator WP Profile lang: en_ZA User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36

== Active Plugins == Advanced Custom Fields Version: 5.12.2 Author: Delicious Brains

Classic Editor
	Version: 1.6.2
	Author: WordPress Contributors

Custom Post Type UI
	Version: 1.12.1
	Author: WebDevStudios

Dashboard Welcome for Elementor
	Version: 1.0.6
	Author: IdeaBox Creations

Elementor
	Version: 3.6.6
	Author: Elementor.com

Elementor Pro
	Version: 3.7.1
	Author: Elementor.com

Frontend Reset Password
	Version: 1.2
	Author: Square One Media

Gravity Forms
	Version: 2.6.3
	Author: Gravity Forms

Gravity Forms Advanced Post Creation Add-On
	Version: 1.2
	Author: Gravity Forms

Gravity Forms User Registration Add-On
	Version: 5.0
	Author: Gravity Forms

ManageWP - Worker
	Version: 4.9.13
	Author: GoDaddy

Really Simple SSL
	Version: 5.3.2
	Author: Really Simple Plugins

Slider Revolution
	Version: 6.5.7
	Author: ThemePunch

Smush
	Version: 3.9.11
	Author: WPMU DEV

Temporary Login Without Password
	Version: 1.7.2
	Author: StoreApps

Ultimate WooCommerce Auction Pro
	Version: 1.4.1
	Author: Nitesh Singh

Under Construction
	Version: 3.93
	Author: WebFactory Ltd

Visibility Logic for Elementor
	Version: 2.3.0
	Author: StaxWP

WooCommerce
	Version: 6.5.1
	Author: Automattic

Wordfence Security
	Version: 7.5.10
	Author: Wordfence

WP Mail Logging
	Version: 1.10.4
	Author: Wysija

WP Mail SMTP
	Version: 3.4.0
	Author: WPForms

Yoast Duplicate Post
	Version: 4.4
	Author: Enrico Battocchi & Team Yoast

== Must-Use Plugins == ManageWP - Worker Loader Version: 1.0.0 Author: GoDaddy

== Elements Usage ==

footer : 1
	heading : 4
	icon-list : 1
	image : 1
	nav-menu : 1
	social-icons : 1
	text-editor : 1
header : 1
	button : 6
	icon-list : 1
	nav-menu : 1
	theme-site-logo : 1
page : 6
	button : 5
	form : 1
	heading : 7
	icon-box : 8
	image : 7
	login : 1
	shortcode : 5
	text-editor : 12
	wc-archive-products : 1
	wp-widget-woocommerce_auction_product_search : 1
product : 1
	heading : 3
	image : 1
	shortcode : 1
	text-editor : 1
	woocommerce-product-add-to-cart : 1
	woocommerce-product-data-tabs : 1
	woocommerce-product-images : 1
	woocommerce-product-title : 1
section : 4
	accordion : 1
	button : 2
	heading : 4
	image : 1
	testimonial-carousel : 1
	text-editor : 1
wp-page : 28
	accordion : 8
	animated-headline : 6
	button : 34
	gallery : 1
	heading : 71
	icon-box : 6
	icon-list : 1
	image : 31
	login : 2
	posts : 1
	shortcode : 14
	social-icons : 1
	spacer : 2
	testimonial-carousel : 3
	text-editor : 70
	wp-widget-gform_widget : 5
	wp-widget-rev-slider-widget : 2
	wp-widget-woocommerce_auction_product_search : 1
single-post : 2
	post-info : 1
	post-navigation : 1
	theme-post-content : 1
	theme-post-featured-image : 1
	theme-post-title : 1
single-page : 2
	heading : 3
	login : 1
search-results : 1
	archive-posts : 1
	theme-archive-title : 1
product-archive : 3
	heading : 2
	shortcode : 1
	woocommerce-products : 1
error-404 : 1
	heading : 4

== Elementor Experiments == Optimised DOM Output: Active by default Improved Asset Loading: Active by default Improved CSS Loading: Active by default Inline Font Icons: Inactive by default Accessibility Improvements: Active by default Import Export Template Kit: Active by default Additional Custom Breakpoints: Active by default Hide native WordPress widgets from search results: Active by default : Inactive by default Flexbox Container: Inactive by default Default to New Theme Builder: Active by default Landing Pages: Active by default Colour Sampler: Active by default Favorite Widgets: Active by default Admin Top Bar: Active by default Page Transitions: Active by default Notes: Active by default Form Submissions: Active by default Scroll Snap: Active by default

== Log ==

Log: showing 20 of 302022-05-10 14:42:04 [info] Elementor data updater process has been queued. [array ( 'plugin' => 'Elementor Pro', 'from' => '3.6.5', 'to' => '3.7.0', )] 2022-05-10 14:42:04 [info] elementor-pro::elementor_pro_updater Started 2022-05-10 14:42:04 [info] Elementor Pro/Upgrades - _on_each_version Start
2022-05-10 14:42:05 [info] Elementor Pro/Upgrades - _on_each_version Finished 2022-05-10 14:42:05 [info] Elementor data updater process has been completed. [array ( 'plugin' => 'Elementor Pro', 'from' => '3.6.5', 'to' => '3.7.0', )] 2022-05-18 10:20:58 [info] Elementor data updater process has been queued. [array ( 'plugin' => 'Elementor Pro', 'from' => '3.7.0', 'to' => '3.7.1', )] 2022-05-18 10:21:05 [info] elementor-pro::elementor_pro_updater Started 2022-05-18 10:21:05 [info] Elementor Pro/Upgrades - _on_each_version Start
2022-05-18 10:21:05 [info] Elementor Pro/Upgrades - _on_each_version Finished 2022-05-18 10:21:05 [info] Elementor data updater process has been completed. [array ( 'plugin' => 'Elementor Pro', 'from' => '3.7.0', 'to' => '3.7.1', )] 2022-05-18 10:21:07 [info] Elementor data updater process has been queued. [array ( 'plugin' => 'Elementor Pro', 'from' => '3.7.0', 'to' => '3.7.1', )] 2022-05-18 10:21:07 [info] elementor-pro::elementor_pro_updater Started 2022-05-18 10:21:08 [info] Elementor Pro/Upgrades - _on_each_version Start
2022-05-18 10:21:08 [info] Elementor Pro/Upgrades - _on_each_version Finished 2022-05-18 10:21:08 [info] Elementor data updater process has been completed. [array ( 'plugin' => 'Elementor Pro', 'from' => '3.7.0', 'to' => '3.7.1', )] 2022-06-08 17:03:39 [info] Elementor data updater process has been queued. [array ( 'plugin' => 'Elementor', 'from' => '3.6.5', 'to' => '3.6.6', )] 2022-06-08 17:03:40 [info] elementor::elementor_updater Started 2022-06-08 17:03:41 [info] Elementor/Upgrades - _on_each_version Start
2022-06-08 17:03:43 [info] Elementor/Upgrades - _on_each_version Finished 2022-06-08 17:03:44 [info] Elementor data updater process has been completed. [array ( 'plugin' => 'Elementor', 'from' => '3.6.5', 'to' => '3.6.6', )]

PHP: showing 6 of 6PHP: 2022-05-09 11:58:09 [notice X 15][/usr/www/users/scheccwfwb/wp-content/plugins/elementor/core/common/modules/ajax/module.php::171] Undefined index: data [array ( 'trace' => ' #0: Elementor\Core\Logger\Manager -> shutdown() ', )] PHP: 2022-05-10 14:42:45 [notice X 141][/usr/www/users/scheccwfwb/wp-content/plugins/elementor/modules/dev-tools/deprecation.php::301] The $control_id argument is deprecated since version 3.5.0! [array ( 'trace' => ' #0: Elementor\Core\Logger\Manager -> rest_error_handler() #1: /usr/www/users/scheccwfwb/wp-content/plugins/elementor/modules/dev-tools/deprecation.php(301): class type trigger_error() #2: /usr/www/users/scheccwfwb/wp-content/plugins/elementor/includes/managers/controls.php(523): Elementor\Modules\DevTools\Deprecation -> deprecated_argument() #3: /usr/www/users/scheccwfwb/wp-content/plugins/elementor/includes/managers/controls.php(501): Elementor\Controls_Manager -> register() #4: /usr/www/users/scheccwfwb/wp-content/plugins/visibility-logic-elementor/core/helpers/Controls.php(74): Elementor\Controls_Manager -> register_control() ', )] PHP: 2022-05-10 14:43:30 [notice X 1022][/usr/www/users/scheccwfwb/wp-content/plugins/elementor/modules/dev-tools/deprecation.php::301] The $control_id argument is deprecated since version 3.5.0! [array ( 'trace' => ' #0: Elementor\Core\Logger\Manager -> shutdown() ', )] PHP: 2022-05-10 14:47:36 [notice X 8][/usr/www/users/scheccwfwb/wp-content/plugins/elementor/includes/managers/image.php::81] Undefined offset: 2 [array ( 'trace' => ' #0: Elementor\Core\Logger\Manager -> shutdown() ', )] PHP: 2022-05-12 15:55:10 [error X 1][/usr/www/users/scheccwfwb/wp-content/plugins/elementor-pro/modules/notes/usage.php::161] Uncaught Error: Call to a member function format() on null in /usr/www/users/scheccwfwb/wp-content/plugins/elementor-pro/modules/notes/usage.php:161 Stack trace: #0 /usr/www/users/scheccwfwb/wp-content/plugins/elementor-pro/modules/notes/usage.php(43): ElementorPro\Modules\Notes\Usage->get_first_interaction() #1 /usr/www/users/scheccwfwb/wp-content/plugins/elementor-pro/modules/notes/usage.php(27): ElementorPro\Modules\Notes\Usage->get_usage_data() #2 /usr/www/users/scheccwfwb/wp-includes/class-wp-hook.php(307): ElementorPro\Modules\Notes\Usage->ElementorPro\Modules\Notes{closure}(Array) #3 /usr/www/users/scheccwfwb/wp-includes/plugin.php(189): WP_Hook->apply_filters(Array, Array) #4 /usr/www/users/scheccwfwb/wp-content/plugins/elementor/includes/tracker.php(563): apply_filters('elementor/track...', Array) #5 /usr/www/users/scheccwfwb/wp-content/plugins/elementor/includes/tracker.php(141): Elementor\Tracker::get_tracking_data(false) #6 /usr/www/users/scheccwfwb/wp-includes/class-wp-hook.php(307): Elementor\T [array ( 'trace' => ' #0: Elementor\Core\Logger\Manager -> shutdown() ', )] PHP: 2022-06-01 13:43:45 [notice X 2][/usr/www/users/scheccwfwb/wp-content/plugins/elementor-pro/modules/query-control/module.php::748] Trying to get property 'name' of non-object [array ( 'trace' => ' #0: Elementor\Core\Logger\Manager -> shutdown() ', )]

JS: showing 6 of 6JS: 2022-05-10 11:19:27 [error X 1][https://scheckterspeed.co.za/wp-content/plugins/elementor/assets/js/editor.min.js?ver=3.6.5:2:310649] Cannot set properties of undefined (setting 'footerSaver') JS: 2022-05-12 11:25:20 [error X 3][https://scheckterspeed.co.za/wp-content/plugins/elementor/assets/js/editor.min.js?ver=3.6.5:2:242684] Cannot read properties of undefined (reading 'html') JS: 2022-05-12 11:34:48 [error X 1][https://scheckterspeed.co.za/wp-content/plugins/elementor/assets/js/editor.min.js?ver=3.6.5:2:406153] Cannot read properties of null (reading 'id') JS: 2022-05-12 15:16:12 [error X 1][https://scheckterspeed.co.za/wp-content/plugins/elementor/assets/lib/backbone/backbone.marionette.min.js?ver=2.4.5.e1:24:19952] View (cid: "view1844") has already been destroyed and cannot be used. JS: 2022-06-01 11:27:14 [error X 1][https://scheckterspeed.co.za/wp-content/plugins/elementor/assets/js/editor.min.js?ver=3.6.5:2:344386] NProgress is not defined JS: 2022-06-01 11:32:07 [error X 1][https://scheckterspeed.co.za/wp-content/plugins/elementor/assets/js/editor.min.js?ver=3.6.5:2:335004] Blocked a frame with origin "https://scheckterspeed.co.za" from accessing a cross-origin frame.

== Elementor - Compatibility Tag ==

Dashboard Welcome for Elementor: Compatibility not specified
Elementor Pro: Compatible
Visibility Logic for Elementor: Compatible

== Elementor Pro - Compatibility Tag ==

Visibility Logic for Elementor: Incompatible
			

nathansimons avatar Jun 08 '22 15:06 nathansimons

Hi @nathansimons ,

I followed your "Steps to reproduce" could not find the issue.

P.S. if it's an Elementor bug, we need steps to recreate it in other Elementor sites. Otherwise, we won't be able to find the bug and fix it. If it's and issue on your site, it's not a necessary an Elementor bug.

rami-elementor avatar Jun 26 '22 18:06 rami-elementor

I am also experiencing this error on the admin side when loading the Elementor editor. This causes the editor not to fully load and the elementor-panel-state-loading node to hide the options needed to begin editing (See image). My website is snlphilly.com

Screen Shot 2022-07-16 at 4 29 07 AM

fatimaburke avatar Jul 16 '22 08:07 fatimaburke

Hi @fatimaburke

As mentioned above, we need "Steps to reproduce" to recreate the issue in other environments. If we cant recreate the issue in other sites, we won't be able to fix the issue, as it can be a unique case for your site. Maybe one of the Elementor Addons, one of the WordPress plugins or a bas server configuration.

rami-elementor avatar Jul 20 '22 10:07 rami-elementor

I have same issue. I can confirm that it's related to Elementor's page transitions & preloader feature. If I disable this features, then there is no error. Please check it.

formulaclick avatar Jul 28 '22 15:07 formulaclick

+1 - This is happening with the Page Transitions.

mcrowell avatar Aug 02 '22 21:08 mcrowell

@rami-elementor Steps to reproduce:

  1. Activate Elementor
  2. Activate Elementor Pro
  3. Activate any theme but I'm using Hello theme
  4. Make sure you are loading Font Awesome via Elementor
  5. Turn on Page Transitions
  6. On the frontend, you will see this error in the console:

Uncaught SyntaxError: Identifier 'a' has already been declared (at instant-page.min.js?ver=3.7.3:formatted:1:1)

This is because instant-page.min.js is trying to declare const a (line 7) which is already declare by Font Awesome v4-shims.min.js. These are global variables in external libraries so I'm not sure how you will solve that. Honestly, I think Alexandre Diuelot needs to refactor his instant page script to not use const vars in the global scope. Or at least rename so they aren't as common as single letters. Or just use let.

bfa avatar Aug 19 '22 15:08 bfa

Same issue here

digitalcrayon avatar Sep 07 '22 06:09 digitalcrayon

Same issue here.... Uncaught SyntaxError: Identifier 'a' has already been declared (at instant-page.min.js?ver=3.7.5:1:1)

pasog avatar Sep 12 '22 07:09 pasog

Got the same issue. But when i deactivated a 3rd party plugin related to elementor, it is working.

avinashpudota avatar Sep 20 '22 14:09 avinashpudota

just go in general => permalink and revalidate your permalink and the problem is solved normaly

CamelDesign10 avatar Oct 04 '22 18:10 CamelDesign10

I got this when adding the plugin "Royal Elementor Addons". Disabling page transitions and font awesome didn't fix it.

robwent avatar Oct 07 '22 13:10 robwent

I can confirm Page Transitions create this error. Disabling them “fixed it”.

w3rafu avatar Oct 26 '22 14:10 w3rafu

Same problem and same solution, disabling Page Transitions in Elementor/Settings/Experiments. Elementor 3.81 with Elementor Pro 3.8.0.

brent-e avatar Nov 26 '22 12:11 brent-e

6 months later, still open?

tbba avatar Dec 16 '22 15:12 tbba

I am also facing this issue, I can also confirm that Page Transitions create this error. Disabling them “fixed it”. Elementor - 3.10.0 Elementor Pro - 3.10.1

sekhsoyebali avatar Jan 15 '23 17:01 sekhsoyebali

I can confirm Page Transitions create this error. Disabling them “fixed it”.

DJTOMATO avatar Mar 17 '23 03:03 DJTOMATO

confirm Page Transitions create this error. Disabling them “fixed it”.

roberto-dg avatar Mar 23 '23 10:03 roberto-dg

I am surprised that such an experiment team as Elementor cannot figure out this issue after nearly a year! I am also experiencing the same error (I use Elementor Pro), I am not complaining but it's really disappointing to see plugin developers more concentrating on developing new features rather than to fix existing bugs/issues to make the system better...

kioubizin avatar Apr 24 '23 04:04 kioubizin

May 2023 and the error still persists, it still occurs when using page transitions. Disabling this feature prevents the error, but it is a necessary feature for me. I hope the Elementor team pays attention to this long-standing bug.

mmoraispro avatar May 11 '23 21:05 mmoraispro

I can confirm Page Transitions create this error. Disabling them “fixed it”.

jes-wd avatar Jun 15 '23 00:06 jes-wd

Disabling and fixed...

francoiscreastic avatar Jun 28 '23 17:06 francoiscreastic

@rami-elementor @nicholaszein Please check into this again!

samuelbauer-io avatar Jul 05 '23 07:07 samuelbauer-io

We have the same issue with v4-shims.min.js, any way to disable the v4-shims.min.js file?

thequickcode avatar Jul 18 '23 05:07 thequickcode

It's now July 2023 and the error is still persisting, despite the fact that it gets resolved when the Page transition is disabled. @rami-elementor, instead of continuously saying that you cannot reproduce the error and therefore cannot assist, it would be more proactive to request temporary access to a staging environment and investigate the issue yourself. That's a normal procedure for all the plugin troubleshooting. Really dissapointing!

neharau avatar Jul 18 '23 08:07 neharau

Same issue here ... +1

It's disappointing how the Elementor development team handles issues like this. We are a small marketing agency, and this is our first Elementor site. We are thinking about switching from Gutenberg to Elementor. But since the support team doesn't seem to care about our problems, I'm not sure it's a good idea anymore.

DP-Timon avatar Jul 25 '23 08:07 DP-Timon

Same issue here ... +1 We are getting the same JS-error. Elementor editor is not loading.

thomass4t avatar Aug 02 '23 08:08 thomass4t

ran into this issue with the Theme Builder templates (regular pages were fine). Editor would not load. confirming that going to Elementor > Settings > Features and disabling Page Transitions (setting to Inactive) worked.

kennypu avatar Aug 07 '23 22:08 kennypu

I got the same problem, after enabling the DEBUG mode, I found out it was caused by a "lack of memory".

This is the debug log:

[07-Aug-2023 23:31:23 UTC] PHP Fatal error: Out of memory (allocated 305487872) (tried to allocate 16084992 bytes) in .../wp-includes/functions.php on line 4256

I simply changed my hosting plan and added more memory and the issue was resolved.

Hope it helps.

emami-io avatar Aug 07 '23 23:08 emami-io

caused by a "lack of memory".

This bug is about a client-side JS error. Your solved problem must be unrelated, @emami-io .

As for this issue, proof it can be solved by wrapping the instant.page plugin in an IIFE (it's honestly amazing it isn't already by that script's dev):

Find wp-content/plugins/elementor-pro/assets//lib/instant-page/instant-page.min.js and edit it. Wrap the entire code in IIFE like this:

(function(){

// plugins code here, e.g.: let t,.....

})();

Voila, no more error. Obviously this file will be overwritten upon update of Elementor, and thus your change reverted, which is why the Elementor devs should fix this. @rami-elementor

Also, why is instant.page js when set to active/default only active on Elementor editing pages? Anyway, I'm disabling this Elementor feature.

youri-- avatar Sep 27 '23 13:09 youri--

Looks like no one from Elementor has looked at this unresolved bug and ongoing issue since rami-elementor on Jul 20, 2022???

I am also seeing this error in the browser console when I try to edit certain pages ("edit with Elementor"). The error goes away when I switch off the "Page Transition" feature.

mwittmann avatar Oct 16 '23 03:10 mwittmann