when you uploading image with the same name, like image in imce, it's path will be altered by path, specified in filefield paths
and this is the bug, because if for image uploaded into filefield it will works fine - path will be altered like "files/.." to "files/images/.." and file will be moved.
But in the case of textfield with WYSIWYG (+imce, ckfinder probably too) path will be changed from "files/imce/.." to "files/imce/images/.."

patch attached

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chingis’s picture

Category: task » bug
Deciphered’s picture

Status: Active » Needs work
+++ b/sites/all/modules/contrib/filefield_paths/filefield_paths.module
@@ -572,6 +572,12 @@ function _filefield_paths_text_fields($node) {
+            if (isset($node->{$name}[$key]['format']) && ¶
+                ($profile = wysiwyg_get_profile($node->{$name}[$key]['format'])) && ¶
+                isset($profile->settings['buttons']['imce'])) {

Formatting of this conditional statement doesn't comply with the Drupal coding standards, I'd recommend assigning the $profile value outside of the condition to keep it cleaner.

 

+++ b/sites/all/modules/contrib/filefield_paths/filefield_paths.module
@@ -572,6 +572,12 @@ function _filefield_paths_text_fields($node) {
+                ($profile = wysiwyg_get_profile($node->{$name}[$key]['format'])) && ¶

wysiwyg_get_profile() will cause critical error if Wysiwyg module is not present.

 

Chees,
Deciphered

Deciphered’s picture

Issue summary: View changes
Status: Needs work » Closed (won't fix)

No longer supporting Drupal 6 issues for this module.