Skip to:
Content

bbPress.org

Opened 3 years ago

Closed 3 years ago

Last modified 5 months ago

#3445 closed defect (bug) (fixed)

Editor buttons missing since 2.6.8 upgrade

Reported by: n3wjack's profile n3wjack Owned by: johnjamesjacoby's profile johnjamesjacoby
Milestone: 2.6.10 Priority: normal
Severity: major Version: 2.6.9
Component: Appearance - Theme Compatibility Keywords: has-patch 2nd-opinion
Cc:

Description

The post editors' buttons are missing after upgrading to the 2.6.8 release.
In 2.6.6 the buttons are still visible.

As mentioned in this support thread https://bbpress.org/forums/topic/editor-buttons-missing-since-2-6-8-upgrade/, there is a workaround by editing the theme, but that's not ideal.

Attachments (1)

3445.patch (2.4 KB) - added by johnjamesjacoby 3 years ago.
Patched from ./src/ as root

Download all attachments as: .zip

Change History (8)

This ticket was mentioned in Slack in #meta by otto42. View the logs.


3 years ago

#2 @dd32
3 years ago

Introduced with #3421 / #3443, [7190] / [7220] - The no-js body class is added to all bbpress pages, but only swapped from body.no-js to body.js on the profile edit screen (...plus various other individual templates, which sites might not have copied)

@johnjamesjacoby can the JS to swap it be moved from the various form-topic.php/form-reply.php templates to always being output when bbPress adds the class?

On WordPress.org we're using https://meta.trac.wordpress.org/changeset/11454 on wp_body_open for it - but that assumes that the action is present in all themes, which it isn't always, the below code chunk would work around that.

add_action( 'wp_body_open', 'swap_js_body_tags' );
add_action( 'wp_footer', 'swap_js_body_tags' );
function swap_js_body_tags() {
   remove_action( 'wp_footer', 'swap_js_body_tags' );
   echo '<script....';
}
Last edited 3 years ago by dd32 (previous) (diff)

#3 @r-a-y
3 years ago

I can confirm the no-js body CSS class bug as well. +1 for dd32's suggestion.

Last edited 3 years ago by r-a-y (previous) (diff)

#4 @johnjamesjacoby
3 years ago

  • Component changed from General to Appearance - Theme Compatibility
  • Keywords has-patch 2nd-opinion added
  • Milestone changed from Awaiting Review to 2.6.10
  • Severity changed from normal to major

Thanks @dd32 and @r-a-y 👍

In addition, how about we namespace the classes, to: bbp-no-js and bbp-js?

That will effectively avoid conflicts with themes and other plugins that use their own no-js class.

Patch imminent.

@johnjamesjacoby
3 years ago

Patched from ./src/ as root

#5 @johnjamesjacoby
3 years ago

  • Owner set to johnjamesjacoby
  • Resolution set to fixed
  • Status changed from new to closed

In 7230:

Theme Compat: improve "no-js" body class swapping.

This change introduces a new helper function (bbp_swap_no_js_body_class()) which is used to output the <script> tag that was previously inside of the single template part that needed it.

It also adds a prefix (bbp) to those "no-js" body classes, with the intention of avoiding conflicts with other plugins & themes that may also be using the no-js body class for their own purposes.

Props dd32, r-a-y.

In branches/2.6 for 2.6.10. Fixes #3445.

#6 @johnjamesjacoby
3 years ago

In 7231:

Theme Compat: improve "no-js" body class swapping.

This change introduces a new helper function (bbp_swap_no_js_body_class()) which is used to output the <script> tag that was previously inside of the single template part that needed it.

It also adds a prefix (bbp) to those "no-js" body classes, with the intention of avoiding conflicts with other plugins & themes that may also be using the no-js body class for their own purposes.

Props dd32, r-a-y.

In trunk for 2.7.0. Fixes #3445.

#7 @n3wjack
20 months ago

Is this coming in any of the minor releases in the future, or do you have an idea when 2.7 will be released?

Note: See TracTickets for help on using tickets.