magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.56k stars 9.32k forks source link

Custom Wysiwyg Style Formats Disappeared After Upgrade to 2.4.5-p1  #36950

Closed rodrigotripp closed 1 year ago

rodrigotripp commented 1 year ago

Preconditions and environment

Steps to reproduce

  1. Create a custom module
  2. Add custom style format according to the instructions for Extending the TinyMCE editor given in the Magento DevDocs
  3. Clear cache and load the Wyswig in the Pagebuilder
  4. Using "text" content type to see if the customized styles are listed.
  5. No custom styles will be found.

Expected result

Custom style format is present in the formats list

Actual result

Custom style format is ignored and only the default formats load

Headings from 1 to 6 are there, and bedfore the update, the formats were available to be used

Additional information

Magento was upgraded from 2.4.3-p2 to 2.4.5-p1.

Release note

No response

Triage and priority

m2-assistant[bot] commented 1 year ago

Hi @rodrigotripp. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

m2-assistant[bot] commented 1 year ago

Hi @engcom-Dash. 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:


m2-assistant[bot] commented 1 year ago

Hi @engcom-Lima. 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:

m2-assistant[bot] commented 1 year ago

Hi @engcom-Hotel. 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:

engcom-Hotel commented 1 year ago

Hello @rodrigotripp,

Thanks for the report and collaboration!

We have tried to reproduce the issue by upgrading Magento from 2.4.3-p2 to 2.4.5-p1 and it seems the issue is reproducible for us.

Please refer to the screenshot and video for the same:

Before Upgrading Dashboard-Magento-Admin-2 4 3-p2

Module_2 4 3-p2

After Upgrade Dashboard-Magento-Admin-2 4 5-p1

https://user-images.githubusercontent.com/51681618/224005047-a968ad57-b948-4d3f-8155-902e239f6a0a.mov

Hence confirming the issue.

Thanks

github-jira-sync-bot commented 1 year ago

:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-8154 is successfully created for this GitHub issue.

m2-assistant[bot] commented 1 year ago

:white_check_mark: Confirmed by @engcom-Hotel. Thank you for verifying the issue.
Issue Available: @engcom-Hotel, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

rodrigotripp commented 1 year ago

Is this gonna move forward?

glo35082 commented 1 year ago

Team has started working on the issue. Will post further update shortly

engcom-Bravo commented 1 year ago

Hi @rodrigotripp,

Verified the issue on Magento 2.4-develop instance and the issue is not reproducible. We are successfully able to override the settings by created custom plugin as per the given link and made the changes as per the requirement. Please find the code used below

We have created a custom module and follow the instructions for Extending the TinyMCE editor given in the Magento DevDocs. Please find the details below:

Created the di.xml i.e., app/code/Custom/HelloWorld/etc/di.xml


<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Custom\HelloWorld\Plugin\ExamplePlugin">
        <arguments>
            <argument name="additionalSettings" xsi:type="array">
                <item name="fixed_toolbar_container" xsi:type="string">.pagebuilder-content-type</item>
                <item name="fontsize_formats" xsi:type="string">75px 10px 12px 14px 19px 18px 20px 24px 26px </item>
                <item name="lineheight_formats" xsi:type="string">50px 10px 12px 14px 16px 18px 20px 24px 26px</item>
            </argument>
        </arguments>
    </type>
    <type name="Magento\PageBuilder\Model\Wysiwyg\DefaultConfigProvider">
        <plugin name="Custom_HelloWorld_Plugin" type="Custom\HelloWorld\Plugin\ExamplePlugin" disabled="false"  />
    </type>
</config>

Created plugin file i.e., app/code/Custom/HelloWorld/Plugin/ExamplePlugin.php

<?php

namespace Custom\HelloWorld\Plugin;

class ExamplePlugin {

    private $assetRepo;
    private $additionalSettings;

   public function __construct(
       \Magento\Framework\View\Asset\Repository $assetRepo,
      array $additionalSettings
   )

{      $this->assetRepo = $assetRepo;      $this->additionalSettings = $additionalSettings;    }

   public function afterGetConfig(\Magento\PageBuilder\Model\Wysiwyg\DefaultConfigProvider $subject, \Magento\Framework\DataObject $result)

{           $result->addData( [ 'settings' => $this->additionalSettings ] );             return $result;        }

{color:#0747a6}}

Please find attached screenshot for reference.

font_size line_height

Thanks.

m2-assistant[bot] commented 1 year ago

Hi @engcom-Bravo. 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:

engcom-Bravo commented 1 year ago

Hi @rodrigotripp,

We have noticed that this issue has not been updated since long time.
Hence we assume that this issue is fixed now, so we are closing it. Please feel to raise a fresh ticket or reopen this ticket if you need more assistance on this.

Thanks.

rodrigotripp commented 1 year ago

@engcom-Bravo Well, I mean you can see that it was reproducible by other user and later it was confirmed to be an issue, and now you decided to close it. What a dissapointment.

Mugentoki commented 1 year ago

Can confirm this is still an issue. It's only a problem with style_formats, hence why @engcom-Hotel was able to reproduce it. But @engcom-Bravo didn't test style_formats, only other formats.

This should be reopened!

cemag44300 commented 1 year ago

Hello all ! I open a new issue for style_formats on this link : https://github.com/magento/magento2/issues/37771