Skip to:
Content

BuddyPress.org

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#7871 closed enhancement (fixed)

defined BP_DEFAULT_COMPONENT is not honoured when BP Nouveau is active

Reported by: sbrajesh Owned by: imath
Milestone: 3.1.0 Priority: normal
Severity: normal Version: 3.0.0
Component: Templates Keywords: has-patch commit
Cc: sbrajesh

Description

When BP Nouveau is active, if we define the BP_DEFAULT_COMPONENT, It is not honoured.

I put following line into the bp-custom.php

define( 'BP_DEFAULT_COMPONENT', 'profile' );

But it did not work. If I enable the legacy template pack, It works as expected.

Attachments (1)

7871.patch (813 bytes) - added by imath 3 years ago.
let's free the first nav item :)

Download all attachments as: .zip

Change History (10)

#1 @imath
3 years ago

  • Keywords reporter-feedback 2nd-opinion has-patch added

Hi @sbrajesh

Thank you for your feedback. Actually BP Nouveau is honouring this constant the same way BP Legacy does. You think the opposite because by default Nouveau is using the custom front page feature. If you deactivate this setting from the customizer (see the screencapture below), you should see the Profile nav is the default component.

https://cldup.com/sU4O28bjiu.png

Alternatively, if you add a front.php template in bp-legacy/buddypress/members/single/ (or in a theme's buddypress/members/single/ folder) you'll see that BP Legacy is not using the constant to set the landing page.

So I have a suggestion : edit this ticket as an enhancement so that we remove the restriction about the first nav item of the primary nav into the reordoring panel of the customizer, this way we could land on profile and have it at the first position if the custom front is disabled (see the screencapture below). I don't see any trouble about doing this ;) What do you think @hnla ?

https://cldup.com/tFrWNrAMy0.PNG

7871.patch is removing this restriction.

@imath
3 years ago

let's free the first nav item :)

#2 @hnla
3 years ago

  • Keywords commit added; 2nd-opinion removed

So for clarity:
The constant does work as expected.
The issue being that once the custom home page deactivated and constant defined we don't perceive the nav item as the first in the order of links, and that in the Customizer the ability to re-order isn't possible.

Tested patch and it does allow for the profile item to be re-ordered to the top position(first in list).

@imath Lets commit then.

#3 @imath
3 years ago

  • Keywords reporter-feedback removed
  • Milestone changed from Awaiting Review to 3.1.0
  • Owner set to imath
  • Status changed from new to assigned
  • Type changed from defect (bug) to enhancement

Thanks a lot for your feedback @hnla 👍 Let's have this in!

#4 @sbrajesh
3 years ago

Hi @imath
In this case, It should be considered a bug in BuddyPress Core.

The constant has been there well before the custom front page was introduced. A correct solution will be to honour the constant whether the front page is active or not. Otherwise, the constant is meaningless.

Please feel free to edit the title of this bug report and move it away from BP Nouveau.

Last edited 3 years ago by sbrajesh (previous) (diff)

#5 @imath
3 years ago

In 12137:

BP Nouveau Customizer: Improve Primary Nav Item reordoring control.

Remove the restriction about the top/first primary nav item to let the site owner control the order of each items. It now allows to be consistent with the BP_DEFAULT_COMPONENT if the custom front is not used by moving this default component nav item at the first position.

Props sbrajesh, hnla

See #7871 (Trunk)

#6 @imath
3 years ago

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

In 12138:

BP Nouveau Customizer: Improve Primary Nav Item reordoring control.

Remove the restriction about the top/first primary nav item to let the site owner control the order of each items. It now allows to be consistent with the BP_DEFAULT_COMPONENT if the custom front is not used by moving this default component nav item at the first position.

Props sbrajesh, hnla

Fixes #7871 (Branch 3.0)

#7 @imath
3 years ago

@sbrajesh This is the point of view of a Plugin developer :)

I can imagine site owners' point of view! If they do add this front page, then they certainly want it to be the landing page.
But I'll open a new ticket about it so we can discuss more about it ;)

#8 @sbrajesh
3 years ago

Thank you.
yes, you are correct about the views. It still warrants further discussion. Looking forward to the new topic :)

#9 @imath
3 years ago

Further discussion will happen int this ticket #7873

Note: See TracTickets for help on using tickets.