1

i have a problem since we have updated our Magento from 2.3.5 to 2.4.0.

Here is the problem: We will open the invoice view in backend. So we go to: ->Sales->orders->select an order (my order: DE001014408) ->go to Invoices->view

The page loads everything without layout: view without layout

But if i view another invoice of another order, everything is working fine. In Example order DE001014405. Here is how it should looks like: Works as expected

As i can see in inspektor-mode, there is an error:

Uncaught ReferenceError: require is not defined -anonymous- https://-domain-/b4ckend/sales/order_invoice/view/invoice_id/21960/key/688e4aa0e262928d72e73f12a23c94bda39d68a1564ed3fadb0b3f96ee77b15c/:297

After that i checked the logs. The logs says:

main.CRITICAL: Cannot gather stats! Warning!stat(): stat failed for /home/dev/domains/-domain-/public_html/pub/static/frontend/-theme-/-theme-child-/en_US/mage/requirejs/mixins.js {"exception":"[object] (Magento\Framework\Exception\FileSystemException(code: 0): Cannot gather stats! Warning!stat(): stat failed for /home/dev/domains/-domain-/public_html/pub/static/frontend/-theme-/-theme-child-/en_US/mage/requirejs/mixins.js at /home/dev/domains/-domain-/public_html/vendor/magento/framework/Filesystem/Driver/File.php:77)"}

I also searched the forum and tried some solutions:

  1. Checked .htaccess
  2. checked file permissions
  3. run content deploy and also set developer mode to deploy automatically
  4. deleted .htaccess in pub/media
  5. cleared and flushed cache

Nothing seems to be working. I think that it is not a permission or htaccess problem because some invoices can be viewed without issues.

It is a known Magento bug which will be fixed in a coming update like 2.4.1 or later?

Does someone has the same issue and were able to fix it? Any ideas how to fix it?

I am happy for any ideas!

Thanks for helping.

1
  • If i should provide more Information just let met know
    – Beendeluxe
    Commented Mar 10, 2021 at 14:28

5 Answers 5

1

The issue has been fixed, but the commit has not been merged yet.

You can see the changes you need to make here: https://github.com/magento/magento2/pull/30515/commits/40df5c84d1a91c1a0892a70de1b27edb087c2fd5

Further, I discovered the darnest thing today... some magento errors will only appear in view-source in the browser. Right click on view source on your wrongly rendered invoice page and scroll to the bottom to see the actual error:

enter image description here

2
  • Thanks for your feedback. It seems to be the right fix for the issue. I will try it out
    – Beendeluxe
    Commented May 31, 2021 at 7:42
  • Tested today. That changes fixed the issue, thanks!
    – Beendeluxe
    Commented Jun 4, 2021 at 12:59
0

Update:

I have now upgraded to 2.4.1... however the issue is still there. Any ideas how to fix it?

I have now noticed that the error comes to old orders. New orders are working as expected.

Hopeful that anyone has an idea how to fix this issue.

Thanks for your help.

0

This issue seems to be fixed in 2.4.2

https://devdocs.magento.com/guides/v2.4/release-notes/open-source-2-4-2.html

"Magento no longer displays unrendered HTML on invoice and shipment overview pages. GitHub-29958"

Have a great day!

2
  • NOTE: 2.4.2 requires php 7.4 Commented Apr 27, 2021 at 17:56
  • Hey Manpreet, thanks for your feedback. I just tried to upgrade to 2.4.2 and the magento instance is working, but the bug is not fixed. I have now installed a new clean magento instance and only transfered all order tables to the blank database. After that i run the installation. Its completly clean without any modules except our Theme. Bug is gone... However i think there must me a problem with one extension or a broken entry in database. However, i need to figure out which DB tables i need for transfering all neccessary Data. Do you know? (Customers, orders, products, sources...)
    – Beendeluxe
    Commented May 5, 2021 at 6:41
0

I have temporary fixed this issue by changing tax settings in backend.

For everyone who has this issue and still not used the patch / hotfix, please follow this steps:

go to your store configuration: Store->Configuration->sales->tax

find shopping cart display settings change "display zero tax subtotal" to NO.

find order, invoices, credit memos display settings change "display zero tax subtotal" to NO.

Clear cache and everything should work as expected.

Alternatively you can delete this settings from database directly. Go into your Database. Select "core-config-data" table. Find entry: tax/sales_display/zero_tax and tax/cart_display/zero_tax. Delete/drop both lines or change the value from "1" to "0".

Clear cache.

You can also try Konstantin´s solution. Thanks Konstantin for your feedback. I still not tried this fix so i cannot verify that the issue will be solved. But it seems to be the right fix for it.

Thanks everyone!

0

This was fixed by ENGCOM-9169 commit https://github.com/magento/magento2/commit/ef2691a680f8300f0ffc226a7c8b7bb16453a41b

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.