Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

elementorFrontend.init() create duplicates of .sub-arrow (Wordpress Menu widget) #27208

Open
6 tasks done
vladninja opened this issue May 2, 2024 · 0 comments
Open
6 tasks done
Labels
status/awaiting_triage Indicates when an Issue, Pull Request, or Discussion awaits to be triaged.

Comments

@vladninja
Copy link
Contributor

vladninja commented May 2, 2024

Prerequisites

  • I have searched for similar issues in open and closed tickets and cannot find a duplicate.
  • I have troubleshooted my issue, and it still exists against the latest stable version of Elementor.

Description

When I am calling the elementorFrontend.init() method to reinit the Elementor scripts in some places, that cause a problem with a Wordpress Menu widget with the language dropdown option.
image

As a workaround I am currently using a JS script which I am running after the calling init method.

let menus = jQuery('ul[data-smartmenus-id] .elementor-nav-menu--dropdown')
  jQuery.each(menus, function(index, item) {
    jQuery(item).closest('[data-smartmenus-id]').smartmenus('refresh')
  })

I am found the refresh method on the smartmenus library and it seems work as expected.

Steps to reproduce

  1. Create a Wordpress menu with a Language menu Item (I am using Polylang)
    image
  2. Add the Wordpress Menu widget to the Header Elementor template (horizontal layout)
  3. On any of the pages call elementorFrontend.init()
  4. The .sub-arrow will be added multiple times

image

Expected behavior

After calling the elementorFrontend.init() the .sub-arrow not be duplicated

Isolating the problem

  • This bug happens when only the Elementor (and Elementor Pro) plugins are active.
  • This bug happens with the Hello Elementor theme active.
  • I can reproduce this bug consistently by following the steps I described above.

Elementor System Info

Click to reveal
== Server Environment ==
	Operating System: Linux
	Software: Apache/2.4.54 (Debian)
	MySQL version: MySQL Community Server - GPL v8.0.31
	PHP Version: 7.4.33
	PHP Memory Limit: 256M
	PHP Max Input Vars: 1000
	PHP Max Post Size: 8M
	GD Installed: No
	ZIP Installed: Yes
	Write Permissions: All right
	Elementor Library: Connected

== WordPress Environment ==
	Version: 6.2.4
	Site URL: http://localhost:8083
	Home URL: http://localhost:8083
	WP Multisite: No
	Max Upload Size: 2 MB
	Memory limit: 40M
	Max Memory limit: 256M
	Permalink Structure: /%postname%/
	Language: en_US
	Timezone: 0
	Debug Mode: Active

== Theme ==
	Name: Hello Elementor
	Version: 2.7.1
	Author: Elementor Team
	Child Theme: No

== User ==
	Role: administrator
	WP Profile lang: en-US
	User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36

== Active Plugins ==
	Elementor
		Version: 3.20.2
		Author: Elementor.com

	Elementor Pro
		Version: 3.20.1
		Author: Elementor.com

== Features ==
	Custom Fonts: 0
	Custom Icons: 1

== Integrations ==
	


== Elementor Experiments ==
	Improved Asset Loading: Active
	Improved CSS Loading: Active
	Inline Font Icons: Active
	Additional Custom Breakpoints: Active
	admin_menu_rearrangement: Inactive by default
	Flexbox Container: Active
	Upgrade Swiper Library: Active
	Grid Container: Active
	Default to New Theme Builder: Active
	Hello Theme Header & Footer: Active
	Editor Top Bar: Inactive
	Optimized Gutenberg Loading: Active by default
	Build with AI: Active by default
	Landing Pages: Active
	Nested Elements: Active
	Lazy Load Background Images: Active
	Optimize Image Loading: Active by default
	Notes: Active
	Display Conditions: Active
	Form Submissions: Active
	Menu: Active
	Taxonomy Filter: Inactive by default


== Log ==
	


== Elementor - Compatibility Tag ==
	
	Elementor Pro: Compatibility not specified

== Elementor Pro - Compatibility Tag ==

Agreement

  • I agree that my issue may be closed without action if it doesn't meet all the requirements.
@vladninja vladninja added the status/awaiting_triage Indicates when an Issue, Pull Request, or Discussion awaits to be triaged. label May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/awaiting_triage Indicates when an Issue, Pull Request, or Discussion awaits to be triaged.
Projects
None yet
Development

No branches or pull requests

1 participant