Skip to:
Content

BuddyPress.org

Opened 11 years ago

Closed 11 years ago

Last modified 8 years ago

#5045 closed defect (bug) (fixed)

BP Legacy members settings templates markup issues

Reported by: hnla's profile hnla Owned by: boonebgorges's profile boonebgorges
Milestone: 1.8 Priority: normal
Severity: normal Version:
Component: Templates Keywords: has-patch
Cc:

Description

In bp-legacy/buddypress/members/single/

There is an issue with the /single/settings/ templates

home.php checks what template to include e.g settings.php it includes that template_part into a fully formed div#buddypress div#item-body set of elements.

In settings.php we check/switch to required template_part e.g general.php in that file and the others we are again stating #buddypress #itembody

We should really fix this as it doesn't look good, true this is a 'legacy' set of templates however they are out in the wild & in use and throwing markup warnings for duplicate ID's.

Deleting these additional elements from the inner template_parts ought to cause no issue as they are dups, testing on a local test site with fairly heavy custom styles around these elements caused no issues when I simply deleted the extraneous elements.

Attachments (1)

5045-01.patch (3.4 KB) - added by hnla 11 years ago.
Patch removes item-body elements & moves 'role="main" to home.php

Download all attachments as: .zip

Change History (8)

#1 @henrywright
11 years ago

If home.php loads settings.php and then settings.php loads general.php - doesn't that mean we'd have get_header( 'buddypress' ) load twice? e.g. once in home.php and once in general.php

In practice, i think home.php doesn't load settings.php. This means that general.php and notifications.php are loaded directly and settings.php isn't used.

#2 @boonebgorges
11 years ago

  • Milestone changed from Awaiting Review to 1.8

In practice, i think home.php doesn't load settings.php. This means that general.php and notifications.php are loaded directly and settings.php isn't used.

I'm pretty sure that's not right. I seem to remember that something like this happened in a recent version of bp-default, but bp-legacy in the master branch definitely loads home.php -> settings.php -> general.php, and so on.

Deleting these additional elements from the inner template_parts ought to cause no issue as they are dups

Yes. It appears that they are dupes, and they've just gone unnoticed since bp-legacy was first copied over in r6284.

#3 @boonebgorges
11 years ago

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

In 7199:

Remove <div id="buddypress"> wrappers from members/single/settings/ templates

The #buddypress div is added in the top-level template. It appears to have been
copied here by mistake when bp-legacy was first spawned from bp-default.

Fixes #5045

Props hnla

#4 @hnla
11 years ago

  • Keywords has-patch added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Re-opening with patch as need to also remove <div id="item-body"> from each template part and move 'role="main"' up to item-body in home.php

@hnla
11 years ago

Patch removes item-body elements & moves 'role="main" to home.php

#5 @boonebgorges
11 years ago

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

In 7202:

Removes more redundant markup from bp-legacy members/single/settings/ templates

Fixes #5045 again

Props hnla

#6 @henrywright
11 years ago

I must have used that rogue recent version of bp-default. Both header.php and footer.php are included in notifications.php and general.php. I'll install a fresh copy.

#7 @DJPaul
8 years ago

  • Component changed from Appearance - Template Parts to Templates
Note: See TracTickets for help on using tickets.