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

Magento 2.3 Error: "Invalid Form Key. Please refresh the page." When creating Bundled Products #31209

Closed
mateuszrusiecki opened this issue Dec 8, 2020 · 8 comments
Assignees
Labels
Issue: ready for confirmation not-confirmed Use for Issue that was closed during confirmation Reported on 2.3.5-p2 Indicates original Magento version for the Issue report.

Comments

@mateuszrusiecki
Copy link

Preconditions

  1. Magento 2.3.5-p2
  2. PHP 7.3
  3. max_input_vars=100000

Steps to reproduce

  1. Create new bundled products
  2. Add 20 options with single product attached to each
  3. Save the bundled product

Expected result

  1. Bundled product saved successfully.

Actual result

  1. Unable to save bundled product, error: "Invalid Form Key. Please refresh the page."
@m2-assistant
Copy link

m2-assistant bot commented Dec 8, 2020

Hi @mateuszrusiecki. 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

@Pavel-Fekete
Copy link

Hello @mateuszrusiecki

I Couldn't reproduce this issue on the latest 2.4-develop
Bundled product (with 20 options) saved successfully and displayed on the frontend
Bundled product

@mateuszrusiecki
Copy link
Author

@Pavel-Fekete sorry, the issue appears when there is 30+ options. And turns out that this is max_input_vars related. I changed the value wrong - for cli instead of fpm. After increasing it to 10000 and restarting fpm it worked.

But issue still persist. There "Invalid Form Key. Please refresh the page." message is useless, and debug log provide no informations whatsoever.

So you can set max_input_vars to some low value like 100 and see the error.

@mateuszrusiecki
Copy link
Author

oh for fuck sake, now half of my options vanished after saving. This is so piece of shit...

@itisraza
Copy link

itisraza commented Dec 10, 2020

Hi @mateuszrusiecki

Besides changing max_input_vars, please try changing max_input_nesting_level and max_input_time as well to some higher values. Hope this will help

Regards,
Raza.

@engcom-Alfa engcom-Alfa self-assigned this Dec 15, 2020
@m2-assistant
Copy link

m2-assistant bot commented Dec 15, 2020

Hi @engcom-Alfa. 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-Alfa
Copy link
Contributor

Hi @mateuszrusiecki. Thank you for your report!
Unfortunately, we are not able to reproduce this issue on fresh 2.4-develop. Everything works as expected.

Manual testing scenario:
max_input_vars=100000

  1. Create new bundled products;
  2. Add 35 options with a single product attached to each;
  3. Save the bundled product;

Actual Result: ✔️ Bundled product saved successfully.

Peek 2020-12-15 14-02

So, we have to close it.
Please feel free to comment, reopen or create new ticket according to the Issue reporting guidelines
if you are still facing this issue on the latest 2.4-develop branch. Thank you for collaboration.

@m2-community-project m2-community-project bot removed this from Ready for Confirmation in Issue Confirmation and Triage Board Dec 15, 2020
@engcom-Alfa engcom-Alfa added Reported on 2.3.5-p2 Indicates original Magento version for the Issue report. not-confirmed Use for Issue that was closed during confirmation labels Dec 15, 2020
@mateuszrusiecki
Copy link
Author

@engcom-Alfa I think I mentioned in few paces that I use 2.3 NOT 2.4 but whatever. Did you set max_input_vars=100? I pretty sure that it will fail wit only 100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: ready for confirmation not-confirmed Use for Issue that was closed during confirmation Reported on 2.3.5-p2 Indicates original Magento version for the Issue report.
Projects
None yet
Development

No branches or pull requests

4 participants