Set $form_state['has_file_element'] only when file element is accessible

Created on 16 May 2011, over 13 years ago
Updated 1 September 2024, 7 days ago

Patch makes sure the file element has #access = TRUE before setting form to accept files.

I have stumbled across this issue when using user-modal (currently in my sandbox) which adds the login/ register forms inside CTools modal.

The user_register_form() has:

  $form['picture'] = array(
    '#type' => 'fieldset',
    '#title' => t('Picture'),
    '#weight' => 1,
    '#access' => (!$register && variable_get('user_pictures', 0)),
  );

Without this patch, this will result with $form_state['has_file_element'] = TRUE;

🐛 Bug report
Status

Closed: outdated

Version

11.0 🔥

Component
Form 

Last updated 1 minute ago

Created by

🇮🇱Israel amitaibu Israel

Live updates comments and jobs are added and updated live.
  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇳🇱Netherlands Lendude Amsterdam

    We really need some steps to reproduce this if we are going to keep this open. Is this still relevant? If so, when?

  • Status changed to Closed: outdated 7 days ago
  • 🇳🇿New Zealand quietone New Zealand

    There have been two attempts here to get more information to know if this is still a problem or to provide steps to reproduce. None has been provided.

    Therefore, closing as outdated. If this is incorrect reopen the issue, by setting the status to 'Active', and add a comment explaining what still needs to be done.

    Thanks!

Production build 0.71.5 2024