2

I'm throwing this error on my /success/ page and it seems like such a generic error. It looks like further down the trace it's pointing to stuff like GoogleTagManager and other third-party modules associated with checkout but I've disabled nearly everything and it still fires this exception on checkout.

1 exception(s):
Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'argument': The type definition is abstract.
Line: 1024

Internal error: xmlSchemaXPathProcessHistory, The state object to be removed is not the first in the list.
Line: 1022


Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'argument': The type definition is abstract.
Line: 1024

Internal error: xmlSchemaXPathProcessHistory, The state object to be removed is not the first in the list.
Line: 1022

#0 /chroot/home/m2.staging/html/vendor/magento/framework/Config/Dom.php(115): Magento\Framework\Config\Dom->_initDom('<layout xmlns:x...')
#1 /chroot/home/m2.staging/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(111): Magento\Framework\Config\Dom->__construct('<layout xmlns:x...', Object(Magento\Framework\App\Arguments\ValidationState), Array, NULL, '/chroot/home/zt...', '%message%\nLine:...')
#2 /chroot/home/m2.staging/html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(66): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\\Framewo...', Array)
#3 /chroot/home/m2.staging/html/vendor/magento/framework/ObjectManager/ObjectManager.php(56): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo...', Array)
#4 /chroot/home/m2.staging/html/vendor/magento/framework/Config/DomFactory.php(42): Magento\Framework\ObjectManager\ObjectManager->create('Magento\\Framewo...', Array)

Now if I edit this file here like so:

protected function _initDom($xml) line 382 of vendor/magento/framework/Config/Dom.php

+// Note: Ignore validations. Yes the errors/warnings should be fixed but I don't know where to fix them and just want to get things done, can fix up "Later... TM".
+$skipDomValidation = true;
+if ($skipDomValidation === false) {
    if ($this->validationState->isValidationRequired() && $this->schema) {
        $errors = $this->validateDomDocument($dom, $this->schema, $this->errorFormat);
        if (count($errors)) {
            throw new \Magento\Framework\Config\Dom\ValidationException(implode("\n", $errors));
        }
    }
+}

Which is not good practices but it subdues the original error message and now throws this error message.

1 exception(s):
Exception #0 (InvalidArgumentException): Value for key "xsi:type" is missing in the argument data.

/chroot/home/m2.staging/html/vendor/magento/framework/View/Layout/Reader/Block.php(370): Magento\Framework\Data\Argument\Interpreter\Composite->evaluate(Array)
#1 /chroot/home/m2.staging/html/vendor/magento/framework/View/Layout/Reader/Block.php(169): Magento\Framework\View\Layout\Reader\Block->evaluateArguments(Object(Magento\Framework\View\Layout\Element), Array)

Such a generic error message. Any help would be greatly appreciated. Thank you.

magento 2.2.5

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.