Call to undefined method Magento\\Catalog\\Model\\Product\\Type\\Simple::getConfigurableAttributeCollection() in /vendor/magento/module-configurable-product/Helper/Product/Options/Loader.php

[Mon Jun 22 07:32:58.596677 2020] [proxy_fcgi:error] [pid 14233] [client 103.78.226.252:59399] AH01071: Got error ‘PHP message: PHP Fatal error: Uncaught Error: Call to undefined method Magento\\Catalog\\Model\\Product\\Type\\Simple::getConfigurableAttributeCollection() in vendor/magento/module-configurable-product/Helper/Product/Options/Loader.php:52\nStack trace:\n#0 vendor/magento/module-configurable-product/Model/Product/ReadHandler.php(48): Magento\\ConfigurableProduct\\Helper\\Product\\Options\\Loader->load(Object(Magento\\Catalog\\Model\\Product\\Interceptor))\n#1 vendor/magento/framework/EntityManager/Operation/Read/ReadExtensions.php(48): Magento\\ConfigurableProduct\\Model\\Product\\ReadHandler->execute(Object(Magento\\Catalog\\Model\\Product\\Interceptor), Array)\n#2 vendor/magento/framework/EntityManager/Operation/Read.php(112): Magento\\Framework\\EntityManager\\Operation\\Read\\ReadExtensions->execute(Object(Magento\\Catalog\\Model\\Product\\Interceptor), Array)\n#3 vendor/magento/framework/Entit…\n’, referer: https://equaltrue.devs/admina1b2c344/sales/order/index/key/67cc143b3f2b902ed95fdb73249ba12f45aca7cd5b223c6e2c728e2581d56130/   Change file : vendor/magento/module-configurable-product/Helper/Product/Options/Loader.php File Function  Load() $options = []; […]

Notice: Undefined offset: -158 in vendor/magento/framework/Search/Dynamic/Algorithm.php on line 301

Error Looks like a:4:{i:0;s:128:”Notice: Undefined offset: -158 in vendor/magento/framework/Search/Dynamic/Algorithm.php on line 301″;i:1;s:5257:”#0 vendor/magento/framework/Search/Dynamic/Algorithm.php(301): Magento\Framework\App\ErrorHandler->handler(8, ‘Undefined offse…’, ‘   Quick Solution : View this thread : https://github.com/magento/magento2/issues/11028 https://github.com/magento/magento2/issues/6625

Set a field as UNIQUE KEY in Magento 2 Setup Schema

Single Field : ->addIndex( $installer->getIdxName( ‘YOUR_TABLE_NAME’, [‘YOUR_UNIQUE_FIELD_NAME’], \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE ), [‘YOUR_UNIQUE_FIELD_NAME’], [‘type’ => \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE] )   You can also set by multiple option ->addIndex( $installer->getIdxName( ‘catalog_product_entity_datetime’, [‘entity_id’, ‘attribute_id’, ‘store_id’], \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE ), [‘entity_id’, ‘attribute_id’, ‘store_id’], [‘type’ => \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE] )  

PDOException::(“SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes”) in Laravel install

While installing Laravel found the following Error : SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter table `users` add unique `users_email_unique`(`email`)) Why this Happen : According to the Laravel Docs, this problem occurs if you’re using MariaDB or MySQL versions […]

Screenshots and screencasts in Ubuntu

Take a screenshot Keyboard shortcuts Prt Scrn to take a screenshot of the desktop. Alt+Prt Scrn to take a screenshot of a window. Shift+Prt Scrn to take a screenshot of an area you select. automatically saved in your Pictures folder If you do not have a Pictures folder, the images will be saved in your home folder […]

php bin/magento An exception was raised while creating “Request”; no instance returned Magento 2

Check PHP version first : php -v PHP 7.3.3-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Mar 7 2019 20:31:26) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.3.3, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.3.3-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies equaltrue@server:~/domains/demo.equaltrue.com/public_html/m2/wc/ms230$ Cause: in my case, my Magento 2 version […]

SQLSTATE[HY000] [1698] Access denied for user ‘root’@’localhost’. Tried everything

Method 1: $sudo mysql -u root [mysql] use mysql; [mysql] update user set plugin=” where User=’root’; [mysql] flush privileges; [mysql] \q   If Still not get Work Try this: /etc/init.d/mysql stop mysqld_safe –skip-grant-tables & mysql -u root mysql> use mysql; mysql> update user set password=PASSWORD(”YOUR_PASSWORD”) where user=’root’; mysql> flush privileges; […]