CSV Import for WordPress
[resolved] Broken images when filename contain multiple dots (2 posts)

  1. shark0der
    Posted 3 years ago #

    My external images that I want to import along with the posts have the following naming convention: <timestamp>.<title>.<ext>, for example: 1365439414.4096flower.jpg.

    The plugins does not handle properly the filename and the final filename gets trimmed down to "<timestamp>.<ext>". This is happening due to improper extension dropping in wp_ultimate_csv_importer.php about the line 375 where instead of dropping the last item of the array, only the first one is used. This code would handle it properly:

    $img_name = explode('/',$file_url);
    $imgurl_split = count($img_name);
    $img_name = explode('.',$img_name[$imgurl_split-1]);
    array_pop($img_name); // new line
    $img_title = $img_name = implode('.', $img_name); // changed line


  2. smackcoders
    Plugin Author

    Posted 3 years ago #

    New version is released with improvements and fixes. Please upgrade and leave your feedback.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • CSV Import for WordPress
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic