Skip to:

Opened 14 years ago

Closed 13 years ago

#2038 closed defect (bug) (wontfix)

path error in bp admin-bar

Reported by: chouf1's profile chouf1 Owned by:
Milestone: Priority: major
Severity: normal Version:
Component: Blogs Keywords: needs-patch



Path to My Blogs sub menu has missing slash
This is actually wrong in the trunk file.

126  echo '<ul>';
127  echo '<li class="alt"><a href="' . esc_attr( $blog->siteurl ) . 'wp-admin/">' . __( 'Dashboard', 'buddypress' ) . '</a></li>';
128  echo '<li><a href="' . esc_attr( $blog->siteurl ) . 'wp-admin/post-new.php">' . __( 'New Post', 'buddypress' ) . '</a></li>';
129  echo '<li class="alt"><a href="' . esc_attr( $blog->siteurl ) . 'wp-admin/edit.php">' . __( 'Manage Posts', 'buddypress' ) . '</a></li>';
130  echo '<li><a href="' . esc_attr( $blog->siteurl ) . 'wp-admin/edit-comments.php">' . __( 'Manage Comments', 'buddypress' ) . '</a></li>';
131  echo '</ul>';

should be

echo '<ul>';
echo '<li class="alt"><a href="' . esc_attr( $blog->siteurl ) . '/wp-admin/">' . __( 'Dashboard', 'buddypress' ) . '</a></li>';
echo '<li><a href="' . esc_attr( $blog->siteurl ) . '/wp-admin/post-new.php">' . __( 'New Post', 'buddypress' ) . '</a></li>';
echo '<li class="alt"><a href="' . esc_attr( $blog->siteurl ) . '/wp-admin/edit.php">' . __( 'Manage Posts', 'buddypress' ) . '</a></li>';
echo '<li><a href="' . esc_attr( $blog->siteurl ) . '/wp-admin/edit-comments.php">' . __( 'Manage Comments', 'buddypress' ) . '</a></li>';
echo '</ul>';

Change History (8)

#1 @TobiasBg
14 years ago

Those variables should actually be replaced with function calls to WP's site_url() or admin_url() functions, shouldn't they?


echo '<li class="alt"><a href="' . esc_attr( admin_url() ) . __( 'Dashboard', 'buddypress' ) . '</a></li>';

and so on.

I'll create a patch this evening, if someone confirms my thoughts.

#2 @TobiasBg
14 years ago

echo '<li class="alt"><a href="' . esc_attr( admin_url() ) . '">' . __( 'Dashboard', 'buddypress' ) . '</a></li>';

that is, of course.

#3 @apeatling
14 years ago

If you use admin_url() it's going to be a link to the current blog's admin URL.

#4 @apeatling
14 years ago

I can't see this problem on or my test installations. Can you provide steps to reproduce, and explain exactly what is wrong?

#5 @chouf1
14 years ago

i have actually 2 blog links in this menu, the main blog and a another one.
The first and his sub-menu/
Demo - path ok
sub-menu - dashboard - path is http://bp-fr.netwp-admin/

the slash is missing.

the second blog
Pourvoir - path ok
sub-menu - dashboard path ok

create a blog is OK too

#6 @chouf1
14 years ago

I updated to 1.2.1, and while going throught the blog admin i see that i have the same path error in wpmu nav menu

in the users blog list in wpmu admin.
under the blog name in the menu item "dashboard"

is this a wpmu issue or could this be a misconfiguration on my side ?

(It could be possible, as i changed manually somme mery thousand links during a server transfer)
It depends where this link is constructed and if this link is somewhere in the db ?

#7 @cnorris23
13 years ago

  • Component set to Blogs
  • Keywords needs-patch added

This is almost fixed in trunk. bp_adminbar_blogs_menu() still needs a little love, but get_site_url() should fix it.

#8 @boonebgorges
13 years ago

  • Resolution set to wontfix
  • Severity set to normal
  • Status changed from new to closed

As the BuddyBar will not be receiving any more enhancements after BP 1.5, I'm marking this ticket as wontfix.

Note: See TracTickets for help on using tickets.