Magento 2 Attempt to load value of nonexistent EAV attribute












0















I see in my log the nexe warning:



[2017-05-05 12:23:53] main.WARNING: Attempt to load value of nonexistent EAV attribute '339'
for entity type 'MagentoCatalogApiDataProductInterface'.


I can't find why, but i find this and i don't know if this is true.



Do you know why this problem occurs?










share|improve this question



























    0















    I see in my log the nexe warning:



    [2017-05-05 12:23:53] main.WARNING: Attempt to load value of nonexistent EAV attribute '339'
    for entity type 'MagentoCatalogApiDataProductInterface'.


    I can't find why, but i find this and i don't know if this is true.



    Do you know why this problem occurs?










    share|improve this question

























      0












      0








      0


      1






      I see in my log the nexe warning:



      [2017-05-05 12:23:53] main.WARNING: Attempt to load value of nonexistent EAV attribute '339'
      for entity type 'MagentoCatalogApiDataProductInterface'.


      I can't find why, but i find this and i don't know if this is true.



      Do you know why this problem occurs?










      share|improve this question














      I see in my log the nexe warning:



      [2017-05-05 12:23:53] main.WARNING: Attempt to load value of nonexistent EAV attribute '339'
      for entity type 'MagentoCatalogApiDataProductInterface'.


      I can't find why, but i find this and i don't know if this is true.



      Do you know why this problem occurs?







      magento-2.1 eav






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked May 5 '17 at 14:26









      characterErrorcharacterError

      2319




      2319






















          4 Answers
          4






          active

          oldest

          votes


















          1














          Make a database backup.



          Go to the database and check in the eav_attribute and the other eav_* tables if you find a reference to that id.
          You could try to delete that reference if that attribute was deleted.



          This information is supplied without liability. I never did that. It's just on top of my head.






          share|improve this answer































            0














            I have this issue and know how it was caused in my setup. We moved products over from another Magento2 install. The ID numbers for the EAV attributes will have likely been different. So while the attributes are all still there and assigned to the same products. The entity_id number will be different. Shy of trying to marry up the id numbers again back to their original values, I'm not sure how to fix this..... bit messy! In your situation, if you have a previous version of the eav_attribute table, try restoring the previous version and see if the error's in your log remain.






            share|improve this answer































              0














              Note: Backup your database first.



              Find the string Attempt to load value of nonexistent EAV attribute in our project. On my current Magento version 2.2.2, foud it in



              vendor/magento/module-eav/Model/ResourceModel/ReadHandler.php



              foreach ($connection->fetchAll($unionSelect) as $attributeValue) {
              if (isset($attributesMap[$attributeValue['attribute_id']])) {
              $entityData[$attributesMap[$attributeValue['attribute_id']]] = $attributeValue['value'];
              } else {
              $this->logger->warning(
              "Attempt to load value of nonexistent EAV attribute '{$attributeValue['attribute_id']}'
              for entity type '$entityType'."
              );
              }
              }


              We need to dig into this part with xDebug:



              enter image description here



              Check entity_id in eav_attribute and check backend_type. For example: int, datetime, decimal, varchar...



              And then find the table of this type: catalog_product_*






              share|improve this answer

































                0














                I migrated from M1 to M2 and had similar problem.



                I fixed it by adding the missing attributes to the attribute set created by migration tool.



                Find the attribute code by running following query:



                SELECT * FROM `eav_attribute` WHERE `attribute_id` = 339


                In the result you should see the attribute code. Now log in to the admin panel and navigate to Admin > Stores > Attributes > Attribute Set



                Find the migrated attribute set (Usually looks like this Migration_[AttributeSetName]) and add the attribute code to the attribute set.



                This solved my problem that appeared after migration.






                share|improve this answer























                  Your Answer








                  StackExchange.ready(function() {
                  var channelOptions = {
                  tags: "".split(" "),
                  id: "479"
                  };
                  initTagRenderer("".split(" "), "".split(" "), channelOptions);

                  StackExchange.using("externalEditor", function() {
                  // Have to fire editor after snippets, if snippets enabled
                  if (StackExchange.settings.snippets.snippetsEnabled) {
                  StackExchange.using("snippets", function() {
                  createEditor();
                  });
                  }
                  else {
                  createEditor();
                  }
                  });

                  function createEditor() {
                  StackExchange.prepareEditor({
                  heartbeatType: 'answer',
                  autoActivateHeartbeat: false,
                  convertImagesToLinks: false,
                  noModals: true,
                  showLowRepImageUploadWarning: true,
                  reputationToPostImages: null,
                  bindNavPrevention: true,
                  postfix: "",
                  imageUploader: {
                  brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                  contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                  allowUrls: true
                  },
                  onDemand: true,
                  discardSelector: ".discard-answer"
                  ,immediatelyShowMarkdownHelp:true
                  });


                  }
                  });














                  draft saved

                  draft discarded


















                  StackExchange.ready(
                  function () {
                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f173218%2fmagento-2-attempt-to-load-value-of-nonexistent-eav-attribute%23new-answer', 'question_page');
                  }
                  );

                  Post as a guest















                  Required, but never shown

























                  4 Answers
                  4






                  active

                  oldest

                  votes








                  4 Answers
                  4






                  active

                  oldest

                  votes









                  active

                  oldest

                  votes






                  active

                  oldest

                  votes









                  1














                  Make a database backup.



                  Go to the database and check in the eav_attribute and the other eav_* tables if you find a reference to that id.
                  You could try to delete that reference if that attribute was deleted.



                  This information is supplied without liability. I never did that. It's just on top of my head.






                  share|improve this answer




























                    1














                    Make a database backup.



                    Go to the database and check in the eav_attribute and the other eav_* tables if you find a reference to that id.
                    You could try to delete that reference if that attribute was deleted.



                    This information is supplied without liability. I never did that. It's just on top of my head.






                    share|improve this answer


























                      1












                      1








                      1







                      Make a database backup.



                      Go to the database and check in the eav_attribute and the other eav_* tables if you find a reference to that id.
                      You could try to delete that reference if that attribute was deleted.



                      This information is supplied without liability. I never did that. It's just on top of my head.






                      share|improve this answer













                      Make a database backup.



                      Go to the database and check in the eav_attribute and the other eav_* tables if you find a reference to that id.
                      You could try to delete that reference if that attribute was deleted.



                      This information is supplied without liability. I never did that. It's just on top of my head.







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered May 5 '17 at 15:07









                      sterossteros

                      782629




                      782629

























                          0














                          I have this issue and know how it was caused in my setup. We moved products over from another Magento2 install. The ID numbers for the EAV attributes will have likely been different. So while the attributes are all still there and assigned to the same products. The entity_id number will be different. Shy of trying to marry up the id numbers again back to their original values, I'm not sure how to fix this..... bit messy! In your situation, if you have a previous version of the eav_attribute table, try restoring the previous version and see if the error's in your log remain.






                          share|improve this answer




























                            0














                            I have this issue and know how it was caused in my setup. We moved products over from another Magento2 install. The ID numbers for the EAV attributes will have likely been different. So while the attributes are all still there and assigned to the same products. The entity_id number will be different. Shy of trying to marry up the id numbers again back to their original values, I'm not sure how to fix this..... bit messy! In your situation, if you have a previous version of the eav_attribute table, try restoring the previous version and see if the error's in your log remain.






                            share|improve this answer


























                              0












                              0








                              0







                              I have this issue and know how it was caused in my setup. We moved products over from another Magento2 install. The ID numbers for the EAV attributes will have likely been different. So while the attributes are all still there and assigned to the same products. The entity_id number will be different. Shy of trying to marry up the id numbers again back to their original values, I'm not sure how to fix this..... bit messy! In your situation, if you have a previous version of the eav_attribute table, try restoring the previous version and see if the error's in your log remain.






                              share|improve this answer













                              I have this issue and know how it was caused in my setup. We moved products over from another Magento2 install. The ID numbers for the EAV attributes will have likely been different. So while the attributes are all still there and assigned to the same products. The entity_id number will be different. Shy of trying to marry up the id numbers again back to their original values, I'm not sure how to fix this..... bit messy! In your situation, if you have a previous version of the eav_attribute table, try restoring the previous version and see if the error's in your log remain.







                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered May 12 '17 at 15:20









                              MagentoMacMagentoMac

                              61431333




                              61431333























                                  0














                                  Note: Backup your database first.



                                  Find the string Attempt to load value of nonexistent EAV attribute in our project. On my current Magento version 2.2.2, foud it in



                                  vendor/magento/module-eav/Model/ResourceModel/ReadHandler.php



                                  foreach ($connection->fetchAll($unionSelect) as $attributeValue) {
                                  if (isset($attributesMap[$attributeValue['attribute_id']])) {
                                  $entityData[$attributesMap[$attributeValue['attribute_id']]] = $attributeValue['value'];
                                  } else {
                                  $this->logger->warning(
                                  "Attempt to load value of nonexistent EAV attribute '{$attributeValue['attribute_id']}'
                                  for entity type '$entityType'."
                                  );
                                  }
                                  }


                                  We need to dig into this part with xDebug:



                                  enter image description here



                                  Check entity_id in eav_attribute and check backend_type. For example: int, datetime, decimal, varchar...



                                  And then find the table of this type: catalog_product_*






                                  share|improve this answer






























                                    0














                                    Note: Backup your database first.



                                    Find the string Attempt to load value of nonexistent EAV attribute in our project. On my current Magento version 2.2.2, foud it in



                                    vendor/magento/module-eav/Model/ResourceModel/ReadHandler.php



                                    foreach ($connection->fetchAll($unionSelect) as $attributeValue) {
                                    if (isset($attributesMap[$attributeValue['attribute_id']])) {
                                    $entityData[$attributesMap[$attributeValue['attribute_id']]] = $attributeValue['value'];
                                    } else {
                                    $this->logger->warning(
                                    "Attempt to load value of nonexistent EAV attribute '{$attributeValue['attribute_id']}'
                                    for entity type '$entityType'."
                                    );
                                    }
                                    }


                                    We need to dig into this part with xDebug:



                                    enter image description here



                                    Check entity_id in eav_attribute and check backend_type. For example: int, datetime, decimal, varchar...



                                    And then find the table of this type: catalog_product_*






                                    share|improve this answer




























                                      0












                                      0








                                      0







                                      Note: Backup your database first.



                                      Find the string Attempt to load value of nonexistent EAV attribute in our project. On my current Magento version 2.2.2, foud it in



                                      vendor/magento/module-eav/Model/ResourceModel/ReadHandler.php



                                      foreach ($connection->fetchAll($unionSelect) as $attributeValue) {
                                      if (isset($attributesMap[$attributeValue['attribute_id']])) {
                                      $entityData[$attributesMap[$attributeValue['attribute_id']]] = $attributeValue['value'];
                                      } else {
                                      $this->logger->warning(
                                      "Attempt to load value of nonexistent EAV attribute '{$attributeValue['attribute_id']}'
                                      for entity type '$entityType'."
                                      );
                                      }
                                      }


                                      We need to dig into this part with xDebug:



                                      enter image description here



                                      Check entity_id in eav_attribute and check backend_type. For example: int, datetime, decimal, varchar...



                                      And then find the table of this type: catalog_product_*






                                      share|improve this answer















                                      Note: Backup your database first.



                                      Find the string Attempt to load value of nonexistent EAV attribute in our project. On my current Magento version 2.2.2, foud it in



                                      vendor/magento/module-eav/Model/ResourceModel/ReadHandler.php



                                      foreach ($connection->fetchAll($unionSelect) as $attributeValue) {
                                      if (isset($attributesMap[$attributeValue['attribute_id']])) {
                                      $entityData[$attributesMap[$attributeValue['attribute_id']]] = $attributeValue['value'];
                                      } else {
                                      $this->logger->warning(
                                      "Attempt to load value of nonexistent EAV attribute '{$attributeValue['attribute_id']}'
                                      for entity type '$entityType'."
                                      );
                                      }
                                      }


                                      We need to dig into this part with xDebug:



                                      enter image description here



                                      Check entity_id in eav_attribute and check backend_type. For example: int, datetime, decimal, varchar...



                                      And then find the table of this type: catalog_product_*







                                      share|improve this answer














                                      share|improve this answer



                                      share|improve this answer








                                      edited Nov 9 '18 at 4:00

























                                      answered Nov 2 '18 at 3:56









                                      Khoa TruongDinhKhoa TruongDinh

                                      21.1k64085




                                      21.1k64085























                                          0














                                          I migrated from M1 to M2 and had similar problem.



                                          I fixed it by adding the missing attributes to the attribute set created by migration tool.



                                          Find the attribute code by running following query:



                                          SELECT * FROM `eav_attribute` WHERE `attribute_id` = 339


                                          In the result you should see the attribute code. Now log in to the admin panel and navigate to Admin > Stores > Attributes > Attribute Set



                                          Find the migrated attribute set (Usually looks like this Migration_[AttributeSetName]) and add the attribute code to the attribute set.



                                          This solved my problem that appeared after migration.






                                          share|improve this answer




























                                            0














                                            I migrated from M1 to M2 and had similar problem.



                                            I fixed it by adding the missing attributes to the attribute set created by migration tool.



                                            Find the attribute code by running following query:



                                            SELECT * FROM `eav_attribute` WHERE `attribute_id` = 339


                                            In the result you should see the attribute code. Now log in to the admin panel and navigate to Admin > Stores > Attributes > Attribute Set



                                            Find the migrated attribute set (Usually looks like this Migration_[AttributeSetName]) and add the attribute code to the attribute set.



                                            This solved my problem that appeared after migration.






                                            share|improve this answer


























                                              0












                                              0








                                              0







                                              I migrated from M1 to M2 and had similar problem.



                                              I fixed it by adding the missing attributes to the attribute set created by migration tool.



                                              Find the attribute code by running following query:



                                              SELECT * FROM `eav_attribute` WHERE `attribute_id` = 339


                                              In the result you should see the attribute code. Now log in to the admin panel and navigate to Admin > Stores > Attributes > Attribute Set



                                              Find the migrated attribute set (Usually looks like this Migration_[AttributeSetName]) and add the attribute code to the attribute set.



                                              This solved my problem that appeared after migration.






                                              share|improve this answer













                                              I migrated from M1 to M2 and had similar problem.



                                              I fixed it by adding the missing attributes to the attribute set created by migration tool.



                                              Find the attribute code by running following query:



                                              SELECT * FROM `eav_attribute` WHERE `attribute_id` = 339


                                              In the result you should see the attribute code. Now log in to the admin panel and navigate to Admin > Stores > Attributes > Attribute Set



                                              Find the migrated attribute set (Usually looks like this Migration_[AttributeSetName]) and add the attribute code to the attribute set.



                                              This solved my problem that appeared after migration.







                                              share|improve this answer












                                              share|improve this answer



                                              share|improve this answer










                                              answered Jan 15 at 16:36









                                              Bare FeetBare Feet

                                              1,5591732




                                              1,5591732






























                                                  draft saved

                                                  draft discarded




















































                                                  Thanks for contributing an answer to Magento Stack Exchange!


                                                  • Please be sure to answer the question. Provide details and share your research!

                                                  But avoid



                                                  • Asking for help, clarification, or responding to other answers.

                                                  • Making statements based on opinion; back them up with references or personal experience.


                                                  To learn more, see our tips on writing great answers.




                                                  draft saved


                                                  draft discarded














                                                  StackExchange.ready(
                                                  function () {
                                                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f173218%2fmagento-2-attempt-to-load-value-of-nonexistent-eav-attribute%23new-answer', 'question_page');
                                                  }
                                                  );

                                                  Post as a guest















                                                  Required, but never shown





















































                                                  Required, but never shown














                                                  Required, but never shown












                                                  Required, but never shown







                                                  Required, but never shown

































                                                  Required, but never shown














                                                  Required, but never shown












                                                  Required, but never shown







                                                  Required, but never shown







                                                  Popular posts from this blog

                                                  An IMO inspired problem

                                                  Management

                                                  Investment