#StackBounty: #magento2.3 #setup-di-compile #class-not-found Compile issue: Class AreProductsSalableInterface does not exist

Bounty: 50

Having issue in setup:di:compile and give below issue

enter image description here

Already checked: Magento 2 Setup di Compile Problem

Magento Vesion: 2.3.1

Update:

If i try with command bin/magento setup:di:compile -vvv, it gives below error

[root@server httpdocs]# bin/magento setup:di:compile -vvv
Compilation was started.
Area configuration aggregation... 5/7 [====================>-------]  71% 44 secs 287.0 MiB

In ClassReader.php line 35:

  [ReflectionException]
  Class MagentoInventorySalesApiApiAreProductsSalableInterface does not exist


Exception trace:
 () at /SITE_PATH/httpdocs/vendor/magento/framework/Code/Reader/ClassReader.php:35
 MagentoFrameworkCodeReaderClassReader->getConstructor() at /SITE_PATH/httpdocs/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassReaderDecorator.php:35
 MagentoSetupModuleDiCodeReaderClassReaderDecorator->getConstructor() at /SITE_PATH/httpdocs/setup/src/Magento/Setup/Module/Di/Code/Reader/Decorator/Area.php:53
 MagentoSetupModuleDiCodeReaderDecoratorArea->getList() at /SITE_PATH/httpdocs/setup/src/Magento/Setup/Module/Di/App/Task/Operation/Area.php:112
 MagentoSetupModuleDiAppTaskOperationArea->getDefinitionsCollection() at /SITE_PATH/httpdocs/setup/src/Magento/Setup/Module/Di/App/Task/Operation/Area.php:87
 MagentoSetupModuleDiAppTaskOperationArea->doOperation() at /SITE_PATH/httpdocs/setup/src/Magento/Setup/Module/Di/App/Task/Manager.php:56
 MagentoSetupModuleDiAppTaskManager->process() at /SITE_PATH/httpdocs/setup/src/Magento/Setup/Console/Command/DiCompileCommand.php:206
 MagentoSetupConsoleCommandDiCompileCommand->execute() at /SITE_PATH/httpdocs/vendor/symfony/console/Command/Command.php:255
 SymfonyComponentConsoleCommandCommand->run() at /SITE_PATH/httpdocs/vendor/symfony/console/Application.php:893
 SymfonyComponentConsoleApplication->doRunCommand() at /SITE_PATH/httpdocs/vendor/symfony/console/Application.php:262
 SymfonyComponentConsoleApplication->doRun() at /SITE_PATH/httpdocs/vendor/magento/framework/Console/Cli.php:102
 MagentoFrameworkConsoleCli->doRun() at /SITE_PATH/httpdocs/vendor/symfony/console/Application.php:145
 SymfonyComponentConsoleApplication->run() at /SITE_PATH/httpdocs/bin/magento:23

In ClassReader.php line 29:
  
[ReflectionException]
  Class MagentoInventorySalesApiApiAreProductsSalableInterface does not exist


Exception trace:
 () at /SITE_PATH/httpdocs/vendor/magento/framework/Code/Reader/ClassReader.php:29
 ReflectionParameter->getClass() at /SITE_PATH/httpdocs/vendor/magento/framework/Code/Reader/ClassReader.php:29
 MagentoFrameworkCodeReaderClassReader->getConstructor() at /SITE_PATH/httpdocs/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassReaderDecorator.php:35
 MagentoSetupModuleDiCodeReaderClassReaderDecorator->getConstructor() at /SITE_PATH/httpdocs/setup/src/Magento/Setup/Module/Di/Code/Reader/Decorator/Area.php:53
 MagentoSetupModuleDiCodeReaderDecoratorArea->getList() at /SITE_PATH/httpdocs/setup/src/Magento/Setup/Module/Di/App/Task/Operation/Area.php:112
 MagentoSetupModuleDiAppTaskOperationArea->getDefinitionsCollection() at /SITE_PATH/httpdocs/setup/src/Magento/Setup/Module/Di/App/Task/Operation/Area.php:87
 MagentoSetupModuleDiAppTaskOperationArea->doOperation() at /SITE_PATH/httpdocs/setup/src/Magento/Setup/Module/Di/App/Task/Manager.php:56
 MagentoSetupModuleDiAppTaskManager->process() at /SITE_PATH/httpdocs/setup/src/Magento/Setup/Console/Command/DiCompileCommand.php:206
 MagentoSetupConsoleCommandDiCompileCommand->execute() at /SITE_PATH/httpdocs/vendor/symfony/console/Command/Command.php:255
 SymfonyComponentConsoleCommandCommand->run() at /SITE_PATH/httpdocs/vendor/symfony/console/Application.php:893
 SymfonyComponentConsoleApplication->doRunCommand() at /SITE_PATH/httpdocs/vendor/symfony/console/Application.php:262
 SymfonyComponentConsoleApplication->doRun() at /SITE_PATH/httpdocs/vendor/magento/framework/Console/Cli.php:102
 MagentoFrameworkConsoleCli->doRun() at /SITE_PATH/httpdocs/vendor/symfony/console/Application.php:145
 SymfonyComponentConsoleApplication->run() at /SITE_PATH/httpdocs/bin/magento:23

setup:di:compile


Get this bounty!!!

#StackBounty: #magento2.3 #setup-di-compile #class-not-found Class AreProductsSalableInterface does not exist

Bounty: 50

Having issue in setup:di:compile and give below issue

enter image description here

Already checked: Magento 2 Setup di Compile Problem

Magento Vesion: 2.3.1

Update:

If i try with command bin/magento setup:di:compile -vvv, it gives below error

[root@server httpdocs]# bin/magento setup:di:compile -vvv
Compilation was started.
Area configuration aggregation... 5/7 [====================>-------]  71% 44 secs 287.0 MiB

In ClassReader.php line 35:

  [ReflectionException]
  Class MagentoInventorySalesApiApiAreProductsSalableInterface does not exist


Exception trace:
 () at /SITE_PATH/httpdocs/vendor/magento/framework/Code/Reader/ClassReader.php:35
 MagentoFrameworkCodeReaderClassReader->getConstructor() at /SITE_PATH/httpdocs/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassReaderDecorator.php:35
 MagentoSetupModuleDiCodeReaderClassReaderDecorator->getConstructor() at /SITE_PATH/httpdocs/setup/src/Magento/Setup/Module/Di/Code/Reader/Decorator/Area.php:53
 MagentoSetupModuleDiCodeReaderDecoratorArea->getList() at /SITE_PATH/httpdocs/setup/src/Magento/Setup/Module/Di/App/Task/Operation/Area.php:112
 MagentoSetupModuleDiAppTaskOperationArea->getDefinitionsCollection() at /SITE_PATH/httpdocs/setup/src/Magento/Setup/Module/Di/App/Task/Operation/Area.php:87
 MagentoSetupModuleDiAppTaskOperationArea->doOperation() at /SITE_PATH/httpdocs/setup/src/Magento/Setup/Module/Di/App/Task/Manager.php:56
 MagentoSetupModuleDiAppTaskManager->process() at /SITE_PATH/httpdocs/setup/src/Magento/Setup/Console/Command/DiCompileCommand.php:206
 MagentoSetupConsoleCommandDiCompileCommand->execute() at /SITE_PATH/httpdocs/vendor/symfony/console/Command/Command.php:255
 SymfonyComponentConsoleCommandCommand->run() at /SITE_PATH/httpdocs/vendor/symfony/console/Application.php:893
 SymfonyComponentConsoleApplication->doRunCommand() at /SITE_PATH/httpdocs/vendor/symfony/console/Application.php:262
 SymfonyComponentConsoleApplication->doRun() at /SITE_PATH/httpdocs/vendor/magento/framework/Console/Cli.php:102
 MagentoFrameworkConsoleCli->doRun() at /SITE_PATH/httpdocs/vendor/symfony/console/Application.php:145
 SymfonyComponentConsoleApplication->run() at /SITE_PATH/httpdocs/bin/magento:23

In ClassReader.php line 29:
  
[ReflectionException]
  Class MagentoInventorySalesApiApiAreProductsSalableInterface does not exist


Exception trace:
 () at /SITE_PATH/httpdocs/vendor/magento/framework/Code/Reader/ClassReader.php:29
 ReflectionParameter->getClass() at /SITE_PATH/httpdocs/vendor/magento/framework/Code/Reader/ClassReader.php:29
 MagentoFrameworkCodeReaderClassReader->getConstructor() at /SITE_PATH/httpdocs/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassReaderDecorator.php:35
 MagentoSetupModuleDiCodeReaderClassReaderDecorator->getConstructor() at /SITE_PATH/httpdocs/setup/src/Magento/Setup/Module/Di/Code/Reader/Decorator/Area.php:53
 MagentoSetupModuleDiCodeReaderDecoratorArea->getList() at /SITE_PATH/httpdocs/setup/src/Magento/Setup/Module/Di/App/Task/Operation/Area.php:112
 MagentoSetupModuleDiAppTaskOperationArea->getDefinitionsCollection() at /SITE_PATH/httpdocs/setup/src/Magento/Setup/Module/Di/App/Task/Operation/Area.php:87
 MagentoSetupModuleDiAppTaskOperationArea->doOperation() at /SITE_PATH/httpdocs/setup/src/Magento/Setup/Module/Di/App/Task/Manager.php:56
 MagentoSetupModuleDiAppTaskManager->process() at /SITE_PATH/httpdocs/setup/src/Magento/Setup/Console/Command/DiCompileCommand.php:206
 MagentoSetupConsoleCommandDiCompileCommand->execute() at /SITE_PATH/httpdocs/vendor/symfony/console/Command/Command.php:255
 SymfonyComponentConsoleCommandCommand->run() at /SITE_PATH/httpdocs/vendor/symfony/console/Application.php:893
 SymfonyComponentConsoleApplication->doRunCommand() at /SITE_PATH/httpdocs/vendor/symfony/console/Application.php:262
 SymfonyComponentConsoleApplication->doRun() at /SITE_PATH/httpdocs/vendor/magento/framework/Console/Cli.php:102
 MagentoFrameworkConsoleCli->doRun() at /SITE_PATH/httpdocs/vendor/symfony/console/Application.php:145
 SymfonyComponentConsoleApplication->run() at /SITE_PATH/httpdocs/bin/magento:23

setup:di:compile


Get this bounty!!!

#StackBounty: #magento2.3 Type Error occurred when creating object Magento 2

Bounty: 50

I have created custom module and it’s working fine in Dev, but it’s not working on Production. It’s throwing Type error.

Type Error occurred when creating object:
TinyProductCustomizationModelResourceModelProductCollectionInterceptor,
Argument 5 passed to
TinyProductCustomizationModelResourceModelProductCollectionInterceptor::__construct()
must implement interface MagentoFrameworkDBAdapterAdapterInterface
or be null, string given, called in
/var/www/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php
on line 121 [] [] [2021-01-11 10:11:47] report.CRITICAL: Type Error
occurred when creating object:
TinyProductCustomizationModelResourceModelProductCollectionInterceptor
[] []

My collection file as below

<?php

namespace TinyProductCustomizationModelResourceModelProduct;

use MagentoFrameworkModelResourceModelDbCollectionAbstractCollection;

class Collection extends AbstractCollection
{

    protected $_idFieldName = 'id';

    protected function _construct()
    {
        $this->_init(
            'TinyProductCustomizationModelProduct',
            'TinyProductCustomizationModelResourceModelProduct'
        );
        parent::_construct();
    }

}

and di.xml

<type name="MagentoFrameworkViewElementUiComponentDataProviderCollectionFactory">
        <arguments>
            <argument name="collections" xsi:type="array">
                <item name="tiny_grid_data_source" xsi:type="string">TinyProductCustomizationModelResourceModelProductCollection</item>
            </argument>
        </arguments>
    </type>
    <virtualType name="TinyProductCustomizationModelResourceModelProductCollection" type="MagentoFrameworkViewElementUiComponentDataProviderSearchResult">
        <arguments>
            <argument name="mainTable" xsi:type="string">tiny_pro</argument>
            <argument name="resourceModel" xsi:type="string">TinyProductCustomizationModelResourceModelProduct</argument>
        </arguments>
    </virtualType>

Can you please help me on this?


Get this bounty!!!

#StackBounty: #magento2 #magento2.3 #import #sorting #product-sorting Column 'created_at' not imported

Bounty: 50

My goal is to sort products on the frontend from newest to oldest.

The products CSV file contains the created_at column (e.g. 2020-10-31 14:05:44). Format seems to be correct.

After the standard import, I’m looking in the catalog_product_entity table, and created_at is actually the import’s timestamp (e.g. 2020-11-28 17:38:48).

Am I looking at the wrong DB field? Is there some locale-specific formatting under the hood? (I’m importing for the ro store)

References

Versions: Magento 2.3.5-p1, PHP 7.3.24


Get this bounty!!!

#StackBounty: #magento2 #magento2.3 #import #sorting #product-sorting Column 'created_at' not imported

Bounty: 50

My goal is to sort products on the frontend from newest to oldest.

The products CSV file contains the created_at column (e.g. 2020-10-31 14:05:44). Format seems to be correct.

After the standard import, I’m looking in the catalog_product_entity table, and created_at is actually the import’s timestamp (e.g. 2020-11-28 17:38:48).

Am I looking at the wrong DB field? Is there some locale-specific formatting under the hood? (I’m importing for the ro store)

References

Versions: Magento 2.3.5-p1, PHP 7.3.24


Get this bounty!!!

#StackBounty: #magento2.3 #custom-attributes Magento 2: How to upload multiple images to Customer from Admin

Bounty: 50

Wanting to upload multiple images to a customer account via the admin. Below I’ve created a custom customer attribute that allows a single image / file upload, but how can I make this a multiple file upload?

InstallData.php

<?php

namespace MyCompanyMyModuleSetup;

use MagentoEavSetupEavSetupFactory;
use MagentoCustomerSetupCustomerSetupFactory;
use MagentoFrameworkSetupInstallDataInterface;
use MagentoFrameworkSetupModuleContextInterface;
use MagentoFrameworkSetupModuleDataSetupInterface;

class InstallData implements InstallDataInterface
{
  private $eavSetupFactory;
  private $customerSetupFactory;

  public function __construct(
    EavSetupFactory $eavSetupFactory,
    CustomerSetupFactory $customerSetupFactory
    )
    {
      $this->eavSetupFactory = $eavSetupFactory;
      $this->customerSetupFactory = $customerSetupFactory;
    }

    public function install(
      ModuleDataSetupInterface $setup,
      ModuleContextInterface $context
    ) {
      $setup->startSetup();

      $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
      $customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);

      $attributeCode = 'customer_logos';

      $customerSetup->addAttribute(
        MagentoCustomerModelCustomer::ENTITY,
        $attributeCode,
        [
          'type' => 'varchar',
          'input' => 'file',
          'label' => 'Customer Logos',
          'source' => '',
          'required' => false,
          'visible' => true,
          'position' => 200,
          'system' => false,
          'backend' => ''
        ]
      );

      // used this attribute in the following forms
      $attribute = $customerSetup->getEavConfig()
      ->getAttribute(MagentoCustomerModelCustomer::ENTITY, $attributeCode)
      ->addData(
        ['used_in_forms' => [
          'adminhtml_customer'
        ]
      ]);

      $attribute->save();
      $setup->endSetup();
    }
  }


Get this bounty!!!

#StackBounty: #magento2 #magento2.3 #import #sorting #product-sorting Column 'created_at' not imported

Bounty: 50

My goal is to sort products on the frontend from newest to oldest.

The products CSV file contains the created_at column (e.g. 2020-10-31 14:05:44). Format seems to be correct.

After the standard import, I’m looking in the catalog_product_entity table, and created_at is actually the import’s timestamp (e.g. 2020-11-28 17:38:48).

Am I looking at the wrong DB field? Is there some locale-specific formatting under the hood? (I’m importing for the ro store)

References

Versions: Magento 2.3.5-p1, PHP 7.3.24


Get this bounty!!!

#StackBounty: #magento2 #magento2.3 #import #sorting #product-sorting Column 'created_at' not imported

Bounty: 50

My goal is to sort products on the frontend from newest to oldest.

The products CSV file contains the created_at column (e.g. 2020-10-31 14:05:44). Format seems to be correct.

After the standard import, I’m looking in the catalog_product_entity table, and created_at is actually the import’s timestamp (e.g. 2020-11-28 17:38:48).

Am I looking at the wrong DB field? Is there some locale-specific formatting under the hood? (I’m importing for the ro store)

References

Versions: Magento 2.3.5-p1, PHP 7.3.24


Get this bounty!!!

#StackBounty: #magento2 #magento2.3 #import #sorting #product-sorting Column 'created_at' not imported

Bounty: 50

My goal is to sort products on the frontend from newest to oldest.

The products CSV file contains the created_at column (e.g. 2020-10-31 14:05:44). Format seems to be correct.

After the standard import, I’m looking in the catalog_product_entity table, and created_at is actually the import’s timestamp (e.g. 2020-11-28 17:38:48).

Am I looking at the wrong DB field? Is there some locale-specific formatting under the hood? (I’m importing for the ro store)

References

Versions: Magento 2.3.5-p1, PHP 7.3.24


Get this bounty!!!

#StackBounty: #magento2 #magento2.3 #import #sorting #product-sorting Column 'created_at' not imported

Bounty: 50

My goal is to sort products on the frontend from newest to oldest.

The products CSV file contains the created_at column (e.g. 2020-10-31 14:05:44). Format seems to be correct.

After the standard import, I’m looking in the catalog_product_entity table, and created_at is actually the import’s timestamp (e.g. 2020-11-28 17:38:48).

Am I looking at the wrong DB field? Is there some locale-specific formatting under the hood? (I’m importing for the ro store)

References

Versions: Magento 2.3.5-p1, PHP 7.3.24


Get this bounty!!!