How to override SimpleProductPrice Model the right way?

I want to override the function executeByDimensions for some reasons. Below is my implementation. <!– Vendorname/Modulename/etc/di.xml –> <?xml version=”1.0″?> <config xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”urn:magento:framework:ObjectManager/etc/config.xsd”> <preference for=”Magento\Catalog\Model\ResourceModel\Product\Indexer\Price\SimpleProductPrice” type=”Vendorname\Modulename\Model\ResourceModel\Product\Indexer\Price\SimpleProductPrice” /> </config> And, <?php namespace Vendorname\Modulename\Model\ResourceModel\Product\Indexer\Price; use Magento\Catalog\Model\Indexer\Product\Price\TableMaintainer; use Magento\Catalog\Model\ResourceModel\Product\Indexer\Price\BasePriceModifier; use Magento\Catalog\Model\ResourceModel\Product\Indexer\Price\IndexTableStructure as IndexTableStructureFactory; use Magento\Catalog\Model\ResourceModel\Product\Indexer\Price\Query\BaseFinalPrice; use Magento\Catalog\Model\ResourceModel\Product\Indexer\Price\SimpleProductPrice as CoreSimpleProductPrice; /** * Simple Product Type Price Indexer */ class SimpleProductPrice…

Magento 2 Custom UI grid form.php validate upload file extension

I want to check the upload file extension in form.php, I have three upload file options I want to check the upload file is pdf or not. Thanks in advance. my form.php file is namespace Vendor\Extension\Block\Adminhtml\Blog\Edit; use Magento\Backend\Block\Template\Context; use Magento\Framework\Registry; use Magento\Framework\Data\FormFactory; use Vendor\Extension\Block\Adminhtml\Status; class Form extends \Magento\Backend\Block\Widget\Form\Generic { protected $_systemStore; public function __construct( Context…

How to fix blog page issue in Magento 2?

1 exception(s): Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element ‘container’, attribute ‘role’: The attribute ‘role’ is not allowed. Line: 112 Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element ‘container’, attribute ‘role’: The attribute ‘role’ is not allowed. Line: 112 #1 Magento\Framework\Config\Dom->__construct() called at [vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:116] #2 Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject() called at [vendor/magento/framework/ObjectManager/Factory/Compiled.php:108] #3 Magento\Framework\ObjectManager\Factory\Compiled->create() called at [vendor/magento/framework/ObjectManager/ObjectManager.php:56] #4 Magento\Framework\ObjectManager\ObjectManager->create() called at [vendor/magento/framework/Config/DomFactory.php:43] #5 Magento\Framework\Config\DomFactory->createDom() called…