This will be relevant for an upgrade path from scald stable (7.x-1.3) to the next release.

When updating scald from 7.x-1.3 (stable) to dev 7.x-1.3+4-dev, editing settings inside Ckeditor of previously existing and inserted atoms is broken.
Newly added atoms work just fine.
To be clear: the atoms themselves are not broken, but editing their options inside Ckeditor is impossible.

When opening the node form, following error pops up:

An AJAX HTTP error occurred.
HTTP Result Code: 404
Debugging information follows.
Path: /atom/ajax-widget-expand/undefined?context=undefined&options=%257B%257D&align=undefined
StatusText: Not Found
ResponseText: 
Page not found

The atom itself is still visible, but opening the atoms settings dialog (yes, that works) shows, that the context dropdown is empty.
This only occurs with atoms added to content before updating scald.

My Ckeditor version might be interesting:
version:"4.4.7",revision:"3a35b3d"
The widget plugin is included.

Of course I didn't do that on a production site, it's a testing web.

Comments

indigoxela’s picture

Forgot to add an important information.
If not obvious:
When updating to scald dev I also switched from library plugin "ckeditor" to "dndck4".

nagy.balint’s picture

Title: Atom context in Ckeditor dialog is lost when ungrading to current dev » Atom context in Ckeditor dialog is lost when ungrading to the current dev's widget support

And what happens when you save the node? Does it fix all atoms in wysiwygs?
So it only happens the first time you open it after the upgrade?

indigoxela’s picture

And what happens when you save the node? Does it fix all atoms in wysiwygs?
So it only happens the first time you open it after the upgrade?

It is possible to save the node without problems, but next time it is opened, the same ajax error pops up.
The atom itself still renders fine.
But editing of settings is still impossible.
So saving the node doesn't fix the problem.

indigoxela’s picture

This might help:

I took a look on what actually got/gets saved to the database.
The structure of atoms in content changed.

Previously it was something like:
<div class="dnd-drop-wrapper">[scald=2:blabla_context {"link":"This option is currently available for Image Atoms only."}]</div>

Now it is done with data attributes:

  • data-scald-align
  • data-scald-context
  • data-scald-options
  • data-scald-sid
  • data-scald-type
gifad’s picture

If not obvious:

nothing is obvious here, until you read the full source code and/or the full issue queue...

you need two other (not obvious) settings :

  • Enable the "Embedded atoms" filter in your Input text format (Full html or whatever)
  • Set the drupal variable 'mee_store_format' to 'embed_div';

The last point can be made by various (not obvious) ways :

This has been summarized somewhere on drupal.org, but can't remember where...

[Edit] There is a 'CKEditor 4.3 Widget support' chapter in Scald Installation / configuration

jcisio’s picture

I thought there was a change notice (https://www.drupal.org/list-changes/scald) but it looks like we don't have it :(

indigoxela’s picture

Status: Active » Fixed

$conf['mee_store_format'] = 'embed_div';
Only this one was missing.
Works fine in settings.php
And makes the ajax errors go away.

Anyway: I hope there will be a way better handling of all this, when the next release is published.

nagy.balint’s picture

Id suggest commiting https://www.drupal.org/node/2393693 to have a UI for this at least.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

mrjigsaw’s picture

I have the same problem.
I have enabled "embedded atoms", set mee_store_format to embed_div, disabled ACF, enabled MEE, enabled "Scald Drag and Drop integration - CKEditor 4 widgets".
So I've done everything in the link you provided, @gifad apart from installing custom CKEditor (because I have to use Drupal 7).
And I still get this error: http://imgur.com/DvtN5it.
Any ideas what can I do?