Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use nowdoc instead of heredoc because $this is a valid PHP variable name
- Loading branch information
c8a5013
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seem i got regression issue with this change after enabled minify html (production). Admin got error message block owner access dashboard
Here is my env.config setup
'dev' => [
'static' => [
'sign' => '1'
],
'template' => [
'minify_html' => '1'
],
'js' => [
'enable_js_bundling' => '0',
'merge_files' => '0',
'minify_files' => '1',
'move_script_to_bottom' => '1'
],
'css' => [
'merge_css_files' => '0',
'minify_files' => '1',
'use_css_critical_path' => '1'
]
],
Here is the log
ParseError: syntax error, unexpected '<<' (T_SL) in /var/www/html/var/view_preprocessed/pub/static/app/code/Magento/Backend/view/adminhtml/templates/store/switcher.phtml:45
CC @fnogatz
c8a5013
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
magento2/app/code/Magento/Backend/view/adminhtml/templates/store/switcher.phtml
Line 145 in c8a5013
Comment like should change to avoid break in JS in minify
From
// Set the value & trigger event
To
/* Set the value & trigger event */
CC: @ihor-sviziev
c8a5013
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mrtuvn could you create a pull request for fixing that?
c8a5013
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my opinion i think this should need refactor to seperate js out. We pass data via php only in phtml to js file