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.
Comment | File | Size | Author |
---|---|---|---|
#5 | views-form-caching-2354809-5-D7.patch | 859 bytes | Alex Bukach |
|
Comments
Comment #1
ofry CreditAttribution: ofry commentedComment #2
Alex Bukach CreditAttribution: Alex Bukach commentedSome 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.
Comment #3
joelpittetAlways fix against the dev branch
Comment #4
Alex Bukach CreditAttribution: Alex Bukach commentedRight @joelpittet, it was fixed so, just haven't noticed that I should have changed the version of the issue.
Comment #5
Alex Bukach CreditAttribution: Alex Bukach commentedUpdated patch.
Comment #6
antims CreditAttribution: antims commentedThis patch works for Views content cache module. Thanks.
Comment #7
Miguel Andrade CreditAttribution: Miguel Andrade commentedpatch #5 worked for views_send
Thanks!
Comment #8
GuyPaddock CreditAttribution: GuyPaddock at Inveniem commentedThis 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.
Comment #9
Alex Bukach CreditAttribution: Alex Bukach commentedRTBC?
Comment #10
DamienMcKennaComment #11
DamienMcKennaAnyone 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 ;-)
Comment #12
Darren OhThis 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.
Comment #14
DamienMcKennaCommitted. Thanks everyone.