• Resolved patloq

    (@patloq)


    Salut Imath

    First of all I want to thank you for this outstanding plugin. I love it! It works very well for me. I’ve only one small issue with the group setting:

    My WP/BP install: WP 3.5.2, BP 1.8.1, BuddyDrive 1.1, Multisite, BP running on the main site of the network, Theme: Twenty Twelve.

    The issue: Settings > BuddyDrive > Enable BuddyDrive for groups on group creation “checked” > Save changes => I get redirected to “Page not found” …/wp-admin/settings.php?page=buddydrive

    Do you have any idea what’s going on?

    Thank you,
    Patrick

    By the way: I’ve translated BuddyDrive into German. I’ll provide you the localisation upon your instructions.

    http://wordpress.org/plugins/buddydrive/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Contributor Mathieu Viet

    (@imath)

    Patrick,

    First thank you for your feedback 🙂

    Second, i’m amazed! Just made some tests on Multisite WP 3.6 / 3.5.2 with BP 1.8.1 and i have no 404 after submitting the settings form.

    And what you describe is very strange, as to build the form action, i’m using a BuddyPress function that automatically output the url for regular or multisite configs. So i want to understand why on your config you have this weird behavior !! The url you pasted is not good at all, because it looks like a regular blog admin url, and i don’t use this kind of url in these configs (i use options.php thanks to the settings API).

    The good url for the form action should be :
    site.url/wp-admin/network/settings.php?page=buddydrive

    So i’d like you to give me feed back about what is going wrong with the BuddyPress core function bp_get_admin_url()

    1/ let’s try some debugging, in /buddydrive/includes/admin/buddydrive-settings.php at line 430, try to add var_dump( bp_get_admin_url( 'settings.php' ) );
    Then go to the BuddyDrive settings and at the top of the page, you should have something like :
    string 'http://multi.bp17.dev/wp-admin/network/settings.php' (length=51)

    if nothing is displayed then, it’s very weird because it means is_multisite() is not working..

    2/ if you don’t have the network term in the url, then change line 430 to :
    var_dump( network_admin_url( 'settings.php' ) );
    You should have the same result than at point 1, if you don’t have the network term in the url it’s weird again but it should be logic as BuddyPress is using this function in bp_get_admin_url().

    3/ if after point 2 no network term in url, you can run a search in all your WordPress files
    of add_filter( 'network_admin_url' or add_filter('network_admin_url' and if you have a result, you have a guilt, if not : wow !

    Anyway, at the end you can fix the plugin by replacing the form action by the good url, but i’d rather find why it’s not working because, you’ll have this problem at each upgrade..

    Finally, thank you for your german translation, i’ve posted this topic to explain some things about translations management http://wordpress.org/support/topic/buddydrive-translations i would be happy you are the first contributor 😉

    Please let me know about your trouble once you’ve tested point 1 to 3.

    Thread Starter patloq

    (@patloq)

    Thank you Imath for this in-depth analysis. I did what you wanted me to do. The results:

    ad 1/ at the top of the page ‘string(39) “http://mysite.com/wp-admin/settings.php”‘ is showing => Then ‘Enable BuddyDrive for groups on group creation’ CHECKED => ‘Save Changes’ => 404: http://mysite.com/wp-admin/settings.php?page=buddydrive

    ad 2/ at the top of the page ‘string(47) “http://mysite.com/wp-admin/network/settings.php”‘ is showing => Then ‘Enable BuddyDrive for groups on group creation’ CHECKED => ‘Save Changes’ => 404: http://mysite.com/wp-admin/settings.php?page=buddydrive

    What I’ve forgotten to mention: I’m running a multi network install. The plugins I use for this are Network+ 0.2.3.1 and BP Multi Network 0.1.1.

    If you want, I can mail you login credentials.

    Plugin Contributor Mathieu Viet

    (@imath)

    Ok i better understand, thanks for your credentials proposition but, i know what’s going wrong. BuddyPress seems to be activated for the blog and not for the network of blogs. So to fix your trouble, i think you just have to replace line 431 of /buddydrive/includes/admin/buddydrive-settings.php by this one :
    $form_action = add_query_arg( 'page', 'buddydrive', network_admin_url( 'settings.php' ) );

    It should fix the issue, if so i’ll include this fix to my next upgrade so that you won’t have to modify it again.

    Thread Starter patloq

    (@patloq)

    Thank you, I’ve changed line 431 of the buddydrive-settings.php as advised. Now it almost works. After ‘Safe Changes’ => You do not have sufficient permissions to access this page. ; URL: http://mysite.com/wp-admin/network/settings.php?page=buddydrive

    Plugin Contributor Mathieu Viet

    (@imath)

    i see, stuck at the moment.

    Let’s avoid big mistakes from there. I need to test this configuration to reproduce and find the best way to make it work. I need some more time, but i’ll be back 😉

    Can you confirm BuddyPress is activated on the blog and not on the network ?

    Thread Starter patloq

    (@patloq)

    … sure. It’s not that urgent. After all good things come to those who can wait.
    And yes, BuddyPress is not network activited; only on the main blog (but BuddyDrive is network activited).
    Thank you very much for your support.

    Plugin Contributor Mathieu Viet

    (@imath)

    Ok i’ve reproduced with this configuration :

    WP 3.6 multisite BP 1.8.1 activated on the main blog (id #1) but not on network
    BuddyDrive can only be activated on network.

    I got the same errors you found, i quick & dirty solved it by deleting lines 428 to 432
    and deleting lines 448 to 450 in /buddydrive/includes/admin/buddydrive-settings.php.

    Then i was able to store the options, and at first sight, it seems to work. I really need to find a better way to handle this in next upgrade of the plugin. As i use is_mulitisite() at various places in the plugin, i also need to check if there’s no side impacts..

    You can try the dirty fix i’ve explained earlier, please give me feedback if you have some weird behavior. Let’s concentrate everything in this topic.

    Thread Starter patloq

    (@patloq)

    Thank you, the fix works. I’ll report any unusual behaviors.

    Hi @patloq,
    I am very interested in a german translation of buddydrive. I hope that you like to share your translation!?
    Thanks a lot.

    Thread Starter patloq

    (@patloq)

    hello @scheppler,
    yes, I’ll share the translation. I just need to polish it. Tomorrow I’ll upload it.

    Plugin Contributor Mathieu Viet

    (@imath)

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Group settings issue’ is closed to new replies.