WordPress.org

Make WordPress Core

Opened 8 years ago

Last modified 3 weeks ago

#16404 reopened defect (bug)

WordPress Importer fails to import images

Reported by: wlpdrpat Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 3.0.4
Component: Import Keywords: reporter-feedback, bulk-reopened
Focuses: multisite Cc:

Description

WordPress Importer fails to import images and update image src urls when download and import file attachments is checked.

WordPress MS with images in a post via Media using WP image mapping, e.g. image url: http://site.domainname.com/files/2011/01/myimage.jpg
Fails to download, import and update image src url. All image src urls remain intact from the old domain name.

If you change the image source to specific directory rather than the WP uploads directory: e.g. image url:
http://site.domainname.com/images/myimage.jpg
Images are downloaded and imported to media but it fails to update image src url in posts. All image src urls in posts remain intact from the old domain name.

I tested this on clean install of WP 3.0.4 MultiSite with TwentyTen theme and no other plugins activated.

Change History (11)

#1 @duck_
8 years ago

  • Component changed from General to Import
  • Keywords reporter-feedback added
  • Summary changed from WordPress Importer to WordPress Importer fails to import images

Cannot reproduce with the following set up:

  • WXR file is slightly modified version of the theme test data. So from a WordPress MS subdomain site (WP.com).

Import site:

  • WordPress 3.1-RC3-17365
  • MS subdirectories setup
  • WordPress Importer 0.3-beta6 and 0.2

Translates images from http://wpthemetestdata.files.wordpress.com/2008/06/canola2.jpg to http://local.domain/testsite/files/2011/01/canola2.jpg.

The images on the old site are still accessible, right? Can you give any further details about your set up?

#2 @wlpdrpat
8 years ago

Yes, the images are still available on the old site. When imported to the new site (without changing the image urls) the image urls are not changed and the images are not imported. When you view the site the images are viewable because they are still available on the old site.

If I move the image files to a static location in the install and update the urls in the .xml export file - then when I import the images are imported but the urls to the images are not updated.

I experienced this will 3 different 3.0.4 installs that had varied themes and plugins. So, for testing purposes I created a clean install configured as below and got the same results.

Import site:
WordPress 3.0.4 MS subdirectories setup
WordPress Importer 0.2
Theme: TwentyTen
Plugins: No other plugins activated

Could this be a bug with 3.0.4 that has been addressed with 3.1 as I see you have tested it with 3.1?

#3 @kurtpayne
7 years ago

  • Cc kpayne@… added

Is this still happening? The WordPress importer plugin has been updated to 0.5 and specifically mentions fixes for attachments. WordPress Importer changelog

#4 @greenshady
7 years ago

  • Cc justin@… added

Yes, it's still happening for me. I'm running into trouble importing attachments from one MS blog to another MS blog on the same install (using it to set up theme demos).

#5 @greenshady
7 years ago

I also just tested the theme unit test data into the same MS blog. Most of the attachments were imported (all but 2).

#6 @SergeyBiryukov
7 years ago

  • Milestone changed from Awaiting Review to WordPress.org

#7 @middlesister
4 years ago

I encountered this bug too. Having xdebug on locally, I rececived these errors:

! Strict standards: Redefining already defined constructor for class WXR_Parser_Regex 
in /path/to/website/wp-content/plugins/wordpress-importer/parsers.php on line 408

! Strict standards: Declaration of WP_Import::bump_request_timeout() should be compatible with 
WP_Importer::bump_request_timeout($val) in /path/to/website/wp-content/plugins/wordpress-importer/wordpress-importer.php on line 38

More annoyingly, the xdebug errors gets inserted into the post content. Right before the first image the whole xdebug stacktrace is output with tables and inline styles and everything. Only before the first image. All image paths in post are still pointing to original site. Nothing gets imported to the media library.

This is in a local MS install using subdomains, WordPress 4.1, Wordpress Importer 0.6.1,importing posts into a domain mapped subsite.

Let me know if you want me to post the full stack trace.

#8 @swissspidy
4 years ago

There's already a ticket for the strict standards errors mentioned by @middlesister: #24373

#9 @swissspidy
4 years ago

  • Focuses multisite added

#10 @iseulde
3 months ago

  • Milestone WordPress.org deleted
  • Resolution set to wontfix
  • Status changed from new to closed

This ticket has not seen any activity in over *two* years, so I'm closing it as "wontfix".

The ticket may lack decisiveness, may have become irrelevant, or may not have gathered enough interest.

If you think this ticket does deserve some attention again, feel free to reopen.

For bugs, it would be great if you could provide updated steps to reproduce against the latest version of WordPress (5.0.2 at the time of writing). Remember images or a video can be superior to explain a problem. At the very least, quickly test again to make sure the bug still exists.

If it’s an enhancement or feature, some extra motivation may help.

Thank you for your contributions to WordPress! <3

#11 @JeffPaul
3 weeks ago

  • Keywords bulk-reopened added
  • Milestone set to Awaiting Review
  • Resolution wontfix deleted
  • Status changed from closed to reopened

A decision was made to reopen tickets that were closed in the bulk edit that this ticket was affected by. This ticket is being placed back into the Awaiting Review milestone so it can be individually evaluated and verified to determine if it is still relevant/valid or reproducible.

Note: See TracTickets for help on using tickets.