WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#6809 closed defect (bug) (worksforme)

SUGGESTED SOLUTION: Wordpress 2.5 get_the_content only works with added wpautop

Reported by: fadingdust Owned by:
Milestone: Priority: high
Severity: critical Version: 2.5
Component: General Keywords: get_the_content, wpautop tags
Focuses: Cc:

Description

I've installed Wp2.5 on 4 servers and have consistent behavior:

In the visual editor AND HTML editor:

Hello there wordpress!!

I'm a second line!

In the HTML-source of the /wp-admin/page.php?action=edit&post=25 page:

<p>Hello there wordpress!!</p>
<p>I'm a second line!</p>

In the database:

Hello there wordpress!!

I'm a second line!

In the Post HTML-source:

Hello there wordpress!! I'm a second line!


So my theory is that:
a) When I upgraded, wpautop wasn't run on the db
b) get_the_content's 'return $output' needs to be 'return wpautop($output)'
c) when a post is saved, it's not wpautop'd (or it's doubly wpautop'd ??)

Solution 'b' was effective.

Change History (3)

comment:1 fadingdust6 years ago

  • Cc fadingdust added

comment:2 DD326 years ago

b) get_the_content's 'return $output' needs to be 'return wpautop($output)'

wpautop should be run on the the_content filter, so the $output should be wpautop'd allready.

Does it occur with the Default theme? Does it occur with all plugins disabled?

comment:3 DD326 years ago

  • Resolution set to worksforme
  • Status changed from new to closed

Lack of reporter feedback, Appears to work fine for me and others.

My assumption is that its a corrupted upload of a file (Sepcifically wp-includes/default-filters.php) which does run wpautop over the content

Note: See TracTickets for help on using tickets.