Images are missing when i Export template in Elementor

When i save Template in Elementor,& Export it for importing in another website connceted with infinityfree hosting…the template i import ,get a images are missing. why ? how to fix ?

6 Likes

i installed it unlimited elements plugin,but i am unable to see the Export with images option…what to do now ?

How many images do you have?
maybe you simply add manually part by part

I can’t give you an answer, but I can only suggest that you try to look at elementor forums and similar sites, because the chances are higher that you will find an answer there than here. Here are mostly questions related to hosting, not to changing the theme in XY soft.

6 Likes

i have saved one section as a template in my website,that section has only 1 images -then exported it for importing it to other website…both website are live. then again unable to see the option of export with images by unlimited elements why ? some people are doing very easily in his own website without any other plugin like unlimited elements.can u check in your website,if u run any website pls.

Everyone here is running websites, but many if not most of us are not using Elementor. So if you have a question that’s very specifically about Elementor’s import/export functionality to migrate from one Elementor site to another Elementor site, it’s going to be hard to find the necessary knowledge here.

This is the InfinityFree forum, which means that this is the place to be if you need help with InfinityFree hosting. But this is an Elementor question. Even if this issue were caused by a hosting restriction, I wouldn’t be able to tell you, because I have zero experience with this bit of Elementor functionality, so I have no idea what could cause this problem.

An Elementor expert should know more about issues like this, or at least be able to help figure out where to start looking. So a community focused on Elementor, or at least WordPress, should have more knowledge about this.

4 Likes

Hi Iaamsq,

The issue you’re experiencing is called CORS in combination with a hosting restriction for having only web browsers able to visit your website.

When you copy a section or template in UnlimitedElements across websites, what happens is that the content for the template is stored in the clipboard as a JSON string under unlimited elements’ domain or your site’s domain. Therefore when you paste that same content to your new website, the JSON string is decoded correctly with everything layout and styling matching the source. However, images cannot be encoded as strings entirely in base64 or it risks breaking the JSON string due to large content in limited clipboard size. The image is stored as a URL, this URL is using the old website’s domain. When you paste this into your new website, the link is posted to the server for crawling via the plugin’s internal handler, however, server CURL requests do not run JavaScripts and hence it cannot get past IF’s security measures.

Unfortunately, options are kinda limited for your case. You can either run a local copy of the new WordPress website and do all editing from there, then upload the entire thing when you need to update. Alternatively, manually upload your images after pasting the template content.

If you have a custom domain on both your old and new website, then this feature would work if you route your traffic via Cloudflare, which disables the security system here as it’s exempted.

Cheers!

1 Like

This can happen because of a low memory limit or to other server settings (file permission issues most of the time).

Ask your hosting company to check if the option allow_url_fopen is set to “on” and if the function file_get_contents is not blocked.

Please note that sometimes the allow_url_fopen appears as activated even if it is not actually the case. For this reason, this has to be checked by an experienced technical support engineer.

This can also happen when you import templates from a localhost to another localhost or with a server which blocks the transfer of pictures from one site to another.
maybe this is the reason.

Hi Iaamsq,

Using allow_url_fopen is a bit similar to CURL, but the cause of the issue is the same, as it is still a server attempt to read an online resource without involving JavaScript and may not honour CORS. This method is also considered not a good practice as allow_url_fopen can cause potential security issues if the protocol is otherwise not HTTP.

This is correct, the call for an image would not cause an error to occur but you also cannot get the image this way. Assuming this is a paste from the plugin support, they know what they are saying.

To prove that reading remote resources is not allowed, the following code is used to test.

<?php

header('content-type: text/plain');
var_dump(ini_get('allow_url_fopen'));

$resource = 'https://chiucs123.great-site.net/favicon.png';

print_r('fopen() method'.PHP_EOL);
$handle = fopen($resource,'rb');
$contents = stream_get_contents($handle);
fclose($handle);
var_dump(strlen($contents));

This code would output if the option is turned on as well as the resource size if success.

The output shows that the code would stop after attempting fopen on a URL
string(2) "on"

This means that although the option is on, you cannot get the image using fopen.

The proper way to do this is to use CURL, but since you are not a code but a user of the plugin, I won’t be posting the code for the solution. UE have to figure this out themselves.

If the resource is on the same server as the requesting code, the security system will not block it. If the resource lives on an IF acccount and you’re requesting it somewhere else (including from another IF acccount) you still face the security system even when you use CURL.

Cheers!

1 Like

where should i paste this,can you tell me in details ? because i am having lack of coding & technical knowledge,but when you guide me step by step…so i can acheive what i am wanting in template.

thanks

So if I understand it correctly, the site export doesn’t actually contain the full site, just part of the data, and it will download other data (like images) from the old site when running the import?

And if I understand it correctly, you are trying to migrate from one website hosted with us to another site hosted with us?

Because if so, then I don’t think the problem is that the new website is unable to download files, I think the problem is that the old site doesn’t let you download them.

Specifically, I think this security system is in the way:

Again, I’m not that familiar with Elementor, but I would hope that there is an import/export function that actually contains the entire website. After all, people should be able to develop their site locally and then upload it to their live site.

Also, depending on your exact use case, you may be able to forego the import/export functionality to migrate the data from one site to another, and just migrate the entire WordPress installation instead. Migrating your entire site (not WordPress specific, this basically goes for any site) can be done like this:

3 Likes

Hi Iaamsq,

While it’s possible to migrate using programming, it’s way too complex for you.

What I suggest best for you is to download the images one by one and replace the image in the pasted template. (They will show up as a placeholder or nothing for that box). This way you can confirm that the images are for sure there.

Such a feature exist, it’s called all-in-one migration, you need to look for an older version that allows you to change the max upload filesize to bypass the stupid 5MB limit (who has a website smaller than 5MB with WordPress anyways).

However for the case with UnlimitedElements, sections of templates can be copied from their template display website rather than from the original website as well, meaning certain things that Iaamsq wants might not come from the original website if he/she intends to “piece together a new one”.

Just do it the easy way man, download and upload is your safest go.

Cheers!

Actually i want to sell templates. thats why it is easy for me to design & export & then upload it to any website or any client easily. but the problem is when i export in elementor . there is images & videos missing & all the settings & colors of the text also missing. but people are doing it easily in one click in free elementor version, i dont know is it because of my hosting or setting…the problem is Elementor custumore care in chatbox don not talk on any issue for free Elementor user. how to know it ? or how to fix it…first try elementor & export any section, see what happens there to you & then reply me pls.

It seems pretty clear to me that using the template export/import functionality you’ve been trying to use so far is not going to work here due to our restrictions on file downloads from sites. And the fact that migrations from a local development server to a live site also cannot work with this implementation gives me the idea that using this functionality to develop a template for the purpose of publishing them elsewhere isn’t the intended use case.

So I think your options going forward are:

  • Find a different way to develop and publish the templates you’ve made, which doesn’t involve the new site having to download files from the old site.
  • Use hosting that allows you to have that direct download functionality. iFastNet’s premium hosting supports this, and is pretty cheap to start, but maybe you can find other hosting that works better for you for this.
4 Likes

Hi Iaamsq,

Do you focus more on design and layout, but would like to be within the comfort zone of Elementor? If so, private message me. I would like to discuss more with you on this in a business perspective.

Cheers!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.