0

I am updating an e-commerce with Magento, from version 2.1.18 to version 2.3.4 (I have verified that it also happens by updating to version 2.2.11).

Everything went well, but when I add a product to the cart I get the javascript error

Uncaught TypeError: Cannot read property 'after' of null
    at Object.insert (arrays.js:122)
    at collection.js:94
    at Array.map (<anonymous>)
    at UiClass.insertChild (collection.js:91)
    at layout.js:433
    at Registry._resolveRequest (registry.js:418)
    at Array.forEach (<anonymous>)
    at Registry._updateRequests (registry.js:400)
    at later (underscore.js:821)

cart screenshot with js arrays.js error

Same mistake if I go to checkout.

I am verifying that the subtotals of the order are not loaded, I do not know if it is the consequence of the error or the cause of the error.

  • I have disabled and deleted all the installed modules;
  • I have disabled all unnecessary modules of Magento 2.3.4;
  • I have deleted my theme and I am using the Luma theme;
  • I deleted cache, indexes and static files and created everything again,

but the problem is always there.

1
  • Please go to the network tab and check the response ... Commented Mar 12, 2020 at 6:14

2 Answers 2

0

Please try to run the command:

php bin/magento setup:static-content:deploy

please comment if it works!

1
  • on Magento 2.3 you need to force the creation of static content on command line php bin/magento setup:static-content:deploy -f I had already said that it is one of the tests that I did, but that did not result in the problem Commented Mar 12, 2020 at 8:53
0

I had the same problem, and I finally found out how to fix it.

The problem is that the "Instant Purchase" is enabled. So you need to go to:

Stores -> Configuration -> Sales -> Sales -> Instant Purchase -> Enabled (set this to NO)

And that's it. I had been looking on how to fix this for 4 days without any luck. So I decided to go through all the Magento options.

I hope this might be useful for other people :)

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.