Cleanup settings not saved.

orico - July 24, 2009 - 09:15
Project:FileField Paths
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

This is a systematic bug that I confirmed on a minimum stock install :
drupal 5.17 stock
cck-5.x-1.x-dev of 2009-mar-17
filefield-5;x-2.x-dev of 2009-mar-13
imagefield-5.x-2.6
mimedetect-5.x-1.x-dev of 2009-may-10
token-5.x-1.13
filefieldpath-5.x-1-dev of 2009-jul-10

pathauto, lowercase and transliterate cleanup settings not saved.

Can be fixed at
filefield_paths.module
@~line 223

replacing
foreach ($fields as $name => &$field) {
$field['settings'] = array(
'value' => isset($form_values['ffp_'. $field_name][$name])
? $form_values['ffp_'. $field_name][$name]
: $form_values['ffp_'. $field_name]['image_path'],
'tolower' => $form_values['ffp_'. $field_name][$name .'_tolower'],
'pathauto' => $form_values['ffp_'. $field_name][$name .'_pathauto'],
'transliterate' => $form_values['ffp_'. $field_name][$name .'_transliterate']
);
by
foreach ($fields as $name => &$field) {
$field['settings'] = array(
'value' => isset($form_values['ffp_'. $field_name][$name])
? $form_values['ffp_'. $field_name][$name]
: $form_values['ffp_'. $field_name]['image_path'],
'tolower' => $form_values['ffp_'. $field_name][$name .'_cleanup'][$name .'_tolower'],
'pathauto' => $form_values['ffp_'. $field_name][$name .'_cleanup'][$name .'_pathauto'],
'transliterate' => $form_values['ffp_'. $field_name][$name .'_cleanup'][$name .'_transliterate']
);

Fixed the problem for me. Sorry no patch file right now.

#1

luketsimmons - July 24, 2009 - 14:41

Wow how lucky is that! I was about to look at the module file to fix and spotted this post from today!

All the work done for me, thanks :-)

Can confirm this fix works.

Thanks,

Luke

#2

Deciphered - July 26, 2009 - 22:25
Status:needs review» active

Issue confirmed, looks like I overlooked that section of code when I did the merge.

Fix will be committed shortly.

Cheers,
Deciphered.

#3

Deciphered - July 27, 2009 - 01:59
Status:active» fixed

Committed to DRUPAL-5 - http://drupal.org/cvs?commit=243164.

Dev build should be available shortly.

Cheers,
Deciphered.

#4

Deciphered - August 2, 2009 - 22:23
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.