WordPress Importer
[resolved] not importing all custom fields (5 posts)

  1. Wesley
    Posted 5 years ago #

    I have one wordpress blog setup with posts using custom fields with urls to images. Each custom field has the same label, 'imgsrc'. I exported the content of this blog to a wordpress xml file. When I try to import the file into another wordpress blog, only the last custom field is imported. Both these blogs are part of the same install of a wordpress network, if that matters.

    I've not had this problem before. Is it a bug?

  2. Jon Cave
    WordPress Dev
    Plugin Author

    Posted 5 years ago #

    Not heard of this before either. I will investigate. If possible could you send me an example export file that is not working as expected (email wp AT lionsgoroar.co.uk) as it would help track down any issue?

    Thanks for reporting.

  3. Jon Cave
    WordPress Dev
    Plugin Author

    Posted 5 years ago #

    Nevermind, have reproduced the problem. The following should fix the issue:

    Change the line reading:

    update_post_meta( $post_id, $key, $value );

    in wordpress-importer.php to:

    add_post_meta( $post_id, $key, $value );

    This is line 670 in version 0.3, or 693 if you're using the development version.

    Hope this helps.

  4. Jon Cave
    WordPress Dev
    Plugin Author

    Posted 5 years ago #

    Fix is now in the development version (will be displayed as 0.4-beta1 on the plugin page in the WordPress admin panel), which will be released soon.

    It has to be installed 'manually' by downloading the zip file first. This can be obtained from the Other Versions page or here is a direct link to the zip.

    Please let me know how this works for you and if you have any further problems.

  5. Wesley
    Posted 5 years ago #

    That definitely fixed it. Thanks for the speedy assistance.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WordPress Importer
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic