Archived topic
Import from Site Library but has no demo content
13 replies · Started by Khanh Nguyen on June 15, 2019
Hi,
I tried to import a site from Site Library. The interface has a changes, and look like the same with the site imported, but it has no demo content (demo posts).
Although I followed the steps in this link:
https://docs.generatepress.com/article/using-the-site-library/
Hi there,
when importing a site, the second step has a notification and a check box that needs to be checked in order for you to click the import button. Did you follow this step? Let me know.
Yes, I checked "I understand..." check box and clicked Import Content button, but It's has no demo content.
I have checked error log and found it:
*177 FastCGI sent in stderr: "PHP message: PHP Warning: XMLReader::read(): /var/www/html/xxxxxxxxxxxxxx.com/public_html/wp-content/uploads/2019/06/content-1.xml:1: parser error : Document is empty in /var/www/html/xxxxxxxxxxxxxx.com/public_html/wp-content/plugins/gp-premium/sites/libs/wxr-importer/WXRImporter.php on line 344
A part of content of /var/www/html/xxxxxxxxxxxxxx.com/public_html/wp-content/uploads/2019/06/content-1.xml:
^_<8b>^H^@^@^@^@^@^@^Cí}ýrãF<92>çߣ<88>y<87>^ZvìîÌ<9e>@^Qà§Ø<92>ìvO^?íºí^N·ú¼^[^N^G£^H^TI¸A^T<8c>^BDÑ<8e><8e><98>w¸ûç^^ã^á^^e<9e>ä2«ðE<90>^T <8a>^T!^Y=<9e>n ¨<8f>¬Ì¬Ì_f%<80><8b>¯n§^N¹a¾°¹{YÓë<8d>^Za®É-Û^]_Ö>]¿Öz5òÕÕÉÅ_4<8d>\OlAà?J~ä¾õÁgB^Pö_^As-f<91>^_>~$#ÛadÌ\æÓ^@.^Mç<99><86>^Tþs »õ¸^_^P>"s^^úDØ^A«^SM<8b>&x^W^P<93>»^Aµ]<98>Ç^]
Hmm, that doesn't look right. Which site are you importing?
Can you try the import again after deleting any existing .xml files? I wonder if something on your server is changing/sanitizing the content.xml files before they're downloaded.
I tried delete existing .xml files but It still happen.
It happen to any site in Site Library.
I use the VPS and my website is fresh (no content). So I can give you access (both of VPS and Wordpress Dashboard) if you want to check something.
I'm facing this issue with both of Linode (nginx) and Azure VM (nginx), but Shared Hosting (Hawkhost with apache) is ok.
Please take attention. I have to pass this issue asap.
Hi there,
Any solution for me?
Thank you so much.
I've been looking into this and can't find why the xml file is becoming corrupt during the download to your VPS.
If you check the xml file on your shared hosting, does it look the same as on your VPS?
If needed, we can just manually import the xml file.
Hi Tom,
I also have a Shared Hosting and this function work well on Shared Hosting (the xml file looks very clear)
<?xml version="1.0" encoding="UTF-8" ?>
<!-- This is a WordPress eXtended RSS file generated by WordPress as an export of your site. -->
<!-- It contains information about your site's posts, pages, comments, categories, and other content. -->
<!-- You may use this file to transfer that content from one site to another. -->
<!-- This file is not intended to serve as a complete backup of your site. -->
.....more .....
So I think there are something wrong with my web-server configuration or php configuration (on linode vps and azure vm).
But with Shared Hosting, only wordpress source code is under my control. I can not investigate web-server configuration or php configuration in shared hosting so I can not know the difference.
The only difference I know is: Shared Hosting is running Apache - Linode VPS and Azure VM are running Nginx.
It would be good if you can take a look on my VPS (I can give you permission, it just a test site so you can).
Unfortunately, I don't know enough about specific server configurations to know what's going on here.
Perhaps the server security/firewall is "sanitizing" the xml file? Is there anything there you can test (temporarily disabling firewall for a minute etc..)?
Firewall was disable but the issue still appears.
I tried debug with Wordpress log and this is something that I got:
[17-Jun-2019 04:25:51 UTC] PHP Notice: Undefined index: masonry_width in /var/www/html/xxxxx.com/public_html/wp-content/plugins/gp-premium/sites/classes/class-site-helper.php on line 146
[17-Jun-2019 04:25:51 UTC] PHP Notice: Undefined index: masonry_most_recent_width in /var/www/html/xxxxx.com/public_html/wp-content/plugins/gp-premium/sites/classes/class-site-helper.php on line 146
[17-Jun-2019 04:27:29 UTC] PHP Warning: XMLReader::read(): /var/www/html/xxxxx.com/public_html/wp-content/uploads/2019/06/content-11.xml:1: parser error : Document is empty in /var/www/html/xxxxx.com/public_html/wp-content/plugins/gp-premium/sites/libs/wxr-importer/WXRImporter.php on line 344
[17-Jun-2019 04:27:29 UTC] PHP Warning: XMLReader::read(): ^_�^H in /var/www/html/xxxxx.com/public_html/wp-content/plugins/gp-premium/sites/libs/wxr-importer/WXRImporter.php on line 344
[17-Jun-2019 04:27:29 UTC] PHP Warning: XMLReader::read(): ^ in /var/www/html/xxxxx.com/public_html/wp-content/plugins/gp-premium/sites/libs/wxr-importer/WXRImporter.php on line 344
[17-Jun-2019 04:27:31 UTC] == Start mapping menu locations ==
[17-Jun-2019 04:27:31 UTC] PHP Notice: Undefined offset: 2 in /var/www/html/xxxxx.com/public_html/wp-content/plugins/gp-premium/sites/classes/class-site-helper.php on line 401
[17-Jun-2019 04:27:31 UTC] PHP Notice: Undefined offset: 2 in /var/www/html/xxxxx.com/public_html/wp-content/plugins/gp-premium/sites/classes/class-site-helper.php on line 402
[17-Jun-2019 04:27:31 UTC] 2 ->
How can I debug the content xml download processing ?
Hi Tom,
Good news :)
I found the root cause: I miss some php extensions.
I don't know exactly which extension but these are all extensions that I installed to fixing this issue:
sudo apt -y install php-curl php-gd php-intl php-mbstring php-soap php-xml php-xmlrpc php-zip
Hope it will be useful for the one who facing this issue.
Awesome! Glad you got it working. Thanks for sharing what you did :)
khanh you're the man! :)
i had a new site on php 7.4 and didn't have all the modules setup for that version of php.
doing it now but sure that's the issue. THANKS.