WordPress.org

Forums

Import CSV with Ultimate CSV Importer
[resolved] Post Slug After Import (4 posts)

  1. rpwk
    Member
    Posted 2 years ago #

    Hi — I've just imported 175 articles into WordPress, and it looks like the post slugs are missing the dashes that seperate words in the slug.

    Ex:

    /roastedvegetablesgoatcheesepastasalad/

    Which should be:

    /roasted-vegetables-goat-cheese-pasta-salad/

    Is there a workaround or fix for this issue?

    Thanks!

    http://wordpress.org/extend/plugins/wp-ultimate-csv-importer/

  2. rpwk
    Member
    Posted 2 years ago #

    Just FYI, I re-imported a post from a previous import and the post slugs are missing the dashes, whereas the first time the post slug was properly formatted. It looks like this is an issue related to the recent upgrade.

  3. rpwk
    Member
    Posted 2 years ago #

    OK, I found the issue — looks like these lines in wp_ultimate_csv_importer.php are the culprit:

    174-186:

    // Scandinavian characters
    function smack_marks_scandiConverter($text){
        $returnvalue="";
        for($i=0;$i<strlen($text);$i++){
            $smacker=hexdec(rawurlencode(substr($text, $i, 1)));
            if($smacker<32||$smacker>1114111){
                $returnvalue.=substr($text, $i, 1);
            }else{
                $returnvalue.="&#".$smacker.";";
            }
        }
        return $returnvalue;
    }

    and:

    394 $data_array['post_title'] = smack_marks_scandiConverter($data_array['post_title']);
    395 $data_array['post_content'] = smack_marks_scandiConverter($data_array['post_content']);
  4. smackcoders
    Member
    Plugin Author

    Posted 2 years ago #

    Yes, this issue is fixed and will update the repo soon. Let me know if it exists even after upgrading to 2.6.0.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Import CSV with Ultimate CSV Importer
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.