Skip to:
Content
Pages
Categories
Search
Top
Bottom

cannot update extended profile, BP + ProfileGrid


  • ixiter
    Participant

    @ixiter

    WordPress: 6.5.3
    Theme: BuddyX
    URL: /wp-admin/users.php?page=bp-profile-edit

    I cannot update the extended profile.
    Reason is the missing jQuery( '#'+formid+' .all_errors' ) element on the extended profile edit page.
    The page uses ProfileGrid JS to handle the form submit event

    file: /wp-content/plugins/profilegrid-user-profiles-groups-and-communities/admin/js/profile-magic-admin.js
    line 1689:

    var error = jQuery( '#'+formid+' .all_errors' ).html();
    if (error == '') {
        return true;
    } else {
       return false;
    }

    Since the jQuery( '#'+formid+' .all_errors' ) element is missing, error = undefined, which results in the else part and returns false. The form will never be submitted.

    I fixed it, adding following workaround code at line 1689:

    if (jQuery( '#'+formid+' .all_errors' ).length == 0) {
        jQuery( '#'+formid).prepend('<div class="all_errors" style="display:none;"></div>');
    }

    Better would be, to add the missing div in the pages markup. Your turn. 🙂

  • You must be logged in to reply to this topic.
Skip to toolbar