Skip to content

Conversation

toddbc
Copy link
Contributor

@toddbc toddbc commented Oct 20, 2019

This is needed for editing to work while minification is enabled. Otherwise, it attempts to load bad URLs that won't exist.

Note: this must be after require.min.js.

STR:

  1. Enable js minification (ideally via config.php.)
  2. It's imperative that you enable production mode. This does not reproduce in developer mode, because obviously js minification is auto-disabled in developer mode.
  3. Go to the CMS pages section, and click "Add New Page".
  4. Expand the Content section. You'll already notice JS errors in the console, if you're looking.
  5. Drag a "Text" content type from the Elements section into the main area.
  6. Type any content, such as "Hello world".
  7. Click Save in the top right.

Actual behavior: does not save. Spinner spins forever.
Expected behavior: save completes.

See also Magento support 252229.

This change is needed on 2.3.2-p2 and appears to be needed on 2.3.3 as well.

Note: partner contribution from Something Digital.

@davemacaulay
Copy link
Contributor

davemacaulay commented Oct 21, 2019

Thanks for your contribution @toddbc! Page Builder isn't setup as well for contributions so I've had to manually run a build for you, you won't be able to view the build output sadly.

Internal Bug: https://jira.corp.magento.com/browse/PB-169
Build: https://m2build-ur.devops.magento.com/job/All-User-Requested-Tests/25537/

Everything looks great. However, you have failures in your static tests, if you could resolve these we can move ahead and get this merged.

Magento\Test\Php\LiveCodeTest::testCodeStyle PHP Code Sniffer detected 2 violation(s): FILE: ...ml/app/code/Magento/PageBuilder/Block/Adminhtml/Stage/Render.php ---------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------------------------------- 83 | ERROR | Comment block is missing ---------------------------------------------------------------------- FILE: .../Magento/PageBuilder/view/adminhtml/templates/stage/render.phtml ---------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ---------------------------------------------------------------------- 10 | WARNING | [x] Expected 1 space(s) after closing parenthesis; | | found 0 ---------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- Failed asserting that 2 matches expected 0. /var/www/html/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php:279 

I've added comments inline on the PR on where and how to resolve these issues.

This is needed for editing to work while minification is enabled. Otherwise, it attempts to load bad URLs that won't exist. Note: this must be after require.min.js.
@davemacaulay
Copy link
Contributor

Copy link
Contributor

@davemacaulay davemacaulay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build is green ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment