Magento 2 Attempt to load value of nonexistent EAV attribute
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
add a comment |
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
add a comment |
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
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
magento-2.1 eav
asked May 5 '17 at 14:26
characterErrorcharacterError
2319
2319
add a comment |
add a comment |
4 Answers
4
active
oldest
votes
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.
add a comment |
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.
add a comment |
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:
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_*
add a comment |
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.
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
add a comment |
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.
add a comment |
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.
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.
answered May 5 '17 at 15:07
sterossteros
782629
782629
add a comment |
add a comment |
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.
add a comment |
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.
add a comment |
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.
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.
answered May 12 '17 at 15:20
MagentoMacMagentoMac
61431333
61431333
add a comment |
add a comment |
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:
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_*
add a comment |
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:
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_*
add a comment |
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:
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_*
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:
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_*
edited Nov 9 '18 at 4:00
answered Nov 2 '18 at 3:56
Khoa TruongDinhKhoa TruongDinh
21.1k64085
21.1k64085
add a comment |
add a comment |
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.
add a comment |
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.
add a comment |
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.
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.
answered Jan 15 at 16:36
Bare FeetBare Feet
1,5591732
1,5591732
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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