Skip to:
Content

bbPress.org

Opened 8 years ago

Closed 8 years ago

#2310 closed enhancement (fixed)

the_content filters maybe missing when deleting theme compat templates

Reported by: DJPaul Owned by:
Milestone: 2.4 Priority: low
Severity: normal Version: 2.0
Component: Appearance - Theme Compatibility Keywords: needs-patch
Cc:

Description

Not sure if this is a bug worth fixing, but I wanted to ticket it for investigation. It looks like the filters on the_content might not be restored correctly... if you delete the appropriate theme compat template file.

Create a new thread, and make sure that this first post has multiple paragraphs. Delete content-single-topic.php, then look at the post; (obviously) the page will look different, but the post's contents are missing paragraphs -- as if wpautop wasn't being run.

Change History (4)

#1 @johnjamesjacoby
8 years ago

  • Keywords reporter-feedback needs-testing added
  • Milestone changed from Awaiting Review to 2.3.1

Tested this with TwentyTwelve and Toolbox using the template part you describe above (content-single-topic.php) and am unable to duplicate these results; paragraph tags appear correctly in both themes, either with the template part in %theme_name%/bbpress/ or using bbPress's default theme compatibility location.

I've also tested with various loop template parts with similar results:

  • loop-single-reply.php
  • loop-single-topic.php
  • loop-single-forum.php

Best I can tell, this is working as expected. Possible to get a list of active plugins on your installation, and what theme you're using (assuming it's not totally custom?) If it is custom, can you verify that nothing in functions.php is filtering 'the_content' and intercepting the output in a strange way?

#2 @johnjamesjacoby
8 years ago

  • Keywords needs-patch added; reporter-feedback needs-testing removed
  • Milestone changed from 2.3.1 to 2.4
  • Priority changed from normal to low
  • Type changed from defect to enhancement
  • Version changed from trunk to 2.0

Reviewed this again with Paul. It's a bug, but requires deleting core template parts to duplicate. Going to put this into 2.4 with a low priority as an enhancement to theme compatibility.

A proper patch involves creating a bbp_get_content_area() function, that can tell when no replacement content template is found, and replace the filters just-in-time before the unmodified call to the_content() happens.

Worth noting that BuddyPress likely also exhibits this same behavior, and will need to be similarly patched.

#3 @johnjamesjacoby
8 years ago

  • Milestone changed from 2.4 to 2.5

No time. Moving to 2.5.

#4 @johnjamesjacoby
8 years ago

  • Milestone changed from 2.5 to 2.4
  • Resolution set to fixed
  • Status changed from new to closed

bbPress 2.4 is switching to replacing post_content rather than filtering the_content. Moving to 2.4 and marking as fixed, since it negates this ticket. If regressions are introduced, or it does not directly address this specific issue, please reopen.

Note: See TracTickets for help on using tickets.