I'm seeing a lot of "Invalid form POST data" errors in watchdog since the introduction of #2753349: Prevent huge cache form table

From what I can tell, the patch in #2753349 reduces the number of rows in the cache_form table by modifying the build_id so that you get one cache instance per entity revision field.

This results in the cache_token being overwritten for every new authenticated user, making the cached instance invalid for all other users - cache_tokens are unique to authenticated users.

Steps to reproduce:

1. As an authenticated user, view a page with editable fields
2. View a second instance of the same page as an authenticated user with a different session (either the same account in a different browser, or a different account)
3. Attempts to modify any values on the first instance of the page results in "Invalid form POST data"

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

reevo created an issue. See original summary.

reevo’s picture

Attached patch reverts to previous behaviour.

reevo’s picture

Status: Active » Needs review
FileSize
626 bytes

Attaching a new patch for this issue which applies to the current version of dev.

Rather than completely removing this behaviour, the new patch only overrides the form_id for anonymous users, which should achieve the result desired by #2753349: Prevent huge cache form table without creating issues for authenticated users.

joelpittet’s picture

I'm attempting to get a review from the author of the #2753349: Prevent huge cache form table