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

Notice: Undefined index: label in magento/module-catalog-search/Model/Advanced.php on line 414 #33408

Open
usuyukiso opened this issue Jul 2, 2021 · 5 comments · May be fixed by #34922
Open
Assignees
Labels
Component: AdvancedSearch Component: Attributes Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P3 May be fixed according to the position in the backlog. Progress: PR in progress Reported on 2.4.2 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch

Comments

@usuyukiso
Copy link

Preconditions (*)

  1. Magento version 2.4.2,
  2. No sample data.
  3. Navigate to admin
  4. Go to admin > Stores > Attributes> Product
  5. Choose any select attribute (E.g. manufacturer)
  6. Go to Properties > Manage Options (Values of Your Attribute)
  7. Check that at least one option is added, or add one option (if the attribute has no values, the issue is not reproduced).
  8. Save the attribute.

Steps to reproduce (*)

  1. Go to the frontend
  2. Go to the link your-website .com/catalogsearch/advanced/result?manufacturer=%27%2C+test+%3D
  3. Check that you see 500 error
  4. Check report: Undefined index: label in /var/www/html/m242/vendor/magento/module-catalog-search/Model/Advanced.php on line 414

Expected result (*)

  1. Redirect to catalogsearch/advanced/index page with the message 'Enter a search term and try again.'

Actual result (*)

  1. Error in the exception.log: [2021-07-02 08:23:38] main.CRITICAL: Notice: Undefined index: label in /var/www/html/m242/vendor/magento/module-catalog-search/Model/Advanced.php on line 414 {"report_id":"2ca6394ffc40c5a889488d6a3cce70a90d3d20d0a87af3fce0064ec1abafcdf7","exception":"[object] (Exception(code: 0): Notice: Undefined index: label in /var/www/html/m242/vendor/magento/module-catalog-search/Model/Advanced.php on line 414 at /var/www/html/m242/vendor/magento/framework/App/ErrorHandler.php:61)"} []
  2. Report (var/report):
    {"0":"Notice: Undefined index: label in \/var\/www\/html\/m242\/vendor\/magento\/module-catalog-search\/Model\/Advanced.php on line 415","1":"#1 Magento\\CatalogSearch\\Model\\Advanced->getPreparedSearchCriteria() called at [vendor\/magento\/module-catalog-search\/Model\/Advanced.php:206]\n#2 Magento\\CatalogSearch\\Model\\Advanced->addFilters() called at [vendor\/magento\/module-catalog-search\/Controller\/Advanced\/Result.php:62]\n#3 Magento\\CatalogSearch\\Controller\\Advanced\\Result->execute() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:58]\n#4 Magento\\CatalogSearch\\Controller\\Advanced\\Result\\Interceptor->___callParent() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:138]\n#5 Magento\\CatalogSearch\\Controller\\Advanced\\Result\\Interceptor->Magento\\Framework\\Interception\\{closure}() called at [vendor\/magento\/framework\/App\/Action\/Plugin\/ActionFlagNoDispatchPlugin.php:51]\n#6 Magento\\Framework\\App\\Action\\Plugin\\ActionFlagNoDispatchPlugin->aroundExecute() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:135]\n#7 Magento\\CatalogSearch\\Controller\\Advanced\\Result\\Interceptor->Magento\\Framework\\Interception\\{closure}() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:153]\n#8 Magento\\CatalogSearch\\Controller\\Advanced\\Result\\Interceptor->___callPlugins() called at [generated\/code\/Magento\/CatalogSearch\/Controller\/Advanced\/Result\/Interceptor.php:23]\n#9 Magento\\CatalogSearch\\Controller\\Advanced\\Result\\Interceptor->execute() called at [vendor\/magento\/framework\/App\/Action\/Action.php:111]\n#10 Magento\\Framework\\App\\Action\\Action->dispatch() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:58]\n#11 Magento\\CatalogSearch\\Controller\\Advanced\\Result\\Interceptor->___callParent() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:138]\n#12 Magento\\CatalogSearch\\Controller\\Advanced\\Result\\Interceptor->Magento\\Framework\\Interception\\{closure}() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:153]\n#13 Magento\\CatalogSearch\\Controller\\Advanced\\Result\\Interceptor->___callPlugins() called at [generated\/code\/Magento\/CatalogSearch\/Controller\/Advanced\/Result\/Interceptor.php:32]\n#14 Magento\\CatalogSearch\\Controller\\Advanced\\Result\\Interceptor->dispatch() called at [vendor\/magento\/framework\/App\/FrontController.php:186]\n#15 Magento\\Framework\\App\\FrontController->processRequest() called at [vendor\/magento\/framework\/App\/FrontController.php:118]\n#16 Magento\\Framework\\App\\FrontController->dispatch() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:58]\n#17 Magento\\Framework\\App\\FrontController\\Interceptor->___callParent() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:138]\n#18 Magento\\Framework\\App\\FrontController\\Interceptor->Magento\\Framework\\Interception\\{closure}() called at [vendor\/magento\/module-store\/App\/FrontController\/Plugin\/RequestPreprocessor.php:99]\n#19 Magento\\Store\\App\\FrontController\\Plugin\\RequestPreprocessor->aroundDispatch() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:135]\n#20 Magento\\Framework\\App\\FrontController\\Interceptor->Magento\\Framework\\Interception\\{closure}() called at [vendor\/magento\/module-page-cache\/Model\/App\/FrontController\/BuiltinPlugin.php:75]\n#21 Magento\\PageCache\\Model\\App\\FrontController\\BuiltinPlugin->aroundDispatch() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:135]\n#22 Magento\\Framework\\App\\FrontController\\Interceptor->Magento\\Framework\\Interception\\{closure}() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:153]\n#23 Magento\\Framework\\App\\FrontController\\Interceptor->___callPlugins() called at [generated\/code\/Magento\/Framework\/App\/FrontController\/Interceptor.php:23]\n#24 Magento\\Framework\\App\\FrontController\\Interceptor->dispatch() called at [vendor\/magento\/framework\/App\/Http.php:116]\n#25 Magento\\Framework\\App\\Http->launch() called at [generated\/code\/Magento\/Framework\/App\/Http\/Interceptor.php:23]\n#26 Magento\\Framework\\App\\Http\\Interceptor->launch() called at [vendor\/magento\/framework\/App\/Bootstrap.php:263]\n#27 Magento\\Framework\\App\\Bootstrap->run() called at [pub\/index.php:29]\n","url":"\/index.php\/catalogsearch\/advanced\/result?manufacturer=%27%2C+test+%3D","script_name":"\/index.php","report_id":"2ca6394ffc40c5a889488d6a3cce70a90d3d20d0a87af3fce0064ec1abafcdf7"}
@m2-assistant
Copy link

m2-assistant bot commented Jul 2, 2021

Hi @usuyukiso. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

Please, add a comment to assign the issue: @magento I am working on this


⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@m2-assistant
Copy link

m2-assistant bot commented Jul 2, 2021

Hi @engcom-November. 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.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.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. Add label Issue: Confirmed once verification is complete.

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

@engcom-November
Copy link
Contributor

engcom-November commented Jul 6, 2021

Verified the issue on Magento 2.4-develop branch and the issue is reproducible:
Steps to reproduce:

  1. Navigate to admin -> Stores > Attributes> Product
  2. Choose any select attribute (E.g. manufacturer)
  3. Go to Properties > Manage Options (Values of Your Attribute)
  4. Check that at least one option is added, or add one option (if the attribute has no values, the issue is not reproduced).
  5. Save the attribute.
  6. Navigate to the front-end
  7. Go to the link your-website .com/catalogsearch/advanced/result?manufacturer=%27%2C+test+%3D
    Issue: Below error message is getting displayed with 500 Status Code
    image

@engcom-November engcom-November added Reported on 2.4.2 Indicates original Magento version for the Issue report. Component: Attributes Component: AdvancedSearch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch labels Jul 6, 2021
@m2-community-project m2-community-project bot moved this from Ready for Confirmation to Confirmed in Issue Confirmation and Triage Board Jul 6, 2021
@engcom-Hotel engcom-Hotel removed the Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed label Jul 6, 2021
@m2-community-project m2-community-project bot moved this from Confirmed to Ready for Confirmation in Issue Confirmation and Triage Board Jul 6, 2021
@engcom-Hotel engcom-Hotel added Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed and removed Issue: ready for confirmation labels Jul 6, 2021
@m2-community-project m2-community-project bot moved this from Ready for Confirmation to Confirmed in Issue Confirmation and Triage Board Jul 6, 2021
@m2-community-project m2-community-project bot moved this from Ready for Confirmation to Confirmed in Issue Confirmation and Triage Board Jul 6, 2021
@engcom-November engcom-November removed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch labels Jul 15, 2021
@m2-community-project m2-community-project bot moved this from Confirmed to Ready for Confirmation in Issue Confirmation and Triage Board Jul 15, 2021
@engcom-November engcom-November added Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch labels Jul 15, 2021
@m2-community-project m2-community-project bot moved this from Ready for Confirmation to Confirmed in Issue Confirmation and Triage Board Jul 15, 2021
@magento-engcom-team
Copy link
Contributor

✅ Confirmed by @engcom-November
Thank you for verifying the issue. Based on the provided information internal tickets MC-42851 were created

Issue Available: @engcom-November, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@engcom-Hotel engcom-Hotel added the Priority: P3 May be fixed according to the position in the backlog. label Aug 10, 2021
@m2-community-project m2-community-project bot added this to Ready for Development in Low Priority Backlog Aug 10, 2021
@vlmed
Copy link
Contributor

vlmed commented Jan 4, 2022

@magento I am working on it

@m2-community-project m2-community-project bot moved this from Ready for Development to Dev In Progress in Low Priority Backlog Jan 4, 2022
@vlmed vlmed linked a pull request Jan 4, 2022 that will close this issue
5 tasks
@m2-community-project m2-community-project bot moved this from Dev In Progress to Pull Request In Progress in Low Priority Backlog Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: AdvancedSearch Component: Attributes Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P3 May be fixed according to the position in the backlog. Progress: PR in progress Reported on 2.4.2 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch
Projects
Low Priority Backlog
  
Pull Request In Progress
Development

Successfully merging a pull request may close this issue.

5 participants