Expanded Demo failed to Finish Importing

Have a fresh install of WP and X-theme

Site is fionalouise.com.au

Can’t load expanded demo content "Bed and Breakfast"

Have tried fixes in document and support forum such as:

  1. increase memory limits in config.php
    define( ‘WP_MEMORY_LIMIT’, ‘256M’ );
    define( ‘WP_MAX_MEMORY_LIMIT’, ‘512M’ );

  2. Fixed file permission errors as specified in the support forum.

Still no luck fails with “The Demo Failed to Finish Importing”

Will be happy to provide login details in private window

Cheers
Chris G

Hi Chris,

Please check Troubleshooting under this article: https://theme.co/apex/forum/t/setup-demo-content/56
1.) This code might increase the memory in wordpress but if it is limited on your hosting that is not enough. Try checking in with your hosting about that memory issue.

In case you’re sure memory is enough on both hosting and wordpress, please try loading the demo again. Once you have encountered the error, please right click on the page > inspect element then on console tab see the errors. Let us know what you can find. Thank you.

Thanks for the quick reply.

I did what you said and this is what I found in the console:

x-addons-home.min.js?ver=5.2.5:1 X Demo Importer failure Objectdebug: nulldebug_message: **“cURL error 28: Operation timed out after 5000 milliseconds with 228108 out of 308857 bytes received”**message: "We’re sorry, the demo failed to finish importing."proto: Objectconstructor: ƒ Object()hasOwnProperty: ƒ hasOwnProperty()isPrototypeOf: ƒ isPrototypeOf()propertyIsEnumerable: ƒ propertyIsEnumerable()toLocaleString: ƒ toLocaleString()toString: ƒ toString()valueOf: ƒ valueOf()defineGetter: ƒ defineGetter()defineSetter: ƒ defineSetter()lookupGetter: ƒ lookupGetter()lookupSetter: ƒ lookupSetter()get proto: ƒ proto()set proto: ƒ proto()
failure @ x-addons-home.min.js?ver=5.2.5:1

What should I do next?

Hi there,

Thank you for your reply, actually, that error shed some light here. It seems that your server restricts access to our servers using cURL.

I suggest that you contact your hosting service provider and give them the article below to follow up:

Also, ask them to read the last part of the article below regarding the troubleshooting:

Thank you.

I have a ticket open with my service provider.

I have asked them to perform all the trobleshooting options outlined by you.
They have done so.

Here is the last response.

Relentless Hosting
Hello Chris,

On checking the support kb of theme.co, It looks like something needs to be whitelisted on the server for the proper working(https://theme.co/apex/forum/t/demo-content-will-not-import-on-website/10013). It will be better if you could contact the theme provider and ask them for more details. Please do mention that we have checked and confirmed all the steps mentioned in their troubleshoot page(https://theme.co/apex/forum/t/troubleshooting-validation-connection-issues/201)

Let us know once you get a response from their support team.

Regards,
Nick
Tech Support - Relentlesshosting

Please provide details of what exactly needs to be white listed on the server side so I can ask Nick to whitelist it.

Cheers
Chris G

Hello @peglegsqueeks,

Thanks for updating the thread. :slight_smile:

Article shared by my colleague @christopher.amirian has the details on what needs to be whitelisted. For your convenience I am shared the screenshot https://screencast.com/t/tacspylQJ. Please ask them to ensure cURL is working, and allow_url_fopen is enabled.

You can also refer following article for more information on Curl http://www.tomjepson.co.uk/enabling-curl-in-php-php-ini-wamp-xamp-ubuntu/

Thanks.

Thanks Guys,

Matt from Relentless hosting my provider has checked both that cURL is working, and allow_url_fopen is enabled.
I have also seen these settings in the cPanel PHP config.
The issue goes deeper and seems to be one that cURL times out at 5 seconds.

Is there nothing else that you can do we have done everything that you have suggested.

Cheers
Chris G

Hey Guys here is cPanel Select PHP settings.

Cheers
Chris G

Hey Guys,

Thankyou for your help, but I still can’t get this to work.

Here is a PHP info file showing exact versions and info including info regarding cURL
http://fionalouise.com.au/phpinfo.php

I have been back and forth between apex Support and my hosting provider support.
I have tried and check everything suggested, surely I’m not the Only person having these issues.

Can some one please help me I really would like the advantage of installing demo content on a fresh install of X-theme.

Cheers
Chris G

Hi Chris,

Would you mind providing us with login credentials so we can take a closer look? Please provide following information:

Set it as Secure Note

  • Link to your site
  • WordPress Admin username / password
  • FTP credentials

All the best!

Hi Guys,

Have sent Secure Note with log in details and ftp details

Thanks for looking in to this.

Cheers
Chris G

Hi there,

Thank you for providing the information. Please kindly consider that this is a unique case regarding your hosting service provider. We do not have such reports from other customers, the troubleshooting steps we offer usually fixes the demo import issues.

I have checked your website and indeed the problem is the cURL timeout as the error log shows on my browser:

I checked the same demo import process on my local installation and it worked with no problem. So our server is not down an working and the problem is your hosting service cURL timeout.

I am not an expert regarding server related stuff but it seems there is a possibility to set that timeout:

Kindly ask the provider to expand the timeout to at least 5 minutes.

If you still have problems regarding this I suggest that you install the WordPress and Theme on your local machine and import the demo there. Then move the website including the demo to your hosting.

Thank you for your understanding.

Hi Guys,

Finally resolved the problem.

  1. Edit your wp-includes/http.php
  2. to include the php.
  3. Ran the scrip from my browser http://fionalouise.com.au/wp-includes/http.php
  4. Logged into Wordpress Admin console
  5. Imported the Demo content succefully

Script that I used can be found here on Github: https://gist.github.com/sudar/4945588

I will include the portion that I added to wp-include/http.php for clarity.

add_filter(‘http_request_args’, ‘bal_http_request_args’, 100, 1);
function bal_http_request_args($r) //called on line 237
{
$r[‘timeout’] = 15;
return $r;
}

add_action(‘http_api_curl’, ‘bal_http_api_curl’, 100, 1);
function bal_http_api_curl($handle) //called on line 1315
{
curl_setopt( $handle, CURLOPT_CONNECTTIMEOUT, 15 );
curl_setopt( $handle, CURLOPT_TIMEOUT, 15 );
}


This solution will work for anyone having cURL timeout errors

Thankyou for all your help and persistence.
Cheets
Chris G

Hello Chris,

We are just glad that you have figured it out a way to correct the said issue.
Thanks for letting us know and for sharing this information!

Have a nice day and take care!

Cheers

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