If I want to edit a user profile with custom file/image field using multiple registration as admin, the browse widget isn't showing up after removing a file/image from this field. This way I cant upload a new file/image to change the user's image. The problem is that if this is a required field the user can't be saved.
Steps to reproduce:
- clean drupal 7.61 install
- install multiple registration module
- create 2 custom roles
- create 2 custom registration page
- add a file/image field to one of them, select one of the custom roles created and make it required
- register an account, enable it and assign the role and save it
- edit the user as admin, remove the file/image: at this point the file/image disappears but the browse widget not showing up to upload a new one
(If the user is editing his own profile it works as designed)

Comments

klevyke created an issue. See original summary.

klevyke’s picture

As a workaround I'm checking if there is an ajax call using the form_state variable (line 470 in multiple_registration.module):

if (!$form_state['rebuild']) {
  $element['#access'] = multiple_registration_is_field_accessible($instance);
} else {
  $element['#access'] = TRUE;
}

For me it works for now...

IreneV’s picture

Please check patch

ysamoylenko’s picture

Status: Active » Reviewed & tested by the community

Hello @IreneV,

The patch looks good for me.

Permissions issue is resolved after applying this patch.

Thank you!

  • ysamoylenko committed e5dd581 on 7.x-1.x authored by IreneV
    Issue #3021682 by IreneV, klevyke, ysamoylenko: File widget not showing...
ysamoylenko’s picture

Status: Reviewed & tested by the community » Fixed

@klevyke, Thank you for your report.

@IreneV your patch was committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.