Hospedaje-Trotamundos / buddypress-media

Automatically exported from code.google.com/p/buddypress-media
0 stars 0 forks source link

Admin Menu moved in 3.1 #68

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
*** YOU MUST ANSWER ALL QUESTIONS. IF A QUESTION IS NOT RELEVANT YOU MUST
WRITE "NOT APPLICABLE" IN THE QUESTION FIELD. ***

[What steps will reproduce the problem? ]
1. Install WP 3.1 RC3
2. Install BP Album+

[What is the expected output? What do you see instead?]
Expected output: A menu to edit things

Instead: Nothing

[What version of BP Media are you using?]
0.1.8.7

[What version of WordPress are you using?]
3.1RC3 (well, nightly, but this will happen on ALL the 3.1 branches)

[What version of BuddyPress are you using?]
1.2.7

[What version of PHP are you using?]
5 something... But that's not related :)

[If the problem is layout related (broken page layout, etc) or browser
related (page just freezes, cannot connect to server) ...what happens when you 
load the page in AT LEAST TWO of the following browsers:]
 N/A

[What is the URL of your web host?]
http://jorjafox.net

[If you are running a public site, what is the URL to a page that shows the 
problem?]
N/A

[Do you know how to use phpMyAdmin?]
Yep

[Do you know how to edit PHP code?]
Ayup

[Please provide any additional information below]

On 3.1 they moved the network admin menu, and since BuddyPress is over there, 
you'll need to edit your plugin to point there as well.

It's an easy fix.

Edit /bp-album/includes/bp-album-core.php

Line 115 should be
add_action( 'network_admin_menu', 'bp_album_add_admin_menu' );

That seems to be it. Working on the rest now to make sure it's Kosher all 
through :)

Original issue reported on code.google.com by ipstenu on 27 Jan 2011 at 4:58

GoogleCodeExporter commented 9 years ago
Correction, add BELOW line 115 the code I mentioned.  So you get this:

add_action( 'admin_menu', 'bp_album_add_admin_menu' );
add_action( 'network_admin_menu', 'bp_album_add_admin_menu' );

Apparently that works without collisions for MultiSite and non Multisite.  You 
may need to double up for ALL instances of admin_menu.

Original comment by ipstenu on 27 Jan 2011 at 5:12

GoogleCodeExporter commented 9 years ago
We finally got this defect sorted out as of 2011-11-26 in version 
BP-Album+0.1.8.8, which you can download here: 
http://code.google.com/p/buddypress-media/downloads/list

Basically, what happened was:

1) WordPress introduced a "Super Admin Network Menu" intended for people 
running multi-blog sites in addition to their normal "Admin Site" menu.

2) They also introduced a field called "Network:" in the info block at the 
beginning of the plugin loader file. If you set it to "false" and somebody 
installs it on a regular site, it displays it as normal. If you set it as 
"false" and somebody installs it on the "site" screen of a network install, it 
shows up on the "site" screen of the network install, but if they install it on 
the "network" screen of a network install, then it only shows up on the 
"network" screen of that install.

If, however, they set "Network:" = true, the plugin will ONLY show up if it is 
installed a) on a system that is in "network" mode, and b) if it is installed 
using the plugin install menu on the "network" screen.

So that covers WordPress 3.1.

3) In addition to this, BuddyPress modified bp_core_check_avatar_type(), 
breaking the function's contract (technically they should have thrown an E_WARN 
DEPRECATED), but that one was easy to find and fix. 

4) And in addition to this, BuddyPress set their network field to "true", 
meaning it only showed up on the "network" screen, and making our menu 
invisible as a result.

So, a lot of work to fix, but everything works now.

As an aside: It would totally rock if WordPress and BuddyPress shipped a 
"Developer" version of their plugins developers to test against before 
releasing the full version on the WP site. "Keep following the SVN and test 
against that" isn't a reasonable answer. I was watching the core developers 
making *dozens* of changes up to 15 minutes before launch. 

^F^

https://www.pivotaltracker.com/story/show/10488573

Original comment by CarlRoett@gmail.com on 27 Feb 2011 at 3:30