Ticket #5555 (closed defect: fixed)

Opened 7 months ago

Last modified 2 months ago

Post Excerpts not included in import/export

Reported by: intricateartist Assigned to: anonymous
Priority: normal Milestone: 2.6
Component: General Version:
Severity: major Keywords: has-patch tested dev-feedback
Cc:

Description

Helli (a member in the forum) posted the fix for this bug in the forum 10 months ago for version 2.1 - this should be added to the list of bugs/defects for the next release:

Add in wp-admin\export.php:

<excerpt:encoded><![CDATA[<?php echo $post->post_excerpt ?>]]></excerpt:encoded>

above:

<content:encoded><![CDATA[<?php echo $post->post_content ?>]]></content:encoded>

and in wp-admin\import\wordpress.php:

below:

$post_author = $this->get_tag( $post, 'dc:creator' );

place:

$post_excerpt = $this->get_tag( $post, 'excerpt:encoded' ); $post_excerpt = str_replace(array ('<![CDATA, ?]>'), , $post_excerpt); $post_excerpt = preg_replace('|<(/?[A-Z]+)|e', "'<' . strtolower('$1')", $post_excerpt); $post_excerpt = str_replace('<br>', '<br />', $post_excerpt); $post_excerpt = str_replace('<hr>', '<hr />', $post_excerpt);

(above this line)

$post_content = $this->get_tag( $post, 'content:encoded' );

Attachments

wpexcerpt.patch (1.4 kB) - added by kartik_subbarao on 04/24/08 21:52:10.
Enable proper import/export of blog excerpts

Change History

01/01/08 17:27:31 changed by ryan

Fine by me. Anyone want to create a patch?

04/24/08 20:55:48 changed by kartik_subbarao

Are you looking for a specific patch in "diff -u" format? The original poster did specify the code changes necessary. If the only thing holding this back is the format of the code patch, that can certainly be provided pretty quickly.

04/24/08 21:52:10 changed by kartik_subbarao

  • attachment wpexcerpt.patch added.

Enable proper import/export of blog excerpts

04/24/08 21:54:58 changed by kartik_subbarao

I have submitted a patch (see the attachment). I was able to omit one of the lines that stripped out <![CDATA[]>, since that gets done elsewhere already.

05/18/08 21:41:26 changed by error

  • keywords set to has-patch tested dev-feedback.

Confirmed. I just got burned by this bug and I'm surprised it's been around this long.

05/20/08 22:22:22 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

(In [7965]) Export and import post excerpts. Props kartik_subbarao. fixes #5555