Template Kit: Common Unexpected Errors

Updated on October 11, 2024

Unexpected errors are almost always a problem with your hosting configuration, either WordPress doesn’t have the correct permissions or resources, or a plugin conflict limits the resources required for the import. Below we describe several problems that may occur and how to handle them.

1. Failed to import template: Invalid File  #

The most common cause of this error is an unsupported PHP version, but it may also indicate that the file you are trying to upload is not supported by your server or WordPress or that you are trying to import something other than a kit template file into the kit importer.

On WordPress version 6.2, your hosting provider should use PHP 8.1. Most plugins for WordPress, including Elementor, may not be fully compatible with very new PHP versions like 8.3.

However, If you are sure the item you are trying to install is the Elementor Template Kit from Envato, see how to troubleshoot zip files here.

2. SyntaxError: Unexpected token… 404 Not Found #

The 404 Not Found error is usually caused by permission issues in either WordPress settings or server-side configurations that prevent Elementor from finding or accessing its template storage folder.

Follow the General Troubleshooting below to check your WordPress settings
See https://elementor.com/help/how-to-fix-404-page-or-page-not-found-error-messages/

If the problem persists, you will need to contact your host to troubleshoot settings or potential problems with your .htaccess file. and DNS settings.

3. SyntaxError: Unexpected token… 403 Forbidden #

A 403 error indicates a permission issue somewhere with your server folder or file or an incorrect rule in your .htaccess file and is not something that we can resolve. The most common reasons for this error are:

  • Incorrect URL or SSL settings after WordPress migration from one server to another
  • Security plugins like Wordfence or Sucuri
  • Not logged in as administrator
  • Attempting to import a WordPress Theme or other incompatible product
Step 1: #

First, verify you have a compatible item. If an item doesn’t have the Elementor Template Kit title or isn’t in the description, it’s not a compatible item. Our plugin will not install WordPress themes, Site Templates or HTML Templates.

Step 2: #

Make sure you don’t use a proxy, VPN, or other network changes via extensions in your browser.
Make sure the domain is not in maintenance mode.
Log out of WordPress, then log in again to refresh your session. You must be logged in with the Administrator role.

Step 3: Check Plugins #

Make sure you are logged in to WordPress as an administrator.
Go to Plugins and make sure all plugins are updated.
Disable site modifying plugins such as Jetpack, Wordfence, Securi, very simple SSL, Yoast, or any plugin that changes URL handling. If this solves it, you can re-enable it after the template is imported and the pages set up.

Further Help: #

We recommend that you check your host’s documentation to see if they have any specific suggestions.

4. Failed to import template: Invalid template type #

This error will occur if you try to import an Elementor Pro template such as a header, popup, WooCommerce page, or Loop without installing and connecting Elementor Pro.

Pro Templates will always display a notification below the template if a dependency is missing. Check here for details on Pro requirements and installation instructions.

https://elementor.com/help/get-started-with-elementor/installing-elementor-pro/

5. TypeError: Failed to Fetch #

This error may occur when using the search feature under the Free Kits or Template Kits tabs, or importing a template kit file and may require further review by your hosting provider.  If your error has a “Show Debug Details” button, you may click it to see the detailed error code to assist your host with diagnosing the cause.

Common error codes are:

  • cURL error 35: gnutls_handshake() failed: A TLS fatal alert has been received.
  • cURL error 56: Received HTTP code 403 from proxy.
  • cURL error 7: Failed to connect to <url> port 443

General Troubleshooting:

  1. Log out of WordPress
  2. Clear your browser cache
  3. Login again
  4. Under Settings > General, ensure your Site Url and WordPress Url are the same. If you have SSL, both URLs must  start with https 
  5. Make sure your server is running a recent version of PHP and the cURL library.
  6. The cURL error can be a DNS-related issue. Your hosting company might need to switch dns configuration to OpenDNS: https://www.howtogeek.com/164981/how-to-switch-to-opendns-or-google-dns-to-speed-up-web-browsing/
  7. Ask your host if there is some limitation with wp-cron, or if loopback is disabled.
  8. Ask your host if there is a firewall or security modules (e.g. mod_security ) that could block the outgoing cURL requests.
  9. Go to Elements > Settings and ensure all Server Limit checks are green. Red warnings must be solved by your host. 

6. SyntaxError: Unexpected end of JSON input #

This error may occur when importing a page that includes a content block template that is not yet imported. For example, if your kit uses the Metform plugin and you do not import the forms, this error may occur on the Contact page import. 

This error may also occur when importing Envato “Free Kits” if you attempt to import a template that requires Elementor Pro without Pro installed. Pro templates will always show a notice under the template if a dependency is missing.

7. SyntaxError: Unexpected token… 502 Bad Gateway or 504 Gateway Timeout #

Gateway errors come from your host server or upstream server such as CloudFlare being overloaded. Check with your hosting provider for specific troubleshooting.

8. SyntaxError: Unexpected token… 503 Service Unavailable or 500 Internal Server Error #

Both 503 and 500 Server errors indicate that your server does not have enough resources to process the imports either due to slow connectivity, PHP configuration, or plugin conflicts. Envato cannot solve host-related issues but can offer the following general troubleshooting:

General Troubleshooting:

  1. Log out of WordPress, then login again to refresh your session (you must have the Administrator role)
  2. Go to Settings > Permalinks, ensure Post Name is selected, then click Save (whether you changed anything or not).
  3. Go to Appearance > Themes and ensure the Hello Elementor theme is installed and active. Other themes may work with Envato Template Kits, but should be activated later once the kit and templates are installed successfully to avoid potential conflicts.
  4. Go to Plugins and deactivate all plugins other than Elementor/Elementor Pro and the Envato Elements plugin
  5. Ensure all updates are run if pending.
  6. Go to Elementor > Settings and click the Features tab.
    • Under Ongoing Experiments, set all items to Inactive
    • Under Stable Features, ensure Flexbox Container is Active and Build with AI is Inactive (unless you specifically pay for this feature)
  7. Go to Tools > System Health. If it is anything but Good or you see REST API errors, you must resolve the noted issues before continuing. 
  8. Check PHP:

Please ensure your server is optimized for WordPress. You may compare the values listed under Elementor > System Info with the following to determine where changes are needed. 

PHP Version: PHP Version should be 8.1 as of WordPress version 6.2

  • PHP Memory Limit: 256MB minimum
  • PHP Max Input Vars: 1000 minimum – 3000 for WooCommerce
  • PHP Max Post Size: 128MB minimum
  • Max Upload Size: 64MB – values below 10 typically result in invalid file or image transfer errors, values below 50 will disallow most website image loads or any WordPress Theme upload
  • ‘open_basedir’ should be disabled
  • set ‘allow_url_fopen’ to ‘ON’

Your host should be equipped to troubleshoot and fix the issue by checking your server error logs.  They may review WordPress requirements here: https://wordpress.org/about/requirements/ and https://elementor.com/help/requirements/

Finally, ensure you are installing an Elementor Template Kit file following the correct steps using the Envato Elements plugin for WordPress.

  • Do not install kits through the Elementor builder Envato button
  • Do not attempt to install WordPress Themes, plugins, or other template types using the Envato Elements plugin
  • Do not install Elementor kits from non-Envato sources using the Envato Elements plugin

What are your feelings

Have more questions? We’re more than happy to assist.

[]