I already had SCALD up and running. Then I 'just' added multi-language support (i18n) and now trying to add files I realized that the modal window doesn't work anymore. It does open, it shows "loading" with a progress bar – but it's neither loading nor making any progress. It's just stuck. Any help / pointers would be appreciated very much.

CommentFileSizeAuthor
Screen Shot 2015-03-18 at 16.24.42.png22.37 KBtille
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nagy.balint’s picture

Hi!

Adding i18n to the site should not cause any issues. However maybe you have done some modification on the scald entity as well?

Apart from that, you can check your console log (most browser have that), for any javascript errors, and copying the error for us would be helpful.

You can also check your dblog, or server log, for any php errors.

tille’s picture

yep, the console does actually show these two messages:

#1 "Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help http://xhr.spec.whatwg.org/
...A.onload=A.onreadystatechange=null;r&&A.parentNode&&r.removeChild(A)}}}r.insertB..."
jquery.js?v=1.4.4 (line 139)

#2 "uncaught exception: The editor instance "edit-body-und-0-value" is already attached to the provided element."

( I guess I'll do a fresh install nevertheless :[ )

nagy.balint’s picture

Let me know if the issue persists after a fresh install.

If it does, you can provide more information on how to reproduce the issue.

nagy.balint’s picture

Status: Active » Postponed (maintainer needs more info)
tille’s picture

Finally I did a fresh install over the weekend – and I think I can narrow the problem down a bit. It seems to have nothing to do with i18n or any other module. Instead my suggestion is, that there is actually a conflict between SCALD and the latest CKEditor.

The current situation is like this:

  • (a) I first could get the scald button to show up in the editor. I added a page under that condition – and when I open it in edit mode there still is no scald button. So any image I drag'n'drop from the scald sidebar is recognized and get's its default style, but it seems that it's not recognized properly – the 'scald widget' is not active and a right click only offers the option to edit the image but not the scald item. But in this szenario the modal window does actually work which means it does load the upload dialogue and it lets me add more images to the scald image library.
  • (b) I then got the scald button to show up in the editor – on new pages only. When I drag'ndrop an image to the editor the scald widget is loading, I can edit the scald item with a right click and also cut and paste does works. The modal window however does not load when I try to add another image to the scald library.

During the installation and setup process I tried to stick to the prcedure as it is decribed here: https://www.drupal.org/node/1775718 –– but a couple of steps I just couldn't match with the recommended descrition:

  • I enabled the MEE module (ok)
  • I enabled the two new options in the field settings DnD and MEE (ok)
  • In the CKEditor setting, I enabled the "Scald DnD integration" plugin and moved the button into toolbar 'advanced'.(ok)
  • In the Text formats settings, I disabled the "Convert URLs into links" filter (ok)

So far everything went fine and dandy – and until this point the modal window still works fine. I guess the above steps are necessary to have the (working) scald support without widget support. So this is what makes my above case (a) working – without widget support.

I then downloaded the latest CKEditor build with widget plugin enabled and continued with "CKEditor 4.3 Widget support" from the install descrition page (https://www.drupal.org/node/1775718).

  • I downloaded (and uploaded into sites/all/libraries/) a custom build of the CKEditor javascript library, where the widget plugin is included (ok)
  • In the CKEditor profiles there was no "Scald Drag and Drop integration - CKEditor 4 widgets" plugin – so I had to stick to "Scald Drag and Drop integration" plugin enabled (X)
  • There was no Embedded atoms (mee_scald_widgets) filter visible to be added to the relevant input formats - after the 'filter html tags' filter (X)
  • I couldn't set any 'mee_store_format' variable to 'embed_div' instead of 'sas'. Also I couldn't do this manually or from the UI at admin/config/content/dnd - "Wysiwyg store format"

So the above steps failed – but still I have scald items in the 'widget mode' – and a 'broken' modal window as described earlier.

The custom CKEditor build I used is version 4.4.7 (http://ckeditor.com/builder) and I added the blugin "widget" and "common widgets". Maybe SCALD is only compatible with 4.2.x ? I hope this issue can be solved somehow because I would really love to use SCALD. It seems to be quite powerful – and I suppose it would be very handyand easy to use for the editors. Please let me know if I can provide any other details about this issue... Thank you very much!

ps: one more detail: the firefox console shows this error "uncaught exception: The editor instance "edit-body-und-0-value" is already attached to the provided element." only when widget/button is enabled and modal window is not loading.

nagy.balint’s picture

You need the dev version of scald to do the "CKEditor 4.3 Widget support", i will edit the document to be more clear about that.

tille’s picture

Thank you for your reply!

Now I can do the steps I earlier marked with (X) – but the SCALD sidebar does not show any more and I get the following error message:
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /www/htdocs/.../sites/all/modules/scald/modules/fields/mee/mee.module on line 787

what now? Thank you!

nagy.balint’s picture

Make sure that you have run the update.php, also that you have cleared the drupal cache, and the user cache.
Also that all the files got correctly updated, as generally that unexpected character should not happen.

tille’s picture

update.php didn't give me anything to update – and the caches are flushed. Also I dumped (renamed) the previous scald module folder and replaced it 100% with the dev version. Maybe now language support is interfering? I guess I'll try another fresh install... (argh)

nagy.balint’s picture

Hmm upon having a closer look, it is complaining about the line
"\DOMXPath"

We never had this issue before, but then maybe it could be an issue with php version?
Apparently that command brings in a requirement to have php 5.3.3 at least. So then the dev requires higher php now :(

tille’s picture

Thank you! I updated from PHP Version 5.2.12-nmm3 to PHP Version 5.3.18 and the error went away.

But now I'm again stuck with the previous situation: old nodes open the modal window correctly, but missing the scald button and the widget fundtionality. And new nodes have the widget fundtionality – but modal window is not loading.

Since I updated scald to dev version in both installs I now have the same situation in the fresh install and in the install with multi language support and other modules installed.

nagy.balint’s picture

@tille
Is the input format correct on the old nodes? Like if ckeditor profile is set up for full html, and maybe on the old nodes the input format is set to filtered html or something else?
Generally there should be no difference between old and new nodes if they all use the same input format.

About the php version issue i will post a new issue: #2457707: Php version 5.3 is now required in dev

nagy.balint’s picture

The module was tested extensively with ckeditor 4.4.6, not sure about 4.4.7 but since its a minor version, should not break anything.

nagy.balint’s picture

Tested with 4.4.7, no issues.

Likely those JS issues you are having causes the problem. Just have to find how to reproduce.

nagy.balint’s picture

Checked "Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/."
We can discard that for now, it does not cause any trouble for me.

So it must be the other JS error you have. Which does not happen for me.

nagy.balint’s picture

Cant reproduce on firefox or chrome.

Can you tell me which browser are you using?

tille’s picture

Checking on the filter format brings this:

  • (a) opening as 'filtered html' > modal window works
  • (b) switching to 'full html' > modal window still works
  • save
  • (c) opening as 'full html' > modal window does not work
  • (d) switching to 'filtered html' > modal window still doesn't work
  • save
  • (a) again opening as 'filtered html' > modal window works again

...while 'filtered html' did not have 'Embedded atoms' on and 'full html' did.

Trying to switch 'Embedded atoms' on/off didn't have any effect (cache flushed). Then unchecked the buttons "Scald SAS conversion" and "Scald DnD integration" in WYSIWYG-Profile for 'full html' since I was anyways a bit irritated that buttons are activated in two different prefs pages. The 'loop' is still the same as described above – only the images are not shown anymore when I view the node.

tille’s picture

I'm on Firefox 36.0.1 (Mac OS 10.7.5) (no noscript-plugin or thelike running)

nagy.balint’s picture

Okey just a note that the modal to add an image is in no direct relation to the wysiwyg or its configuration. Its two separate things.

What could cause an issue is, if you have a JS error, and maybe even JS aggregation, cause if you have a JS error in a script, that will block other JS code in that same script to execute.

So likely you have a JS error there related to your wysiwyg configuration, but it ruins other scripts, like the ctools modal implementation of the dnd library.

However the issue is i cant reproduce that JS error on firefox 36 on ubuntu.

We have to figure out what causes that JS error for you.

nagy.balint’s picture

The "Embedded atoms" in the text format is a must to have for the widget integration.

Also in the ckeditor config only the " Scald Drag and Drop integration - CKEditor 4 widgets" should be checked. (and for me the "Plugin for inserting Drupal teaser and page breaks." but thats a core thing)

tille’s picture

Yay! I think that was the right pointer!! As I mentioned in one of the above posts I was already a bit annoyed of declaring the buttons in CKEditor Profiles AND in WYSIWYG Profiles... Now I removed the editor from the 'full html' profile under admin/config/content/wysiwyg and the problem seems to be solved.

So I suppose the editor and/or the editor plugins were declared/loaded twice – which would also fit the error message I got earlier:
uncaught exception: The editor instance "edit-body-und-0-value" is already attached to the provided element.

So maybe it would be helpful to mention that when using the SCALD in the recommended way, one should deactivate any previously activated editor under WYSIWYG Profiles (admin/config/content/wysiwyg) since it's now active through the CKEditor Profiles (admin/config/content/ckeditor/edit/). Or am I now completely missing something?

tille’s picture

ps: that also explains why the modal did work in my 'filtered html' – there simply was no editor actuve for that WYSIWYG Profile... It just didn't work properly since I didn't have the "Embedded atoms" ect. active for the corresponding CKEditor profile… Hah!

Thank you very much for your kind and patient support!!

nagy.balint’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Ah glad its sorted :) And we have discovered a potential issue with php versions as well!

We usually only use the ckeditor, and the ckeditor module, and not using the wysiwyg module anymore.

tille’s picture

Yep, so glad it's sorted! I was just about to have either another fresh install OR drop the hole idea of using SCALD... But I really want to use it – it seems to make so much more sence than any other approach i tried so far..

Maybe the wysiwyg-issue could also be one point worth mentioning on the installation guide page – at least since you might run into this re-declaration trouble if you happen to have any profiles defined via wysiwyg..

smsivaprakaash’s picture

I too got the same error, In my case both ckeditor and wysiwig module was enabled. So it result in this error. I disabled ckeditor module, since i use wysiswig .Problem solved.
Thanks!

oschuetze’s picture

I've had the same error, but without using the WYSIWYG module (ckEditor as library + module). My solution was to install the jQuery Update module.