Hello

I think the title says it all actually...

On the account settings page (admin), I got an error that the Pictures directory was not writable. I decided I didn't need that feature so I unchecked the "enable user pictures" checkbox. When I submitted the form, the same error is thrown, Drupal is still checking the folder. So I tried to clear the pictures directory textbox, with the same result...

It is also very confusing that the textbox with the red border is actually hidden if you uncheck the "enable user pictures" checkbox.

Comments

jvandooren’s picture

Meanwhile, I found out that my entire files directory was not writable anymore... doing that made the account settings form create the pictures directory... But I still think Drupal shouldn't check the folder if the checkbox is unchecked...

tayzlor’s picture

I'm attaching a patch that moves the logic for validating the pictures directory to a separate form validation function and only fires if the user actually checked for picture support to be enabled.

I've replaced the form_set_error in the actual form above, with a drupal_set_message to show an error, in case the user came to this page and somehow their pictures directory was no longer writeable.

We might want to remove this altogether and just let it be handled in the validation function?

tayzlor’s picture

Status: Active » Needs review
tayzlor’s picture

re-uploading, whitespace and typo in original patch.

Status: Needs review » Needs work

The last submitted patch, user-pictures-directory-check-1067964.patch, failed testing.

tayzlor’s picture

Version: 7.0 » 8.x-dev
tayzlor’s picture

Status: Needs work » Needs review
kscheirer’s picture

kscheirer’s picture

Retesting against latest HEAD since it has been over a year.

Status: Needs review » Needs work

The last submitted patch, user-pictures-directory-check-1067964.patch, failed testing.

marcingy’s picture

Version: 8.x-dev » 7.x-dev

User pictures are now just a field in d8.

Status: Needs work » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.