Hi, can I ask you to assist with setup. Did everything within setup instructions, button apeared on WYSIWYG + TinyMCE 3.3.8 with jQuery support, but no action occuring on button click.
Additionally I use jQuery update for 1.3.2 and jQuery UI with 1.7.x Anything else should be enabled? Content type is setup according to instructions.
Thank you in advance.

Comments

Deciphered’s picture

Hi j2b,

Are there any javascript errors being reported?

Cheers,
Deciphered?

KarenS’s picture

See #878658: Displaying view of files is broken in jQuery 1.7, I think this is a jQuery 1.7 issue. I had different problems in 1.7, either no editor appears (hence no button to click) or if there is no view of files it works fine. I did have a time when I couldn't click on the button, but I can't replicate that problem now after narrowing down the other problems.

j2b’s picture

#1: No, there are no JS errors in console. Only when I move mouse over the image button in WYSIWYG browser, the taskbar states "javascript:;". Have not seen such thing on other links, which work.

#2: Thank you for a link, in nearest hours I'll try these solutions and report back on this issue.

Does ImageField snippet/Fieldset (in my case) should be visible in node edit form? Or I have to remove it, to do all file upload via this modal window module? Currently my thoughts are, that this could be connected with jq_update module. Will check it and report back.

j2b’s picture

Unfortunately testing with jQ update and jQ UI modules with dev versions and pure downloaded from jQuery site didn't help to solve problem. The result is the same. My suspicions currently are connectedt with other modules, which use JS and somehow wrongly interact with this module. But unfortunately I do not have time for this project to digg deeper. What I would do, is post back future results, when will be digging specifically this module.

Any way, thans for your replies.

jide’s picture

Component: User interface » Code
Category: support » bug

I think this is not related to jQuery or jQuery UI. In fact, this can happen if your theme does not wrap form element inside a div with a "[ELEMENT-ID]-wrapper" class (this can happen with themes implementing theme_form_element()).

A possible solution would be, instead of doing :

$('#' + Drupal.wysiwyg.activeId + '-wrapper')...

Get the immediate parent of the textfield element :

$('#' + Drupal.wysiwyg.activeId).parent()...

Or maybe try to find the .form-item parent :

$('#' + Drupal.wysiwyg.activeId).parents('.form-item').eq(0)...

None of these solution is ideal, since we cannot be sure that the form element is actually wrapped in a surrounding div.
The best option would be to use the textfield as a starting point and prepend the dialog before it.

Deciphered’s picture

Hi jide,

Thanks for looking into this issue, now that you've come across the issue it should be reasonably simple to fix it.
Can you tell me what theme you where using that was causing an issue?

Cheers,
Deciphered.

jide’s picture

Hi Deciphered,

I used a custom theme created for a client, but any theme implementing theme_form_element() and not adding the wrapper class will be affected.

Deciphered’s picture

Hi jide,

Sure, I was hoping there would be an easily accessible theme so I could quickly confirm the issue instead of digging through all themes to find one that caused an issue, but can't be helped (unless you know of any contrib themes that don't add the wrapper class).

 

@j2b,

Can you confirm this is your issue, or tell me what theme you are using?

Cheers,
Deciphered.

j2b’s picture

Will check it tomorrow morning in first place. In my case I use "tuned" garland theme - mostly was working with CSS files, not HTML code. But I'll definetely check it out.

j2b’s picture

For now I can confirm, that there is a problem with IDs on page. No form wrappers, and even no #wysiwyg_imagefield-wrapper, which is used to execute button and stated in file plugins/wysiwyg_imagefield/wysiwyg_imagefield.js. As far as I noticed, no JS can be executed, as there is no div in HTML. No errors still shown in console. And I noticed other inconsistencies on node edit forms (input filters not expandable and switchable, imagefield uploads show list of files, which was not noticed before, fieldsets do not function) which come in place after enabling wysiwig_imagefield module. Still need to go deeper in this issue, and will come back.