Skip to:
Content

BuddyPress.org

Opened 10 years ago

Closed 10 years ago

Last modified 8 years ago

#5588 closed defect (bug) (fixed)

Notice on Search page setting to None

Reported by: slaffik's profile slaFFik Owned by: boonebgorges's profile boonebgorges
Milestone: 2.1 Priority: normal
Severity: minor Version:
Component: Core Keywords:
Cc:

Description

I assume you have a page connected to Search on "Settings > BuddyPress > Pages" page.

Now if you for Search Directory select "None" as a page and click "Save" next to the page, this notice will be displayed:

Notice: Indirect modification of overloaded property BuddyPress::$add_root has no effect in [...]wp-content\plugins\buddypress\bp-core\bp-core-functions.php on line 564

Tested with BuddyPress 2.0 & WordPress 3.9, all stable

Change History (7)

#1 @boonebgorges
10 years ago

By default, Search is not an option at "Settings > BuddyPress > Pages". Maybe you're using a plugin that adds Search as a root component?

#2 @slaFFik
10 years ago

No, I don't use such plugin. I should say that I see that Search page at "Settings > BuddyPress > Pages" quite often on different (even dev) installs. Can't find the pattern so far.

#3 @slaFFik
10 years ago

[deleted the duplication because of "database is locked" error 0_o]

Last edited 10 years ago by slaFFik (previous) (diff)

#4 @slaFFik
10 years ago

Ok, here are some more bits of information.

Installed x2, Custom Community themes from WordPress themes repo. Got this message: "The following active BuddyPress Components do not have associated WordPress Pages: Search Page. Repair"

Deactivating those themes hides the Search under Directories at "Settings > BuddyPress > Pages"

#5 @boonebgorges
10 years ago

  • Milestone changed from Awaiting Review to 2.1
  • Severity changed from normal to minor

Thanks for the additional information.

It does look like this is a bug in the way that the magic __get() method is set up to store properties in the main BuddyPress class. Because this function is not really properly in use these days anyway, I'm going to put a workaround in place rather than writing a proper API method for setting add_root.

#6 @boonebgorges
10 years ago

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

In 8323:

Don't attempt to overload add_root property in bp_core_add_root_component()

The add_root array is defined only for backward compatibility purposes in the
BuddyPress global object, and thus is overloaded rather than defined in the
constructor. This means that adding items directly to the array is forbidden
on recent versions of PHP. As a workaround, we add the item as a separate array
and then swap the array, which is allowed and will not result in notices.

Fixes #5588

#7 @DJPaul
8 years ago

  • Component changed from Tools - Warnings/Notices to Core
Note: See TracTickets for help on using tickets.