Support from Acquia helps fund testing for Drupal Acquia logo

Comments

fago created an issue. See original summary.

fago’s picture

fago’s picture

This is probably mitigated by #2949457: Enhance Toolbar's subtree caching so that menu links with CSRF token do not need one subtree cache item per session - so mostly no one has a working dynamic page cache in the admin backend ;-)

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

fago’s picture

queued a test run against 8.9.x

joseph.olstad’s picture

This patch applies cleanly to Drupal 9 also

joseph.olstad’s picture

Version: 8.9.x-dev » 9.2.x-dev
joseph.olstad’s picture

Issue tags: +Needs tests

this patch is correct and definately works

jamesyao’s picture

Reviewed and tested by the community:

the patch is tested in Drupal 9.0.9. It works perfectly.

Thanks @fago for providing the patch.

jamesyao’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs tests +RTBC

the patch is tested in Drupal 9.0.9. It also works perfectly for the anonymous preview node behavior

Thanks @fago for providing the patch.

joseph.olstad’s picture

Issue tags: -RTBC

Great fix, hopefully an easy adjustment to the tests can be made to cover this.

catch’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs tests

Yes this needs some test coverage, but the change makes sense.

anmolgoyal74’s picture

Added test coverage.

anmolgoyal74’s picture

Status: Needs work » Needs review
joseph.olstad’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs tests

Thank you so much for the tests!

Patch Has tests,
RTBC, verified this ourselves, solution is working perfectly, cache is expiring as expected, automatically handled now thanks to this patch.

Was very tricky to debug this and find that we needed this fix, so I highly recommend the fix.

It should be a safe fix for 9.0, 9.1.x , 9.2.x, we've tested it extensively on 9.0.x and 8.8.x

joseph.olstad’s picture

oh one last thing, someone should upload the tests-only patch to make sure it's failing.

joseph.olstad’s picture

Great job @anmolgoyal74 and @fago for the original patch and JamesYao also for his great detective work on this.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs tests

The test alone does not fail for me.

joseph.olstad’s picture

Status: Needs work » Needs review
FileSize
1.6 KB

hmm,

Status: Needs review » Needs work

The last submitted patch, 19: 3127250-tests_only-19.patch, failed testing. View results

joseph.olstad’s picture

new patch, tests checks both title and body field.

anmolgoyal74’s picture

The test alone does not fail for me as well.

joseph.olstad’s picture

The trick to the test is we need to edit , preview, edit AGAIN, then preview, IRL without the patch the second preview shows first preview values

needs work on tests.

anmolgoyal74’s picture

I am facing this issue with an anonymous user only. And with node_test enabled, the test only patch does not fail.

The last submitted patch, 24: 3127250-24-test-only.patch, failed testing. View results

joseph.olstad’s picture

Status: Needs review » Reviewed & tested by the community

Nice work anmolgoyal74 , yes that is our use case also.

The last submitted patch, 24: 3127250-24-test-only.patch, failed testing. View results

joseph.olstad’s picture

tests only patch works, just hiding it so that it doesn't re-trigger automatically.

catch’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/modules/node/tests/src/Functional/PagePreviewTest.php
@@ -500,4 +501,28 @@ public function testSimultaneousPreview() {
 
+  /**
+   * Check that previewing a node after it has been previewed and not saved
+   * with dynamic_page_cache module enabled doesn't cache the previous changes.
+   */

This should just be one line, something like 'Tests node preview with dynamic_page_cache and anonymous users'.

ankithashetty’s picture

Status: Needs work » Needs review
FileSize
1.94 KB
642 bytes

Updated the patch in #24 with the changes suggested in #29. Thank you!

anmolgoyal74’s picture

Status: Needs review » Reviewed & tested by the community

suggestions in #29 addressed in #30.
I think it is good now for RTBC.

alexpott’s picture

Version: 9.2.x-dev » 9.1.x-dev
Status: Reviewed & tested by the community » Fixed

Committed and pushed ab9919c356 to 9.2.x and bee62f645e to 9.1.x. Thanks!

Backported to 9.1.x as a container rebuild will happen on the next 9.1.x release and that'll allow this to be fixed with no update function.

  • alexpott committed ab9919c on 9.2.x
    Issue #3127250 by anmolgoyal74, joseph.olstad, ankithashetty, fago,...

  • alexpott committed bee62f6 on 9.1.x
    Issue #3127250 by anmolgoyal74, joseph.olstad, ankithashetty, fago,...
joseph.olstad’s picture

Version: 9.1.x-dev » 9.2.x-dev
Status: Fixed » Needs review

Thanks, nice one-liner!

joseph.olstad’s picture

Status: Needs review » Fixed

My browser

joseph.olstad’s picture

Version: 9.2.x-dev » 9.1.x-dev

Status: Fixed » Closed (fixed)

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