BP plugins multisite menu fix?
I have seen several threads claiming that changing ‘admin_menu’ to ‘network_admin_menu’ will get the plugin settings to appear in the site admin under Buddypress.
This works and the menu items are visible and you can get to the settings page fine. However, if you make any changes and try to save them you will get a “404 not found” error. It is looking for wp-admin/network/options.php, but that appears to have moved and is no longer there.
Does anyone know what to change to save new settings?
Hello, I have the same problem too but it depends on the plugin. When I change set up of some, I get a 404 page. With other plugins, I’m redirected to the dashboard of the site with this url “…/network-blog-name/wp-admin/?c=1″.
I tried to modify the admin page of BP-share-it plugin where I changed action=”options.php” to action=”../options.php”. It worked but not for other plugins…
It really depends how well-written the plugin is. Probably people have hard-coded URLs on the form submit action.
So, the plugin “WELCOME PACK”, written for YOU, and not working for this reason is not well-written?
I’ve read about the solution in other forums of changing “admin_menu” to “network_admin_menu” to make reappear the plugin menu, but it’s only there. You can’t change settings.
I tried this solution changing “options.php” to “../options.php” and the error changes, WordPress says that there’s no options file.
Are you reading this?: https://buddypress.org/community/groups/welcome-pack/forum/topic/welcome-pack-not-working-after-latest-update/
@ZKWC even offered you money for the job, but you don’t give any answer.
I guess you don’t know about this change from admin_menu to network_admin_menu Or you should have told us to do it.
I’m not a programmer but I guess that you know the little change we have to do to save the settings in that options file, no?
What we have to do to get an answer from you?
-“wait for 1.3″ (that could happen in october)
-“I need money” (I need money too, but I think that offering a free plugin, and when a lot of people is using it, request for money to maintain it, it’s not a good idea. Thinkin on your reputation)
Sorry for my bad english.
Welcome Pack hasn’t been updated in a very long time. There are technical issues around why, on multisite, even if you change the hook to network_admin_menu, the settings don’t save (WordPress bug).
I haven’t had time to update Welcome Pack since last version, and I have had other priorities. I am working on a new version, and I’d like to get out an interim release to fix the compatibility problems, but again that’s dependant on other priorities I have and how much time I can free up.
@djpaul, @boonebgorges, @hnla Is there someone who knows *why* this happens? Is it a matter of a wrongly coded url which anyone can fix? Or is it something that needs refactoring of the entire plugin? If it was easy we could start submitting the update plugins to the authors with the fixes, instead of waiting till the author fixes it. There are tons of people downloading these plugins, and without admin panels they appear not to be working. I’ve manually fixed up a few plugins, but saving options does not work on all of those. sadly
I am a programmer and am looking for a solution to this. It is not a hard-coded form action location. If anyone has any solutions let me know, I will post mine here when I find it.
There is a simple fix for the problem with saving data.
Look for admin_url and replace with network_admin_url, also, if there is something hard coded like site_url(“wp-admin/something.php”) change that to network_admin_url(“something.php”) and it will be solved. to sum up, all the urls pointing to wp-admin should be generated via network_admin_url for the compatibility with wpms 3.1
Thanks Brajesh.. I’ll put this up on BP-Tricks as well.. so people can start updating plugins which ARE working but are not yet updated. I’ll ask people to submit their updates as well.
Thanks for the fix!
It’s a bit more complicated sadly.. look at this post:
I tried to modify some simple plugins, but could not find any references to admin_url or figure out how to fix the options saving.
I tried BP-Profile Privacy and BP-Moderation (a bit more advanced code wise)
Just read this, BP-Share-it was fixed, just delete and re-download from repo.
Before you could just use options.php, now it seems you need the network admin url. Search for options.php, if all you see is that then wrap it with network_admin_url(“options.php”). Should be on the post form
I can’t get this to work with the network_admin_url(“options.php”) when echo within the form action I just get a 404 – If anyone has a better method please post a comment here: http://code.hyperspatial.com/all-code/actionscript-code/save-plugin-options-multisite-3-1/
It must have something to do with how mu 3.1 redirects admin page requests because as soon as you refresh the page after the 404 you get when just using action=”../options.php” or a direct link – well the real options.php page comes up.
@bowromir I’m not sure what admin_url() or network_admin_url() are but guess I probably ought to have used them when fixing my work, however where I needed a path to correct page i.e /wp-admin/network/admin.php?my… or older style I created a new variable with path based on a is_multisite() and is_network_admin() or if not then plain /wp-admin/admin.php which works ok
edit// So a simple network_admin_url() will return a path to current script/page with either network path for multisite or not and thus can be used for self referencing post submission- however I don’t appear to be able to pass any parameters via it? it doesn’t appear to take arguments?
I’ve not been able to implement this work-around in the plugin “Welcome Pack”. I’m still not so good on php.
But, if there are now some plugins that have been improved to work by their creators, can any of you, with more php skills than me, look and compare, for example this BP-Share-it, the old and the new version, to examinate the changes and how the creator has been able to repair it?
Not all plugins are going to be the same, however the fix for showing the settings or an admin page are pretty much straightforward- however as you appear to be talking about the ‘Welcome Pack’ plugin I would hold fire as @DJPaul has announced iirc on his plugin page for WelcomePack that he will be upgrading this weekend so you will have a working plugin again soon.
Great!! Thank you, hnla and of course Thankyou to @DJPaul, and I must say “Sorry for my words, Paul”.
I’m almost a noobie here and after reading a little I can say that your reputation is safe, no matter what you do with this plugin. My apologies and my respect.
Is this topic resolved or still an issue. Sorry, I could not follow up.
The problem is if a plugin is using register_setting and asks the options.php to save plugin data. It will be broken in the multisite. The problem is most authors leave the the plugin option menu registering code and setting register code in same function. so if you change the admin_menu to network_admin_menu, the settings will not be registered and you will have trouble.
Look for the code which registers setting and hook it to admin_menu, then change the form action from options.php to echo admin_url(“options.php”);//yes, I am writing it admin_url.
and then you can try saving the data. the data should be saved.
- The topic ‘BP plugins multisite menu fix?’ is closed to new replies.