By 1st-angel on
I just upgraded to 4.7 and I am very happy with it.
everything works fine exept one thing.
I used image_import a lot and it worked good with 4.6
After the upgrade i could not go to settings/image_import so i downloaded the latest image_import.module from CVS and it looked OK. But when I finally come to settings/image_import and open the page everything I see ist "Array".
This is the hook_settings function from image_import:
function image_import_settings() {
// First, check the status of the directory path and report any problems
_image_import_check_settings(FALSE, 'image_import_default_import_path');
$form = array();
$form['file_path'] = array(
'#type' => 'fieldset',
'#title' => t('File path settings'),
'#description' => t('These settings control the path on the server from which image and caption files will be imported. You can put the string <code>%u</code> or <code>%U</code> in the path fields, and these strings will be replaced by the username of the person doing the import. %U and %u are the same except that %U automatically removes space, %, <, >, *, /, \, and ? from the username.'),
'#tree' => FALSE,
'#collapsible' => TRUE,
'#collapsed' => FALSE,
);
$form['file_path']['image_import_default_import_path'] = array(
'#type' => 'textfield',
'#title' => t('Default import path'),
'#description' => t('<p>Subdirectory beneath the Drupal directory from which images may be imported in bulk. Drupal must have read/write access to this directory and subdirectories beneath it. This path must be <strong>different</strong> from the %imgsettings, which on this site is currently set to "%imgpath"</strong>.<p>Users with the "override image import path" permission can manually override this setting.', array('%imgsettings'=>l(t('image default path'), 'admin/settings/image'), '%imgpath'=>_image_import_get_image_path())),
'#default_value' => variable_get('image_import_default_import_path','image_import/%U'),
'#maxlength' => 50,
'#size' => 30,
'#required' => TRUE,
);
$form['file_path']['image_import_default_upload_path'] = array(
'#type' => 'textfield',
'#title' => t('Default import path'),
'#description' => t('<p>This should be set to the default import path (see above), but as viewed by a typical user during an FTP or similar upload. This may be either an absolute path or a path relative to the user\'s system home directory.<p>If you specify this setting, the interactive help for this module will use it in the text explaining how to upload files, customizing the help text as needed for each individual. The setting is not used for anything except generating help text.'),
'#default_value' => variable_get('image_import_default_upload_path',''),
'#maxlength' => 50,
'#size' => 30,
);
$form['file_path']['image_import_system_nou'] = array(
'#type' => 'checkbox',
'#title' => t('Ignore %u and %U for system user'),
'#description' => t('<p>If checked, the special administrative user (the first account created when the site was set up) will not be affected by <code>%u</code> or <code>%U</code> in the import path setting. Note that the system user can <i>always</i> override the path if they wish, because that special account has all available privileges.'),
'#return_value' => '1',
'#default_value' => variable_get('image_import_system_nou', '0'),
);
$form['image_import_force_delete'] = array(
'#type' => 'checkbox',
'#title' => t('Force deletion of upload files'),
'#description' => t('<p>If checked, this option forces image_import to delete any files from the upload directory that have been successfully imported. This is strongly recommended, because if they are not deleted, the next import from the same server directory may re-import these files and create duplicate image nodes. If this option is disabled, users will be offered a choice of whether to keep or delete the files.'),
'#return_value' => '1',
'#default_value' => variable_get('image_import_force_delete', '1'),
);
$form['advanced'] = array(
'#type' => 'fieldset',
'#title' => t('Advanced settings'),
'#description' => t('These settings can normally be left at the default values'),
'#tree' => FALSE,
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['advanced']['image_import_debug'] = array(
'#type' => 'checkbox',
'#title' => t('Debug Mode'),
'#description' => t('<p>Turn this option on to enable verbose error checking and detailed messages. May be confusing to novice users, but extremely useful if you are having problems with importing images.'),
'#return_value' => '1',
'#default_value' => variable_get('image_import_debug', '0'),
);
$form['advanced']['image_import_adjust_order'] = array(
'#type' => 'checkbox',
'#title' => t('Adjust timestamp order of images'),
'#description' => t('By default, imported images are marked as created at the actual time they are imported. Since images are imported in filename order, this may cause some albums or galleries to appear in reverse order. Checking this option causes the import to apply a reversed-order timestamp to correct this, though that means the displayed creation timewill differ by a few seconds from the actual creation time. This setting establishes a default for this option, but users can override that default for each import, if they prefer.'),
'#return_value' => '1',
'#default_value' => variable_get('image_import_adjust_order', '0'),
);
$form['advanced']['image_import_timeout'] = array(
'#type' => 'select',
'#title' => t('Time limit per run (seconds)'),
'#description' => t('If you are having problems with the import script timing out on large directories, and you are not able to modify the web server or PHP parameters to fix the problem, you can enable this option to set a limit on how long image import will process images during a single run. If the time limit is reached, the user can simply re-run the same job again to do the next group of images, repeating until the entire directory has been imported. <strong>This option is ignored unless you and/or the user enable deletion of images after import, because otherwise you would import the same files over and over.</strong> It is recommended to set this option to slightly <em>less than</em> the PHP <code>max_execution_time</code> limit. On this site, <code>max_execution_time</code>=%met seconds currently. The PHP <code>max_execution_time</code> setting is usually changed in php.ini or httpd.conf (server-wide) or (if allowed) the .htaccess file for this site.', array('%met'=>ini_get('max_execution_time'))),
'#options' => drupal_map_assoc(array(15, 20, 30, 45, 60, 90, 120, 180, 240, 300)),
'#default_value' => variable_get('image_import_timeout', '0'),
);
$form['text1'] = array(
'#type' => 'fieldset',
'#title' => t('Security settings'),
'#description' => t('<p>You will need to define appropriate %roles that have %permission to upload files, then establish an appropriate list of permitted %extensions for each of these roles.', array('%roles'=>l(t('security roles'),'admin/access/roles'), '%permission'=>l(t('permission'),'admin/access'), '%extensions'=>l(t('file extensions'),'admin/settings/upload'))),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
);
return $form;
}
Help would be cool.
Thanks
Angel
p.s. sory for my bad english but i am not a native english speaker (German)
Comments
Confirming this and opening related issue
I confirm the bug above running beta5. I have opened an issue at this address: http://drupal.org/node/52756
Please note this is not the proper place to file bug reports.
Have a nice time with Drupal!
Issue fixed
Please check http://drupal.org/node/52756#comment-79175 for a fix to this problem.
To learn about patches and how to apply them look at http://drupal.org/diffandpatch
For this particular issue you just need to remove these lines close to line 355 in the module :
Take care!
One more bug notice
Once you fix this bug, you will need to wait for a fix to this one http://drupal.org/node/52763 that arises as soon as you visit node/add/image_import