Class Vendor\Module\Model\Interceptor does not exist exception error Magento 2.

Sometimes you face an exception error after installing the module via composer or by some other ways, you will able to see an exception error on the website or while running the setup upgrade or cache flush command.

Exception.log Error:

{“exception”:”[object] (ReflectionException(code: -1): Class Vendor\Module\Model\ResourceModel\Banner\Interceptor does not exist.

Continue reading “Class Vendor\Module\Model\Interceptor does not exist exception error Magento 2.”

Typed property must not be accessed before initialization Exception PHP Magento.

From PHP 7.4 Onwards, PHP introduced type hinting for all the properties. Based on the Type Hinting you need to assign proper value to match with that type.

Like, private int $size = 10;Here 10 is the default value for the $size variable.

Exception on Browser,

Typed property DataProvider::$loadedData must not be accessed before initialization, Exception in DataProvider.php class.

Continue reading “Typed property must not be accessed before initialization Exception PHP Magento.”

Get Product URL Rewrites data by GraphQL Magento 2.

Using GraphQL Magento, We can retrieve the product URL rewrites data in the response. If the specific product has multiple URL rewrite histories, The response will be multiple arrays with all the possible URL rewrite for a product.

You can create a query by SKU or Search by product name for GraphQL, Continue reading “Get Product URL Rewrites data by GraphQL Magento 2.”