FireGento_FastSimpleImport2 icon indicating copy to clipboard operation
FireGento_FastSimpleImport2 copied to clipboard

Error in data structure: entity values are mixed

Open mattiaguatta opened this issue 4 years ago • 8 comments

hello, have this error when try to import with sample code, Error in data structure: entity values are mixed

why??




use Magento\Framework\App\Bootstrap;
require_once(__DIR__.'/../../app/bootstrap.php');
$bootstrap = Bootstrap::create(BP, $_SERVER);
$objectManager = \Magento\Framework\App\ObjectManager::getInstance(); 
$obj = $bootstrap->getObjectManager();

$state = $obj->get('Magento\Framework\App\State');
$state->setAreaCode('frontend');

$importerModel = $objectManager->create('FireGento\FastSimpleImport\Model\Importer');

$productsArray[] = array(
        
                    'sku' => 'firegento-test',
                    'attribute_set_code' => 'Default',
                    'product_type' => 'simple',
                    'product_websites' => 'base',
                    'name' => 'FireGento Test Product',
                    'price' => '14',
                );
                
                
try {
    $importerModel->processImport($productsArray);
} catch (\Exception $e) {
    echo $e->getMessage();
}

mattiaguatta avatar Sep 09 '20 21:09 mattiaguatta

We also have the same issue. Can we have an update on this please?

manaftryzens avatar Sep 23 '20 12:09 manaftryzens

Hi, this was causing some head scratches as well. I ran into the same issue and checked it again on an empty Magento 2.4.1 installation and the above example works just fine. Please make sure that your Magento2 installation doesn't have any attributes that are set as mandatory (or required). The validation step checks for mandatory attributes (calling validateRow() in vendor/magento/module-catalog-import-export/Model/Import/Product.php) and - if validation fails - it does not create an entry in the importexport_importdata table. A missing entry in the importexport_importdata will be reported as "Error in data structure: entity values are mixed".

stephansteiner avatar Nov 18 '20 09:11 stephansteiner

Hello,

many thanks, we solve this problem but we have another serious problem, if I put the url_key field and this field changes value, the 301 redirect from the old to the new url is not generated

Thanks

Il giorno mer 18 nov 2020 alle ore 10:46 Stephan Steiner < [email protected]> ha scritto:

Hi, this was causing some head scratches as well. I ran into the same issue and checked it again on an empty Magento 2.4.1 installation and the above example works just fine. Please make sure that your Magento2 installation doesn't have any attributes that are set as mandatory (or required). The validation step checks for mandatory attributes (calling validateRow() in vendor/magento/module-catalog-import-export/Model/Import/Product.php) and - if validation fails - it does not create an entry in the importexport_importdata table. A missing entry in the importexport_importdata will be reported as "Error in data structure: entity values are mixed".

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/firegento/FireGento_FastSimpleImport2/issues/109#issuecomment-729561525, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOM4DXGAGFCO4TIPWJI65TTSQOJVVANCNFSM4RDKUCFA .

--

Mattia Guatta Web development dep.

[image: Up&Up] Up&Up Srl Via Caselle, 4 - 25081 Bedizzole (BS) Tel. +39 030 6871990 www.up3up.it https://www.facebook.com/Up3UpIt https://www.youtube.com/c/up3upIt https://it.linkedin.com/company/up-&-up https://www.instagram.com/Up3Up Le informazioni contenute nel presente documento e negli allegati sono riservate al destinatario indicato. A chi legge il presente avviso, se non è l'effettivo destinatario, o un dipendente, o la persona responsabile della consegna della comunicazione, si notifica che è proibito qualsiasi uso, copia, distribuzione o divulgazione di quanto in esso contenuto ai sensi dell'art. 616 codice penale e di quanto stabilisce la legge 675/96 sulla tutela dei dati personali. Se questa comunicazione Vi è pervenuta per errore vi preghiamo di informarci immediatamente, cancellando il contenuto del presente documento e degli allegati. Rispetta il tuo ambiente, pensa prima di stampare questa e-mail.

mattiaguatta avatar Nov 18 '20 09:11 mattiaguatta

Hi @mattiaguatta

How did you solve this problem? Is there a missing value that should be inserted into database seperately?

Regards, Ozan

ozanakc avatar Jan 29 '21 10:01 ozanakc

Hi @stephansteiner Would you please guide us how did you fix the issue. This is a blocker for us now :(. Thanks in advance.

AshishBhatia89 avatar Apr 29 '21 00:04 AshishBhatia89

@AshishBhatia89 You try to activate the configuration setting "Create temporary table for validated import_data". For me it solved a similar problem a couple of years ago.

avstudnitz avatar Apr 29 '21 06:04 avstudnitz

hello all,

we fix this iusse by pass in the array the url_key. Like this:

	'sku' => 'Productsku',
	'product_type' => 'configurable',
--->	'url_key' => 'url',
	......................

mattiaguatta avatar Apr 29 '21 07:04 mattiaguatta