Active
Project:
Wysiwyg ImageField
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Jan 2011 at 12:08 UTC
Updated:
28 Jul 2011 at 09:01 UTC
Jump to comment: Most recent file
Comments
Comment #1
decipheredHi euroba,
If you could possibly provide more information on how and when that error occurred I might be able to help out .
Cheers,
Deciphered.
Comment #2
funature commentedeverything is ok when i create a new node. but this error appears when i try to edit the node again. the popup windows is blank, without the upload form. the upload form shows up at the place where before this module was installed.
Comment #3
decipheredHmm, that's odd. I just followed your steps exactly and was unable to reproduce the issue.
Can you double check you have the very latest dev build (as there where a couple commits recently) and see if you are still able to reproduce the issue.
If so, can you also try reproducing the issue on a fresh site to confirm that it is still an issue with only the essential module enabled?
Cheers,
Deciphered.
Comment #4
milesw commentedThat looks like the kind of PHP notice you get when PHP error_reporting is set to E_STRICT. Could explain why OP sees notices but you can't reproduce.
Comment #5
RoboPhred commentedComment #6
webmindz commentedHello,
recently I've installed and configured this module too and the result is the same error as above described (only the lines are different). But, maybe this helps in solving.
The error message tells that the error occured in this file:
\sites\all\modules\wysiwyg_imagefield\wysiwyg_imagefield.module
But the module is installed in
\sites\all\modules\wysiwyg\wysiwyg_imagefield.module
Unfortunately I am not so experienced in php and module coding, but I thought it might be worth to mention.
Regards,
nachtraaf
Comment #7
filburt commentedSame problem here - thanks for support.
Filburt
Comment #8
wim verheyen commentedIn my case this problem has something to do with the language-settings.
When I use a content type with “multilingual support” = “enabled” in the “publishing options” this module acts strange.
On the “node/edit”-page you can choose for one of the (in the admin section) enabled languages or for “language neutral”. Choosing for the “language neutral” option makes the module work perfect.
Changing the option to “English” and “save” results in following errors:
-messages:
• Notice: Undefined index: und in wysiwyg_imagefield_after_build() (line 96 of C:\XAMPP\htdocs\drupal\sites\all\modules\wysiwyg_imagefield\wysiwyg_imagefield.module).
• Notice: Undefined index: #suffix in wysiwyg_imagefield_after_build() (line 97 of C:\XAMPP\htdocs\drupal\sites\all\modules\wysiwyg_imagefield\wysiwyg_imagefield.module).
• Notice: Undefined index: #title in wysiwyg_imagefield_after_build() (line 105 of C:\XAMPP\htdocs\drupal\sites\all\modules\wysiwyg_imagefield\wysiwyg_imagefield.module).
-in “node/view” state images aren’t displayed anymore, although they still are visible in the wysiwyg editor.
-in “node/edit” state the imagefield placed itself at the bottom of the page, no images are loaded anymore. It is however possible to upload and insert new images. Normally the imagefield should be hidden and works as a popup.
-when you click the imagefield button on the wysiwig editor an empty popup appears.
Going back to “language neutral” and save” resets the normal working of the module but the already inserted images still do display in the editor but won’t appear in the page.
Disabling the “Multilanguage support” in the “content type” solves for me the problem at the moment but this is of course only avoiding the bug.
I tried this on firfox3.6.15 and on Internet Explorer8 with the same result. GoogleChrome9 acts rather in the same way but the “browse-button” issue (node/879786) blocks the rest.
I’m new to Drupal and not a programmer so I can’t support for solutions.
Comment #9
jens peter commentedI have the same problem but with different line numbers...
I have tried to change language but it didn't seem to make any difference.
I only get the error when I enter the edit page. The error is reproduced everytime I add a new picture and if I add 3 in a row, the error will be on the edit page 3 times too.
But if I save the page and reenter the edit area the extras are gone.
I know the last one is an error about the ZEN theme - but I didn't had any errors before I updated ZEN earlier.
Anyone idea would be very welcome.
Comment #10
jens peter commentedI have the ZEN error solved now. I still have this issue of the wysiwyg_imagefield error. Can any one help?
Comment #11
jonhattanFor the notices, the related lines are:
guess what?
Comment #12
osopolarNice module btw, but it is not ready for production sites. So I still have to go the IMCE way.
Anyway, I created a patch when I was testing this module. I am not sure if it is the right way to fix it. I haven't enough knowledge about the Field Language API in drupal 7. Please test carefully.
For more information see: http://api.drupal.org/api/drupal/modules--field--field.multilingual.inc/....
Comment #13
decipheredThanks for the patch, looks good in general, will try to make some time to test it.
All real development is being done on the Wysiwyg Fields module, which I am desperately trying to get finished so I can start using it myself, but I haven't yet got a D7 port usable yet.
Comment #14
murzosopolar, thanks for patch - I test it, it works good! Will be good to see it in head.
Comment #15
jmones commentedpatch in #12 worked for me, thank you osopolar
Comment #16
supfred commentedThe problem comes from IE18n module.
here is my patch in wisiwyg_imagefield.module.php :
Change at line 95 :
//[FT-20110713]
//Récupération de la variable d'internationalisation
$lang = (empty($form_element['language']['#default_value'])) ? LANGUAGE_NONE : $form_element['language']['#default_value'];
// Modify file handler element.
$element[$imagefield][$lang]['#prefix'] = "
$element[$imagefield][$lang]['#suffix'] = "{$element[$imagefield][$lang]['#suffix']}
";
// $element[$imagefield][LANGUAGE_NONE]['#prefix'] = "
// $element[$imagefield][LANGUAGE_NONE]['#suffix'] = "{$element[$imagefield][LANGUAGE_NONE]['#suffix']}
";
// [/FT-20110713]
// Add Javascript.
drupal_add_library('system', 'ui.dialog');
drupal_add_js(
array(
'WysiwygImageField' => array(
'field' => $imagefield,
'title' => $element[$imagefield][$lang]['#title']
// 'title' => $element[$imagefield][LANGUAGE_NONE]['#title']
)
),
array(
'type' => 'setting',
'scope' => JS_DEFAULT,
)
);
Comment #17
W.M. commentedThe patch at reply #12 works perfectly.
What I love about this small module is that it attaches the desired img style in HTML (as class="name"), a thing that Insert alone was not doing.
I think supplying predefined image classes to choose from would be great add-on for this module: especially for positioning in page (right, left, middle, floating etc..)/
@ Deciphered: Thanks very much :)
Comment #18
shenzhuxi commentedI got the same problem.
Comment #19
rolfmeijer commented#12 Did the trick for me too.
Thank you very much, open source power, this is :-).