After installing this module on a clean Drupal installation and uploading a file for one of the account settings E-mails i get the following warnings.

Warning: is_dir(): Unable to find the wrapper "private" - did you forget to enable it when you configured PHP? in file_prepare_directory() (line 437 of /%Drupal root/includes/file.inc).
Warning: is_dir(): Unable to find the wrapper "private" - did you forget to enable it when you configured PHP? in file_prepare_directory() (line 437 of /%Drupal root/includes/file.inc).
Warning: is_writable(): Unable to find the wrapper "private" - did you forget to enable it when you configured PHP? in file_prepare_directory() (line 446 of /%Drupal root/includes/file.inc).
Notice: Undefined index: #field_name in file_managed_file_save_upload() (line 647 of /%Drupal root/modules/file/file.module).
The file could not be uploaded.

It seems the private file system is needed to upload files by default but you cannot depend on this. The documentation doesn't state that the private filesystem should be active.

I see one of the following solutions:

  • Use hook_requirements to inform users of the specific needs for this module
  • Only use private filesystem if configured, default to public
  • Make filesystem configurable in admin/config/system/account_settings_email_attachment

If you can tell me which approach you prefer i would be more than happy to come up with a patch.

Kind regards,
Eric Mulder

Comments

arijits.drush’s picture

Hi Eric,

I will fix it and push to code repo by a week.

Thanks
Arijit

arijits.drush’s picture

arijits.drush’s picture

arijits.drush’s picture

Status: Active » Needs review
arijits.drush’s picture

Status: Needs review » Closed (fixed)