installation problems (imagefield import module)
Phillip Mc - May 16, 2008 - 19:02
| Project: | Imagefield Import |
| Version: | 5.x-1.4 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Hi,
great idea for a module, thanks for contributing this.
I just tried installing it and got the following error message:
Cannot redeclare _image_filename() (previously declared in /sites/all/modules/image/image.module:994) in /sites/all/modules/imagefield_import/imagefield_import.module on line 400
Tried uninstalling the image.module, but, the import_imagefield.module is dependent on the image.module
just thought I'd flag this in case you accidentally comitted the wrong module file.

#1
D'oh! just realised the module requires the image add-on module for cck.module not the image.module.
Closing this.
#2
It's still an issue because an existing site may have image and imagefield installed. Attempting rename of fn... Simply renaming the colliding function seems to solve the conflict.
Anyone know a reason not to :S?
#3
yeah i am not even sure how you disable image module when this error is site-wide and prevents you from loading the modules page.
#4
i renamed the fn too and now everything works.
#5
The function is renamed in the latest releases for both 5.x and 6.x
#6
Automatically closed -- issue fixed for two weeks with no activity.
#7
I had the same problem when installing v 1.4. The fn hasn't been renamed in this version.
#8
ditto #7, ver 1.4 still has:
" function _image_filename($filename, $label = IMAGE_ORIGINAL, $temp = FALSE) { "
and:
" if (!file_copy($filepath, _image_filename($filepath, IMAGE_ORIGINAL, TRUE))) { "
in addition, shouldn't:
" $path = variable_get('image_default_path', 'images') .'/'; "
be instead :
" $path = variable_get('imagefield_default_path', 'images') .'/'; "