Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.4k stars 1.98k forks source link

Blogger importer importing images as draft posts, images not imported #72554

Open Nic-Sevic opened 1 year ago

Nic-Sevic commented 1 year ago

Quick summary

User is trying to import a blogger export but the attached images are being converted to draft posts with the file name rather than getting imported as media items. Image links in the imported posts are remaining as blogspot urls and load in media gallery but not on site (may be due to plugin interference but the links are still bad).

I think this may be because the format of the export changed but I'm not sure. Old format seems to be like this: pbkcP4-lw-p2 New format can be seen in sample here: https://mc.a8c.com/includes/img-uploader/files/1674640166-blog-01-25-2023.xml (user file also attached in ticket 5891249-zd-woothemes)

Also, it seems like the export method on the site changed. Now need to access by going to settings > manage blog > backup content

Steps to reproduce

  1. import blogger xml using built in blogger importer on simple site

  2. see post imported with internal link still pointing to blogger, attached image imported as draft with image name, and no media brought into gallery

  3. try to import with plugin on Atomic site

  4. see There has been a critical error on this website

What you expected to happen

Expected both importers to work the same and for images to be imported as media items/links in post content updated to point to new item

What actually happened

Simple site and Atomic importers don't work the same Media items imported as draft posts with image name as title and not to media gallery links in post content not replaced with new address

Context

5891249-zd-woothemes

Platform (Simple, Atomic, or both?)

Simple, Atomic

Theme-specific issue?

No response

Browser, operating system and other notes

No response

Reproducibility

Consistent

Severity

None

Available workarounds?

None

Workaround details

No response

github-actions[bot] commented 1 year ago

Support References

This comment is automatically generated. Please do not edit it.

ariel-maidana commented 1 year ago

Another case here: 5962395-zd-woothemes

Please notify the user once a fix is in place.

cuemarie commented 1 year ago

πŸ“Œ SCRUBBING : RESULT - Replicated / Could Not Replicate / Uncertain

πŸ“Œ FINDINGS/SCREENSHOTS/VIDEO

AT Test

AT site eventually timed out in Firefox, displaying 504 Gateway Time-out | nginx error page on /wp-admin/admin.php?import=blogger&step=2

When I go back in the browser, I encounter:

Screen Shot 2023-03-21 at 10 18 35 AM

Sorry, there has been an error. File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini file or by post_max_size being defined as smaller than upload_max_filesize in php.ini.

However, once I return to the Posts List, the posts from the import file have been added properly to the site, and the media has been imported.


Simple Test

Repeated the test in full with my own test Blogger site. Created and published a post, then went to settings > manage blog > backup content, which downloaded an XML file.

On another simple site, I moved to Tools > Import > Blogger and uploaded the XML file. This did result in a draft post with the file name as the title, as well as a published post with the content in a classic block. Selecting the image in the classic block enlarges it in the editor, and then selecting "Convert to blocks" leads to an error. In general, a fairly clunky and buggy feeling process.


SH Test

Importing the Blogger XML file on a self-hosted site through the Blogger importer worked as expected - the image was imported to my site's media library and published in a post. Converting the post's classic block to blocks resulted in very little issue - just a bit of HTML content to clean up.

https://user-images.githubusercontent.com/27249804/226693374-98082b11-ae93-438e-9a28-a4a5fcd239df.mp4

πŸ“Œ ACTIONS

sophiegyo commented 1 year ago

While it wasn't reported in the ticket, it's happening for 6262682-zen.

Apparently their posts were being imported as pages instead but it seems like that's fixed itself. The images as draft posts though is definitely an issue.

I resolved it for this ticket by importing the images using the import media function in the Blog RC and then backfilling any attachments that hadn't been fixed by the import media function.

ricklabsdotn8 commented 11 months ago

another case - 7094957-zen

supernovia commented 7 months ago

I seem to have another case here: 7713487-zd-a8c

The xml file seems corrupt, so I'm hoping to get a fresh copy.