Magento2: Iframe element fails in product WYSIWYG editor on Magento 2.2.9

Created on 1 Aug 2019  路  17Comments  路  Source: magento/magento2

Preconditions (*)

  1. Magento 2.2.9 & 2.3-develop
  2. The condition is to switch the tinyMCE from version 4 to version 3 in the backend config (General > Content Management)

Steps to reproduce (*)

  1. Go to Youtube, select a movie, and use the embed function
  2. Go to a product
  3. Add this line of code in the text area for content
  4. Switch to the editor

or

  1. Open a product that already has an iframe in the editor

Expected result (*)

  1. The iframe area shows up in the editor area.

Actual result (*)

  1. An javascript error is shown: "error: error in [unknown object].fireEvent(): event name: tinymceSetContent error message: data is undefined"
  2. The editor stops working, you can't edit anything.

Temporary fix

As a hotfix, I reverted the lib/web/tiny_mce folder to the 2.2.8 version. It seems that the JSON.parse for iframe objects isn't correctly implemented.

FrameworWysiwyg Confirmed P3 ready for dev Reproduced on 2.3.x S3

Most helpful comment

It seems like this commit is to blame: https://github.com/magento/magento2/commit/f2b87a63e846525b1addd00fa48198391d4a324a#diff-1ac9393c18718fce8d3b2eed7ce35bcb

All 17 comments

Hi @mdesplenter. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • [ ] Summary of the issue
  • [ ] Information on your environment
  • [ ] Steps to reproduce
  • [ ] Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.3-develop instance - upcoming 2.3.x release

For more details, please, review the Magento Contributor Assistant documentation.

@mdesplenter do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • [ ] yes
  • [ ] no

@magento give me 2.2.9 instance

Hi @mdesplenter. Thank you for your request.
Unfortunately, I can only deploy instances for 2.3 release line

@magento give me 2.3-develop instance

Hi @mdesplenter. Thank you for your request. I'm working on Magento 2.3-develop instance for you

Hi @mdesplenter, here is your Magento instance.
Admin access: https://i-23970-2-3-develop.instances.magento-community.engineering/admin
Login: admin Password: 123123q
Instance will be terminated in up to 3 hours.

I cannot reproduce this in 2.3.x , it's a different editor.
Testing on a local vanilla 2.2.9 instance gives the same error.

Hi @engcom-Charlie. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

  • [x] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.
  • [x] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • [x] 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • [x] 4. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!

  • [ ] 5. Add label Issue: Confirmed once verification is complete.

  • [ ] 6. Make sure that automatic system confirms that report has been added to the backlog.

Hello @mdesplenter

Thank you for contribution and collaboration!

We are not able to reproduce this issue on the lates 2.3-develop branch by provided steps.

We are closing this issue due to _branch 2.2-develop was closed and Magento no longer accepts pull requests and issues to the v2.2 release lines to focus all development efforts on v2.3._
See Accepted pull requests and ported code for more details

It seems like this commit is to blame: https://github.com/magento/magento2/commit/f2b87a63e846525b1addd00fa48198391d4a324a#diff-1ac9393c18718fce8d3b2eed7ce35bcb

I can verify the problem, and it works after a revert of the commit @pemann posted.

@svenakela can you verify the problem on Magento 2.3-develop?

Confirm bug on Magento v2.3.2.

The condition is to switch the tinyMCE from version 4 to version 3 in the backend config (General > Content Management)

@Detzler thank for contributing! Now i can confirm.

Hi @engcom-Charlie. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

  • [x] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.
  • [x] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • [x] 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • [x] 4. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!

  • [x] 5. Add label Issue: Confirmed once verification is complete.

  • [x] 6. Make sure that automatic system confirms that report has been added to the backlog.

:white_check_mark: Confirmed by @engcom-Charlie
Thank you for verifying the issue. Based on the provided information internal tickets MC-19219 were created

Issue Available: @engcom-Charlie, _You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself._

Do we know when an official fix will be released?

Was this page helpful?
0 / 5 - 0 ratings