Skip to:
Content

#5545 closed defect (bug) (fixed)

Notice appears when using BP Nav Menus

Reported by: alnasirkarim Owned by: r-a-y
Milestone: 2.0.1 Priority: normal
Severity: normal Version: 1.9
Component: Component - Core Keywords: has-patch commit
Cc: alnasirkarim@…

Description

Warning: strpos() [function.strpos]: Empty needle in /home/content/92/7143392/html/reunion/wp-content/plugins/buddypress/bp-core/bp-core-filters.php on line 489

Site: Reunion.tamakboys.net
Buddypress version: 1.9.2
WP version 3.8.3

Attachments (1)

5545.01.patch (707 bytes) - added by r-a-y 11 months ago.

Download all attachments as: .zip

Change History (10)

comment:1 @DJPaul11 months ago

  • Keywords reporter-feedback added

What URL did you access to trigger this error?

comment:2 @alnasirkarim11 months ago

  • Cc alnasirkarim@… added

It show up on the home page in the menu bar.

Last edited 11 months ago by alnasirkarim (previous) (diff)

comment:3 @r-a-y11 months ago

  • Keywords has-patch added; reporter-feedback removed
  • Milestone Awaiting Review deleted
  • Version set to 1.9

alnasirkarim - This occurs when you have deactivated a BuddyPress component, but you still have the menu item for the deactivated component listed under "Appearance > Menus":
http://buddypress.org/support/topic/error-message-warning-strpos-function-strpos-empty-needle-in/#post-176804

I've attached a patch, which fixes the notice from displaying.

It doesn't remove the deactivated component's menu item though. What we could do in an iterative patch is when deactivating a component, check the BP menus and remove the offending menu item.

Core devs: Okay for v2.0.1?

Last edited 11 months ago by r-a-y (previous) (diff)

@r-a-y11 months ago

comment:4 @r-a-y11 months ago

  • Summary changed from Bug Report on Site. to Notice appears when using BP Nav Menus

comment:5 @boonebgorges11 months ago

  • Keywords commit added
  • Milestone set to 2.0.1

Good find, r-a-y. Yes, this looks safe for 2.0.1.

comment:6 @alnasirkarim11 months ago

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

Thank you r-a-y.

It worked.

comment:7 @r-a-y11 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

I still need to commit the fixes ;)

comment:8 @r-a-y11 months ago

In 8307:

BP Nav Menu: If menu URL doesn't exist, mark menu item as invalid.

Previously, when a BuddyPress component is deactivated but a menu item
for this component still exists, the generated menu would create a warning.

This commit addresses this.

See #5545 (2.0-branch)

comment:9 @r-a-y11 months ago

  • Owner set to r-a-y
  • Resolution set to fixed
  • Status changed from reopened to closed

In 8308:

BP Nav Menu: If menu URL doesn't exist, mark menu item as invalid.

Previously, when a BuddyPress component is deactivated but a menu item
for this component still exists, the generated menu would create a warning.

This commit addresses this.

Fixes #5545 (trunk)

Note: See TracTickets for help on using tickets.