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

βœ… 🐞 Can't Import Templates when the option to "Enable Unfiltered File Uploads" in Elementor Settings is disabled - [ED-13682] #25071

Closed
3 of 6 tasks
viriava opened this issue Feb 8, 2024 · 6 comments
Labels
admin/settings References any component related to the WordPress Admin area > Elementor > Settings page. admin References any component that runs in the WordPress Admin area. bug Indicates a bug with one or multiple components. component/export-import References the Export or Import Template and Template Kit features. mod* solved Indicates that an Issue has been Solved, or a Feature Request has been Released. status/merged Indicates when a Pull Request has been merged to a Release.

Comments

@viriava
Copy link

viriava commented Feb 8, 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

Uncaught (in promise) ReferenceError: elementor is not defined
at Function.getUnfilteredFilesNotEnabledImportTemplateDialog (admin.min.js?ver=3.19.2:3:7750)
at _callee$ (admin.min.js?ver=3.19.2:3:48690)
at tryCatch (admin.min.js?ver=3.19.2:3:29344)
at Generator. (admin.min.js?ver=3.19.2:3:30993)
at Generator.next (admin.min.js?ver=3.19.2:3:29893)
at asyncGeneratorStep (admin.min.js?ver=3.19.2:3:24778)
at _next (admin.min.js?ver=3.19.2:3:25011)
at admin.min.js?ver=3.19.2:3:25127
at new Promise ()
at HTMLFormElement. (admin.min.js?ver=3.19.2:3:24947)

Screenshot 2024-02-08 at 8 29 04 Screenshot 2024-02-08 at 8 48 15

Archive_5.json

Steps to reproduce

  1. Disable "Enable Unfiltered File Uploads" in the Elementor->Settings->Advanced
  2. Go to /templates -> import templates
  3. Select file
  4. Click import - see JS error

Expected behavior

Import should work

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

Latest WordPress
CLOUDWAYS Hosting
PHP 8.1
Latest Elementor and Elementor Pro

Agreement

  • I agree that my issue may be closed without action if it doesn't meet all the requirements.
@viriava viriava added the status/awaiting_triage Indicates when an Issue, Pull Request, or Discussion awaits to be triaged. label Feb 8, 2024
@tkfv
Copy link

tkfv commented Feb 8, 2024

I have the exact same issue: Elementor/Pro both at 3.19.2, no other plugins installed, default theme.

@nicholaszein nicholaszein added status/needs-feedback Indicates when an Issue, Pull Request, or Discussion awaits Feedback from the poster. component/export-import References the Export or Import Template and Template Kit features. mod/e* mod/c* and removed status/awaiting_triage Indicates when an Issue, Pull Request, or Discussion awaits to be triaged. labels Feb 8, 2024
@nicholaszein nicholaszein changed the title Template Import not working ReferenceError: Elementor is not defined ❌ Template Import not working ReferenceError: Elementor is not defined Feb 8, 2024
@nicholaszein
Copy link
Member

Hello @viriava.

We appreciate your involvement in our community. For efficient troubleshooting, please remember to include the
FULL, and essential System Info
with each issue reported. We'll need it to help you effectively.

⚠️ As a gentle reminder, issues without it may need to be closed without troubleshooting. Providing this information upfront aligns with our guidelines, saves time, and ensures swift resolution. Thank you for understanding.

@nicholaszein nicholaszein changed the title ❌ Template Import not working ReferenceError: Elementor is not defined ❌ Can't Import Templates when the option to "Enable Unfiltered File Uploads" in Elementor Settings is disabled Feb 8, 2024
@nicholaszein nicholaszein added admin References any component that runs in the WordPress Admin area. admin/settings References any component related to the WordPress Admin area > Elementor > Settings page. labels Feb 8, 2024
@RCady
Copy link

RCady commented Feb 8, 2024

Hey all, I'm also running into this issue when attempting to import a kit library with Elementor Pro. It looks like the window variable of elementor is not defined, but is expected to be defined.

@nicholaszein nicholaszein added the bug Indicates a bug with one or multiple components. label Feb 9, 2024
@nicholaszein nicholaszein changed the title ❌ Can't Import Templates when the option to "Enable Unfiltered File Uploads" in Elementor Settings is disabled βŒ› 🐞 Can't Import Templates when the option to "Enable Unfiltered File Uploads" in Elementor Settings is disabled - [ED-13682] Feb 9, 2024
@KingGrizzly
Copy link

While import issues are being investigated/fixed, please include #24111 since it is also a bug impacting all users on import. Thanks.

@mpolek
Copy link

mpolek commented Feb 16, 2024

My solution is to change the two places in elementor/assets/js/admin.js and admin.min.js where it has:

if (!elementor.config.user.is_administrator) {

to:

if (!elementorAdmin.config.user.is_administrator) {

It's basically just a typo and easily fixable.

@nicholaszein nicholaszein changed the title βŒ› 🐞 Can't Import Templates when the option to "Enable Unfiltered File Uploads" in Elementor Settings is disabled - [ED-13682] 🐞 Can't Import Templates when the option to "Enable Unfiltered File Uploads" in Elementor Settings is disabled - [ED-13682] May 5, 2024
@nicholaszein nicholaszein added status/merged Indicates when a Pull Request has been merged to a Release. solved Indicates that an Issue has been Solved, or a Feature Request has been Released. and removed status/needs-feedback Indicates when an Issue, Pull Request, or Discussion awaits Feedback from the poster. mod/e* mod/c* labels May 5, 2024
@nicholaszein
Copy link
Member

Hello!

This issue was solved in version 3.19.3.

Feel free to update!

Best regards

@nicholaszein nicholaszein changed the title 🐞 Can't Import Templates when the option to "Enable Unfiltered File Uploads" in Elementor Settings is disabled - [ED-13682] βœ… 🐞 Can't Import Templates when the option to "Enable Unfiltered File Uploads" in Elementor Settings is disabled - [ED-13682] May 5, 2024
@elementor elementor locked and limited conversation to collaborators May 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
admin/settings References any component related to the WordPress Admin area > Elementor > Settings page. admin References any component that runs in the WordPress Admin area. bug Indicates a bug with one or multiple components. component/export-import References the Export or Import Template and Template Kit features. mod* solved Indicates that an Issue has been Solved, or a Feature Request has been Released. status/merged Indicates when a Pull Request has been merged to a Release.
Projects
None yet
Development

No branches or pull requests

6 participants