Hi guys,

I'm facing some issues editing a node with a embedded element in the WYSIWYG.

Steps to reproduce it:

1. Create a node.
2. Embed a new twitter status i.e. https://twitter.com/ThePracticalDev/status/733908215021199360
3. Save the node.
4. Edit the node you just created.
5. Try to embed a new Twitter status below the old one.
6. The new status is not embedded in the WYSIWYG. It is not throwing any relevant error.

(The issue is random and sometimes you get a screen with the twitter word and that's it. No input fields to enter the status neither the media name)

I'm using the latest versions of all the modules media_entity entity_browser etc. )

Comments

mpastas created an issue. See original summary.

mpastas’s picture

The way the library is attached seems to be the problem

    if (!empty($element)) {
      $element['#attached'] = [
        'library' => [
          'media_entity_twitter/integration',
        ],
      ];
    }

Maybe it is related with this other issue: https://www.drupal.org/node/2544020#comment-11795670 "Error when submitting embed step in Chrome"

Additional, the external library is causing some errors as well:

twttr.widgets:
  remote: //platform.twitter.com/widgets.js
  license:
    name: UNKNOWN
    url: UNKNOWN
    gpl-compatible: FALSE
  js:
    //platform.twitter.com/widgets.js:
      type: external
      minified: true

(I'm using G Chrome.)

mpastas’s picture

Sometimes the JS File modules/contrib/entity_browser/js/entity_browser.iframe.js is not being loaded causing the error.

othermachines’s picture

othermachines’s picture

Removing issues I thought were related. Sorry about that!