Skip to:
Content
Pages
Categories
Search
Top
Bottom

BuddyPress redirects to frontpage on registration


  • terpz
    Participant

    @terpz

    Hi

    We have installed the newest version ( also tried the 2.6.0-beta1 )
    And set it up accordding to guide:
    – enable user registration
    – create empty pages and mapped buddypress to them

    When we vist /register we can see the form generated by buddypress, but when we click “Complete sign up” we get redirected to the front page.
    – No errors in the php error log

    We use a theme, but we also tried with a clean WP with only this plugin, and we have the same problem.

    Please advice.

Viewing 7 replies - 1 through 7 (of 7 total)

  • danbp
    Participant

    @danbp

    Have you properly set up permalinks ? Choose any option, except “default”, save and give a try.


    terpz
    Participant

    @terpz

    It is currently set to “Post name”


    terpz
    Participant

    @terpz

    Hi again

    i found the problem, but i do not have enough insight to buddypress to fix it.
    file: wp-content/plugins/buddypress/bp-members/bp-members-screens.php

                            if ( isset( $_POST['signup_profile_field_ids'] ) && !empty( $_POST['signup_profile_field_ids'] ) ) {
    
                                    // Let's compact any profile field info into an array.
                                    $profile_field_ids = explode( ',', $_POST['signup_profile_field_ids'] );
    
                                    // Loop through the posted fields formatting any datebox values then validate the field.
                                    foreach ( (array) $profile_field_ids as $field_id ) {
                                            if ( !isset( $_POST['field_' . $field_id] ) ) {
                                                    if ( !empty( $_POST['field_' . $field_id . '_day'] ) && !empty( $_POST['field_' . $field_id . '_month'] ) && !empty( $_POST['field_' . $field_id . '_year'] ) )
                                                            $_POST['field_' . $field_id] = date( 'Y-m-d H:i:s', strtotime( $_POST['field_' . $field_id . '_day'] . $_POST['field_' . $field_id . '_month'] . $_POST['field_' . $field_id . '_year'] ) );
                                            }
    
                                            // Create errors for required fields without values.
                                            if ( xprofile_check_is_required_field( $field_id ) && empty( $_POST[ 'field_' . $field_id ] ) && ! bp_current_user_can( 'bp_moderate' ) )
                                                    $bp->signup->errors['field_' . $field_id] = __( 'This is a required field', 'buddypress' );
                                    }
    
                                    // This situation doesn't naturally occur so bounce to website root.
                            }
                            # else {
                            #       bp_core_redirect( bp_get_root_domain() );
                            #}
    

    on my page, signup_profile_field_ids (hidden field) does not exist on my reqistry page, and therefore it redirects using signup_profile_field_ids

    commenting those 3 lines out, made it work for me.

    Is this a bug or am i missing some settings?


    terpz
    Participant

    @terpz

    meant ofcause that it redirects using bp_core_redirect


    danbp
    Participant

    @danbp

    Any thoughts @djpaul, @imath ?


    r-a-y
    Keymaster

    @r-a-y

    @terpz – I think your problem is similar to this thread:
    https://buddypress.org/support/topic/registration-and-edit-profile-issue/

    Try the recommendation listed here:
    https://buddypress.org/support/topic/registration-and-edit-profile-issue/#post-254078

    I’ve listed this bug report here:
    https://buddypress.trac.wordpress.org/ticket/7109


    terpz
    Participant

    @terpz

    Hi again

    I tried the drop table thing, but didt help.
    After the drop:

    MariaDB [ultrasdanmark]> select * from wp_bp_xprofile_groups;
    +----+------+-------------+-------------+------------+
    | id | name | description | group_order | can_delete |
    +----+------+-------------+-------------+------------+
    |  4 | Base |             |           0 |          0 |
    +----+------+-------------+-------------+------------+
    1 row in set (0.00 sec)
    
    MariaDB [ultrasdanmark]> update wp_bp_xprofile_groups set id = 1;
    Query OK, 1 row affected (0.04 sec)
    Rows matched: 1  Changed: 1  Warnings: 0
    
    

    after the updated it worked with the “edit profile”

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.
Skip to toolbar