Magento 2.4.2 admin invoice does not render the CSS on certain invoices - the page shows up without any styling. (Some older invoices do still render properly as they should). So it seems that the code errors in certain circumstances.
To see the invoice: Magento admin > sales > invoice then click on VIEW ( Any of the invoice)
I don't see any Log Errors in this regard.
Browser Console Error says "uncaught reference error: require is not defined"
The "require is not defined" is after the first line: <script>require(['prototype'], function(){
The referenced code is:
<script>require(['prototype'], function(){
submitComment = function() {
submitAndReloadArea($('comments_block').parentNode, 'https\u003A\u002F\u002Fwww.EXAMPLEDOMAIN.com\u002Fcgscp2\u002Fsales\u002Forder_invoice\u002FaddComment\u002Fid\u002F4650\u002Fkey\u002F359a264374d55ffc26772041f6b5e9e90434d8b1da91d085acebb4ccaf28a36a\u002F')
};
if ($('submit_comment_button')) {
$('submit_comment_button').observe('click', submitComment);
}
});</script>
So since the page loads fine with some invoices and not others, I'm guessing the code is perhaps buggy with its [comment submission] script section. Not sure.
Any help will be greatly appreciated.
1 Answer 1
This patch will resolve that issue.
Follow the steps below: Install the latest quality patches package: ./composer require magento/quality-patches Apply the patch: ./vendor/bin/magento-patches apply MDVA-36021 Clean the cache: ./bin/magento cache:clean
-
This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. To get notified when this question gets new answers, you can follow this question. Once you have enough reputation, you can also add a bounty to draw more attention to this question. - From ReviewJarnail S– Jarnail S2021年12月08日 10:11:56 +00:00Commented Dec 8, 2021 at 10:11
Explore related questions
See similar questions with these tags.