Skip to content

Fixed critical error 'Undefined constant formName' #24086

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

Merged
merged 2 commits into from
Aug 14, 2019
Merged

Fixed critical error 'Undefined constant formName' #24086

merged 2 commits into from
Aug 14, 2019

Conversation

cpini
Copy link
Contributor

@cpini cpini commented Aug 9, 2019

Description (*)

Getting an 'undefined constant formName' error in the Admin panel when trying to edit products so just fixed the place in the template where this was happening - simple fix.
Stack: Alpine/Apache 2.4/PHP7.2.1 (+FPM)

Single file change: app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/helper/gallery.phtml

Manual testing scenarios (*)

  1. Admin > Catalog > Product then click on product to edit - previously error was being thrown and crashing the page now the product is editable.

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose - yes
  • All commits are accompanied by meaningful commit messages - yes
  • All new or changed code is covered with unit/integration tests - n/a
  • All automated tests passed successfully - ok, see output below

./vendor/bin/phpunit -d memory_limit=1200M -c dev/tests/unit/phpunit.xml.dist app/code/Magento/Catalog/Test
PHPUnit 6.5.14 by Sebastian Bergmann and contributors.
Time: 41.95 seconds, Memory: 170.25MB
OK, but incomplete, skipped, or risky tests!
Tests: 1573, Assertions: 4884, Skipped: 26, Incomplete: 2.

@m2-assistant
Copy link

m2-assistant bot commented Aug 9, 2019

Hi @cpini. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.3-develop instance - deploy vanilla Magento instance

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

@magento-cicd2
Copy link
Contributor

magento-cicd2 commented Aug 9, 2019

CLA assistant check
All committers have signed the CLA.

@magento-engcom-team
Copy link
Contributor

Hi @VladimirZaets, thank you for the review.
ENGCOM-5579 has been created to process this Pull Request
✳️ @VladimirZaets, could you please add one of the following labels to the Pull Request?

Label Description
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests
Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests
Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests

@magento-engcom-team
Copy link
Contributor

@cpini thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository.

@engcom-Alfa
Copy link
Contributor

✔️ QA Passed

taskula pushed a commit to Hypernova-Oy/magento2 that referenced this pull request Aug 14, 2019
@magento-engcom-team magento-engcom-team merged commit 56c29f1 into magento:2.3-develop Aug 14, 2019
@m2-assistant
Copy link

m2-assistant bot commented Aug 14, 2019

Hi @cpini, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@magento-engcom-team magento-engcom-team added this to the Release: 2.3.4 milestone Aug 14, 2019
@sidolov sidolov added the Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests label Sep 10, 2019
@Jilco
Copy link

Jilco commented Oct 26, 2019

Is there a work-around for this error? Or do i have to wait for the 2.3.4 release?

@arabkhemar
Copy link

@Jilco add missing $ in "escapeHtmlAttr($formName)"

@Jilco
Copy link

Jilco commented Nov 11, 2019

Yes, did it and thats it. Thanks

@cpini cpini deleted the fix/undefined-constant-formName branch November 27, 2019 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants