Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1 exception(s): Exception #0 (Exception): Warning: Illegal offset type in isset or empty in /home/jewelrynest2/public_html/magento/vendor/magento/module-eav/Model/Entity/Attribute/Source/AbstractSource.php on line 76 #13612

Closed
kamal7606 opened this issue Feb 12, 2018 · 17 comments
Assignees
Labels
Component: Eav Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Progress: PR Created Indicates that Pull Request has been created to fix issue Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@kamal7606
Copy link

kamal7606 commented Feb 12, 2018

Preconditions (*)

1.Magento 2.3.0
2.

Steps to reproduce (*)

To reproduce the issue. Please follow the below steps,

1.Product attribute grid -> select Quantity attribute-> Storefront Properties -> Change Visible on Catalog 2.Pages on Storefront to Yes

Expected result (*)

  1. Attribute should visible on frontend

Actual result (*)

1.Exception whille catalog product view
1 exception(s): Exception #0 (Exception): Warning: Illegal offset type in isset or empty in /home/jewelrynest2/public_html/magento/vendor/magento/module-eav/Model/Entity/Attribute/Source/AbstractSource.php on line 76

@magento-engcom-team magento-engcom-team added Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Progress: needs update labels Feb 12, 2018
@magento-engcom-team
Copy link
Contributor

@kamal3294 thank you for your report.
Please use the issue reporting guidelines to report an issue. Please, edit issue description and include the preconditions, the steps required to reproduce, the actual result, and the expected result.
Please, add the following information:

  • Preconditions: Magento version
  • Steps to reproduce
  • Expected result
  • Actual result

@kamal7606
Copy link
Author

Dear ,
I am new user in magento 2 , when we click on product then showing above error kindly help me.

Exception #0 (Exception): Warning: Illegal offset type in isset or empty in /home/jewelrynest2/public_html/magento/vendor/magento/module-eav/Model/Entity/Attribute/Source/AbstractSource.php on line 76

image

image

@magento-engcom-team
Copy link
Contributor

@kamal3294 thank you for your report.
We were not able to reproduce this issue by following the steps you provided.
Please try to reproduce this issue on the clean installation (clear, fresh, without any custom themes, third-party extensions, etc.) and tell us the result.

@magento-engcom-team
Copy link
Contributor

@kamal3294, we are closing this issue due to inactivity. If you'd like to update it, please reopen the issue.

@mwaheed92
Copy link

Hi,
I have noticed this issue today after trying to display the "Quantity" attribute in the product page

  • go to product attribute -> select Quantity one -> Storefront Properties -> Change Visible on Catalog Pages on Storefront to Yes

I still don't know why this happen

Regards,

@saravananvelu
Copy link
Contributor

saravananvelu commented Aug 17, 2018

@magento-engcom-team I am also facing the same issue after changing the Quantity attribute settings.

To reproduce the issue. Please follow the below steps,

Product attribute grid -> select Quantity attribute-> Storefront Properties -> Change Visible on Catalog Pages on Storefront to Yes

@p-makowski
Copy link

I confirm that there is an issue with quantity_and_stock_status (Qty) system attribute.
If somebody/admin changes it to be visible on frontend the following happens:

$value in \Magento\Eav\Model\Entity\Attribute\Frontend\AbstractFrontend::getValue is an array (with 2 elements afair: stock and qty). $value is a parameter in $this->getOption($value) and later in $source->getOptionText($optionId);.
Unfortunately \Magento\Eav\Model\Entity\Attribute\Source\AbstractSource::getOptionText($value) is checking the following condition if (isset($options[$value])) {. Array keys can only be scalar, but $value is an array.

Illegal offset type in isset or empty in magento/vendor/magento/module-eav/Model/Entity/Attribute/Source/AbstractSource.php on line 76

@sreichel
Copy link
Contributor

sreichel commented Oct 11, 2018

W'd like to re-open this.

I could reproduce this with an attribute with custom backend model. Some more info here ... https://magento.stackexchange.com/questions/246201/custom-backend-model-for-multiselect-attributes-causes-exception

Attribute setup:

public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
{
    $eavSetup = $this->eavSetupFactory->create();
    $eavSetup->addAttribute(
        Product::ENTITY,
        Helper::ATTRIBUTE_CODE,
        [
            'group' => 'General',
            'type' => 'varchar',
            'label' => 'Label',
            'input' => 'multiselect',
            'source' => 'Vendor\Module\Model\Attribute\Source\Country',
            'backend' => 'Vendor\Module\Model\Attribute\Backend\Country',
            'required' => false,
            'sort_order' => 100,
            'global' => ScopedAttributeInterface::SCOPE_WEBSITE,
        ]
    );
}

Backend model can also be Magento\Eav\Model\Entity\Attribute\Backend\ArrayBackend ...

@sreichel sreichel reopened this Oct 11, 2018
@evs-xsarus
Copy link

I have the same problem, this could be a fix (at least the detail page shows again):

        if (false === is_null($value) && false === is_array($value) && isset($options) && isset($options[$value])) {
            return $options[$value];
        }

@TomashKhamlai TomashKhamlai self-assigned this Dec 5, 2018
@magento-engcom-team
Copy link
Contributor

Hi @TomashKhamlai. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • 6. Add label Issue: Confirmed once verification is complete.

  • 7. Make sure that automatic system confirms that report has been added to the backlog.

@irajneeshgupta irajneeshgupta self-assigned this Dec 27, 2018
@magento-engcom-team
Copy link
Contributor

magento-engcom-team commented Dec 27, 2018

Hi @irajneeshgupta. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • 6. Add label Issue: Confirmed once verification is complete.

  • 7. Make sure that automatic system confirms that report has been added to the backlog.

aditisinghcedcoss added a commit to aditisinghcedcoss/magento2 that referenced this issue Jan 2, 2019
aditisinghcedcoss added a commit to aditisinghcedcoss/magento2 that referenced this issue Jan 2, 2019
@ghost ghost assigned ghost and unassigned TomashKhamlai Jan 4, 2019
@magento-engcom-team
Copy link
Contributor

Hi @engcom-backlog-tomash. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • 6. Add label Issue: Confirmed once verification is complete.

  • 7. Make sure that automatic system confirms that report has been added to the backlog.

@ghost ghost removed their assignment Jan 4, 2019
@irajneeshgupta irajneeshgupta added the Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release label Jan 11, 2019
@irajneeshgupta irajneeshgupta added Component: Eav Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Jan 11, 2019
@magento-engcom-team
Copy link
Contributor

@irajneeshgupta Thank you for verifying the issue.

Unfortunately, not enough information was provided to created internal ticket. Please consider adding the following:

Once all required information is added, please add label "Issue: Confirmed" again.
Thanks!

@magento-engcom-team magento-engcom-team removed the Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed label Jan 11, 2019
@irajneeshgupta irajneeshgupta added Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Progress: PR Created Indicates that Pull Request has been created to fix issue labels Jan 11, 2019
@magento-engcom-team
Copy link
Contributor

@irajneeshgupta Thank you for verifying the issue.

Unfortunately, not enough information was provided to created internal ticket. Please consider adding the following:

Once all required information is added, please add label "Issue: Confirmed" again.
Thanks!

@magento-engcom-team magento-engcom-team added Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed and removed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed labels Jan 11, 2019
@irajneeshgupta irajneeshgupta added the Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed label Jan 11, 2019
@magento-engcom-team magento-engcom-team added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Jan 11, 2019
@magento-engcom-team
Copy link
Contributor

@irajneeshgupta Thank you for verifying the issue. Based on the provided information internal tickets MAGETWO-97571 were created

@magento-engcom-team magento-engcom-team added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label Mar 16, 2019
@magento-engcom-team
Copy link
Contributor

Hi @kamal3294. Thank you for your report.
The issue has been fixed in #20001 by @aditisinghcedcoss in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming 2.3.2 release.

magento-engcom-team added a commit that referenced this issue Mar 16, 2019
 - Merge Pull Request #20001 from aditisinghcedcoss/magento2:aditisinghcedcoss-patch-for-issue#13612
 - Merged commits:
   1. 0df7243
   2. 887902b
amol2jcommerce pushed a commit to amol2jcommerce/magento2 that referenced this issue Mar 16, 2019
@dmytro-ch dmytro-ch added the Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release label Mar 17, 2019
@magento-engcom-team
Copy link
Contributor

Hi @kamal3294. Thank you for your report.
The issue has been fixed in #21802 by @amol2jcommerce in 2.2-develop branch
Related commit(s):

The fix will be available with the upcoming 2.2.9 release.

@magento-engcom-team magento-engcom-team added the Fixed in 2.2.x The issue has been fixed in 2.2 release line label Mar 20, 2019
magento-engcom-team added a commit that referenced this issue Mar 20, 2019
…isibility set to storefront throwing exception #21802

 - Merge Pull Request #21802 from amol2jcommerce/magento2:2.2-develop-PR-port-20001
 - Merged commits:
   1. e7fb7fe
   2. dcf808e
magento-engcom-team pushed a commit that referenced this issue Mar 20, 2019
…isibility set to storefront throwing exception #21802
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Eav Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Progress: PR Created Indicates that Pull Request has been created to fix issue Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

No branches or pull requests

10 participants