Skip to:
Content

BuddyPress.org

Opened 4 months ago

Closed 4 weeks ago

#9304 closed defect (bug) (fixed)

'no-js' body class not being added correctly since BuddyPress 12.1.0

Reported by: r-a-y's profile r-a-y Owned by: espellcaste's profile espellcaste
Milestone: 14.5.0 Priority: normal
Severity: normal Version: 12.1.1
Component: Templates Keywords: has-patch
Cc:

Description

r13672 added is_buddypress() checks before adding the 'no-js' body class.

However, the is_buddypress() check is done too early on the 'after_setup_theme' hook, so this means the 'no-js' body class is never added since BuddyPress 12+ and when the rewrites parser is enabled.

Need to delay the check. See attached patch.

Attachments (1)

9304.01.patch (2.5 KB) - added by r-a-y 4 months ago.

Download all attachments as: .zip

Change History (5)

@r-a-y
4 months ago

#1 @espellcaste
4 weeks ago

  • Milestone changed from Awaiting Review to 14.5.0

#2 @vapvarun
4 weeks ago

Tested 9304.01.patch - works as expected.

Before patch: no-js class never added on BP pages because is_buddypress() returns false in constructor.

After patch: no-js class properly added, then replaced with js by BuddyPress JavaScript.

Thanks @r-a-y for the clean fix! +1 for commit.

#3 @espellcaste
4 weeks ago

In 14174:

Restore no-js body class for BuddyPress pages.

Regression introduced at [13672], part of [13418].

Props r-a-y and vapvarun.

See #8679
See #9304 (14.0)

#4 @espellcaste
4 weeks ago

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

In 14175:

Restore no-js body class for BuddyPress pages.

Regression introduced at [13672], part of [13418].

Props r-a-y and vapvarun.

See #8679
Fixes #9304 (trunk)

Note: See TracTickets for help on using tickets.