I have Drupal 7.31, Views 7.x-3.8, Drupal Commerce 7.x-1.10.

To reproduce this bug:

- Create a node type 'foo' and product type 'bar'.
- Create in node type 'foo' field of type "Commerce product reference" to type 'bar'.
- Create a view page on path '/mypath' consisting of node displays of type 'foo'
- Enable views caching 5min/5min
- Add to cart first time
- Next try to "Add to cart" another product related of same node (another product variation in Commerce Backoffice terminology).
- You will see second product won't be added to cart.

This related to this issue: https://www.drupal.org/node/1926888

bojanz commented 31 minutes ago
Status: Active » Closed (works as designed)

This is a limitation of the Views form API, not something we control or can change at this point.

So if this is Views issue, I post it there.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ofry’s picture

Issue summary: View changes
Alex Bukach’s picture

Title: Views cache HTML breaks some forms... » Views cache HTML breaks some forms
Status: Active » Needs review
FileSize
493 bytes

Some views-based modules like VBO and Views send experience the issues with the same symptomes (see e.g. https://www.drupal.org/node/1307360 and https://www.drupal.org/node/2855545) that indeed are caused by the order Views is handling caching and view forms. Here's the workaround.

joelpittet’s picture

Version: 7.x-3.8 » 7.x-3.x-dev

Always fix against the dev branch

Alex Bukach’s picture

Right @joelpittet, it was fixed so, just haven't noticed that I should have changed the version of the issue.

Alex Bukach’s picture

antims’s picture

This patch works for Views content cache module. Thanks.

Miguel Andrade’s picture

patch #5 worked for views_send
Thanks!

GuyPaddock’s picture

This works for me :)

We have a search view that uses VBO, and we recently enabled rendered HTML caching for that view only to find that the VBO actions don't seem to work now. This patch seems to have corrected the issue.

Alex Bukach’s picture

Status: Needs review » Reviewed & tested by the community

RTBC?

DamienMcKenna’s picture

DamienMcKenna’s picture

Anyone have thoughts on the easiest way to recreate this problem, so we can add test coverage? I would not describe Commerce as an easy way of recreating it ;-)

Darren Oh’s picture

This can probably be recreated with any view. I was using a node revisions view with bulk operations and a 1 minute cache. When the view was cached, submitting a bulk operation just refreshed the page. After the cached view expired, I could submit the operation, but trying to return to the view just reloaded the operation options form.

  • DamienMcKenna committed 2cd31b1 on 7.x-3.x
    Issue #2354809 by Alex Bukach, DamienMcKenna, ofry, joelpittet, antims,...
DamienMcKenna’s picture

Status: Reviewed & tested by the community » Fixed
Parent issue: » #3304573: Plan for Views 7.x-3.27

Committed. Thanks everyone.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.