Magento 2.3.1 not allowing javascript codeLocal installation of Magento 2 doest not generate files in the pub/static folderMagento 2 CSS and JavaScript not loading from correct folderOwl Carousel Magento 2 not Fully ResponsiveMagento 2 : Symbolic links to pub/static filesCustomising the Magento 2 main navigation (topmenu) javaScriptRelease Management in Magento 2How does Magento determine the route / getting 404 behind proxyMagento 2 CMS 404 errorMagento 2.3: How to solve the message “Unable to send email”?Column not found: 1054 Unknown column 'search_result.score' in 'order clause'
Generate basis elements of the Steenrod algebra
60s or 70s novel about Empire of Man making 1st contact with 1st discovered alien race
What is the meaning of the Russian idiom "to taste tuna" ("отведать тунца")?
Advantages of the Exponential Family: why should we study it and use it?
How to “listen” to existing circuit
Why not invest in precious metals?
Why can I traceroute to this IP address, but not ping?
What aircraft was used as Air Force One for the flight between Southampton and Shannon?
Live action TV show where High school Kids go into the virtual world and have to clear levels
Which is the better way to call a method that is only available to one class that implements an interface but not the other one?
Can I utilise a baking stone to make crepes?
Next date with distinct digits
I have a problematic assistant manager, but I can't fire him
How can I end combat quickly when the outcome is inevitable?
Smart-expansion of a range to a list of numbers
Is an entry level DSLR going to shoot nice portrait pictures?
If there's something that implicates the president why is there then a national security issue? (John Dowd)
Excel division by 0 error when trying to average results of formulas
Solve Riddle With Algebra
Why can my keyboard only digest 6 keypresses at a time?
How to make insert mode mapping count as multiple undos?
Should I refuse being named as co-author of a bad quality paper?
How to communicate to my GM that not being allowed to use stealth isn't fun for me?
Bb13b9 confusion
Magento 2.3.1 not allowing javascript code
Local installation of Magento 2 doest not generate files in the pub/static folderMagento 2 CSS and JavaScript not loading from correct folderOwl Carousel Magento 2 not Fully ResponsiveMagento 2 : Symbolic links to pub/static filesCustomising the Magento 2 main navigation (topmenu) javaScriptRelease Management in Magento 2How does Magento determine the route / getting 404 behind proxyMagento 2 CMS 404 errorMagento 2.3: How to solve the message “Unable to send email”?Column not found: 1054 Unknown column 'search_result.score' in 'order clause'
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I am setting up my store on latest Magento 2.3.1 CE edition.
Apache version: Apache/2.4.39
PHP version: 7.2.18
MySQL version: 10.1.40-MariaDB.
Also I am using Porto theme.
There is a strange problem I am facing for first time. In static block, if I use some JavaScript code like below or any other custom code
<script>document.write(new Date().getFullYear())</script>
and when I save it, I get error
404 error: Page not found.
If I remove JavaScript code, and put simple text in para html tag, it gets saved successfully. I have used previous versions of Magento 2 and porto theme earlier also but never got such an error. Using Magento 2.3.1 for first time.
Is there any setting in this version of Magento to explicitly allow usage of JavaScript in static blocks?
magento2 javascript 404-page http-error-404
add a comment |
I am setting up my store on latest Magento 2.3.1 CE edition.
Apache version: Apache/2.4.39
PHP version: 7.2.18
MySQL version: 10.1.40-MariaDB.
Also I am using Porto theme.
There is a strange problem I am facing for first time. In static block, if I use some JavaScript code like below or any other custom code
<script>document.write(new Date().getFullYear())</script>
and when I save it, I get error
404 error: Page not found.
If I remove JavaScript code, and put simple text in para html tag, it gets saved successfully. I have used previous versions of Magento 2 and porto theme earlier also but never got such an error. Using Magento 2.3.1 for first time.
Is there any setting in this version of Magento to explicitly allow usage of JavaScript in static blocks?
magento2 javascript 404-page http-error-404
have you tried using<script type="text/javascript">
opening script tag instead of plain script tag
– fmsthird
Jun 3 at 7:27
@magefms . Yes, I tried that too. But still get same 404 error. Updated my question with snapshots. Just FYI, I run following commands to deploy theme. php -d memory_limit=-1 bin/magento setup:upgrade ; php -d memory_limit=-1 -d display_errors=on bin/magento setup:static-content:deploy -s standard -vvv -f ; Do I also need to run compile command to deploy theme ?
– Devanshu
Jun 3 at 15:14
add a comment |
I am setting up my store on latest Magento 2.3.1 CE edition.
Apache version: Apache/2.4.39
PHP version: 7.2.18
MySQL version: 10.1.40-MariaDB.
Also I am using Porto theme.
There is a strange problem I am facing for first time. In static block, if I use some JavaScript code like below or any other custom code
<script>document.write(new Date().getFullYear())</script>
and when I save it, I get error
404 error: Page not found.
If I remove JavaScript code, and put simple text in para html tag, it gets saved successfully. I have used previous versions of Magento 2 and porto theme earlier also but never got such an error. Using Magento 2.3.1 for first time.
Is there any setting in this version of Magento to explicitly allow usage of JavaScript in static blocks?
magento2 javascript 404-page http-error-404
I am setting up my store on latest Magento 2.3.1 CE edition.
Apache version: Apache/2.4.39
PHP version: 7.2.18
MySQL version: 10.1.40-MariaDB.
Also I am using Porto theme.
There is a strange problem I am facing for first time. In static block, if I use some JavaScript code like below or any other custom code
<script>document.write(new Date().getFullYear())</script>
and when I save it, I get error
404 error: Page not found.
If I remove JavaScript code, and put simple text in para html tag, it gets saved successfully. I have used previous versions of Magento 2 and porto theme earlier also but never got such an error. Using Magento 2.3.1 for first time.
Is there any setting in this version of Magento to explicitly allow usage of JavaScript in static blocks?
magento2 javascript 404-page http-error-404
magento2 javascript 404-page http-error-404
edited Jun 3 at 15:13
Devanshu
asked Jun 2 at 15:22
DevanshuDevanshu
62
62
have you tried using<script type="text/javascript">
opening script tag instead of plain script tag
– fmsthird
Jun 3 at 7:27
@magefms . Yes, I tried that too. But still get same 404 error. Updated my question with snapshots. Just FYI, I run following commands to deploy theme. php -d memory_limit=-1 bin/magento setup:upgrade ; php -d memory_limit=-1 -d display_errors=on bin/magento setup:static-content:deploy -s standard -vvv -f ; Do I also need to run compile command to deploy theme ?
– Devanshu
Jun 3 at 15:14
add a comment |
have you tried using<script type="text/javascript">
opening script tag instead of plain script tag
– fmsthird
Jun 3 at 7:27
@magefms . Yes, I tried that too. But still get same 404 error. Updated my question with snapshots. Just FYI, I run following commands to deploy theme. php -d memory_limit=-1 bin/magento setup:upgrade ; php -d memory_limit=-1 -d display_errors=on bin/magento setup:static-content:deploy -s standard -vvv -f ; Do I also need to run compile command to deploy theme ?
– Devanshu
Jun 3 at 15:14
have you tried using
<script type="text/javascript">
opening script tag instead of plain script tag– fmsthird
Jun 3 at 7:27
have you tried using
<script type="text/javascript">
opening script tag instead of plain script tag– fmsthird
Jun 3 at 7:27
@magefms . Yes, I tried that too. But still get same 404 error. Updated my question with snapshots. Just FYI, I run following commands to deploy theme. php -d memory_limit=-1 bin/magento setup:upgrade ; php -d memory_limit=-1 -d display_errors=on bin/magento setup:static-content:deploy -s standard -vvv -f ; Do I also need to run compile command to deploy theme ?
– Devanshu
Jun 3 at 15:14
@magefms . Yes, I tried that too. But still get same 404 error. Updated my question with snapshots. Just FYI, I run following commands to deploy theme. php -d memory_limit=-1 bin/magento setup:upgrade ; php -d memory_limit=-1 -d display_errors=on bin/magento setup:static-content:deploy -s standard -vvv -f ; Do I also need to run compile command to deploy theme ?
– Devanshu
Jun 3 at 15:14
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f277003%2fmagento-2-3-1-not-allowing-javascript-code%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f277003%2fmagento-2-3-1-not-allowing-javascript-code%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
have you tried using
<script type="text/javascript">
opening script tag instead of plain script tag– fmsthird
Jun 3 at 7:27
@magefms . Yes, I tried that too. But still get same 404 error. Updated my question with snapshots. Just FYI, I run following commands to deploy theme. php -d memory_limit=-1 bin/magento setup:upgrade ; php -d memory_limit=-1 -d display_errors=on bin/magento setup:static-content:deploy -s standard -vvv -f ; Do I also need to run compile command to deploy theme ?
– Devanshu
Jun 3 at 15:14