1

I have installed the Tigren_Ajaxcompare extension. Got the error message below

Object DOMDocument should be created.

Block

<?php
/**
 * @copyright Copyright (c) 2017 www.tigren.com
 */

namespace Tigren\Ajaxcompare\Block;

use Magento\Framework\View\Element\Template\Context;
use Tigren\Ajaxcompare\Helper\Data;

class Js extends \Magento\Framework\View\Element\Template
{

    protected $_template = 'js/main.phtml';

    protected $_ajaxCompareHelper;

    public function __construct(
        Context $context,
        Data $ajaxCompareHelper,
        array $data = []
    )
    {
        $this->_ajaxCompareHelper = $ajaxCompareHelper;
        parent::__construct($context, $data);
    }

    public function getAjaxCompareInitOptions()
    {
        return $this->_ajaxCompareHelper->getAjaxCompareInitOptions();
    }
}
2

Looks like generation or var or pub folder is not writable. Verify that the following have writable permission by the web server:

  • var folder
  • pub/static folder
  • generated folder
  • app/etc folder

Another possible reason for this error is if your class folders don't have proper capitalization (i.e. are lowercase).

Please check system.log and exception.log for more clues.

Your Answer

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

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