- πΊπΈUnited States dcam
I verified that this is still an issue. The steps to reproduce it worked for me.
- πΊπΈUnited States dcam
This test demonstrates the bug by requesting
/aggregator
, updating feed items, then requesting/aggregator
again. The test fails correctly on my local.Unfortunately, the test is no good because I think it will invalidate the assertions that follow it. Those assertions were added by #3272873: Adjust title β and they depend on the page not being cached. They were a problem for getting a failing test though. Requesting
/aggregator?page=2
causes/aggregator
to start working properly. I don't know enough to understand why that was happening, but I assume that requesting a different page's context somehow cleared the first page's context too. As a result, it took me a while just to get a failing test. I haven't figured out if the tests for both issues can go into the same method yet. Maybe if I delete all the items and then re-update the feed... - Status changed to Needs review
over 1 year ago 12:47am 17 May 2023 - last update
over 1 year ago 142 pass, 2 fail The last submitted patch, 6: 3214630-6-test-only.patch, failed testing. View results β
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.- last update
over 1 year ago 142 pass, 2 fail - πΊπΈUnited States dcam
Nevermind. This was easy to solve. All it needs is a cache clear before the next assertion. I verified that the cache context assertion is still working properly by undoing the fix from #3273873: Aggregator page contents could be empty due to missing cache context β and testing it locally. It failed just like it's supposed to. Here's a good failing test.
The last submitted patch, 9: 3214630-9-test-only.patch, failed testing. View results β
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.- last update
over 1 year ago 144 pass - π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
I'm hoping to review this tomorrow
- Status changed to Needs work
over 1 year ago 6:58pm 18 May 2023 - π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
+++ b/tests/src/Functional/AggregatorRenderingTest.php @@ -96,9 +96,20 @@ class AggregatorRenderingTest extends AggregatorTestBase { + // Clear the cache so that the paginated cache context can be tested. + drupal_flush_all_caches();
Instead of this, we *should* be able to just call $feed->save(), because the Aggregator item includes 'aggregator_feed_list' in its cache tags, saving a feed should invalidate the render cache.
Using drupal_flush_all_caches feels wrong, because effectively we're saying 'if we clear all caches does the correct thing show' which we know is the case. I think we want to instead test that saving a feed invalidates the listing.
- Status changed to Needs review
over 1 year ago 7:19pm 18 May 2023 - last update
over 1 year ago 144 pass -
larowlan β
committed 53e6182e on 2.x authored by
dcam β
Issue #3214630 by dcam, larowlan: Invalidate /aggregator page cache when...
-
larowlan β
committed 53e6182e on 2.x authored by
dcam β
- Status changed to Fixed
over 1 year ago 11:44pm 18 May 2023 - π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
Looks good to me - thanks!
I'll cut a new release
- Status changed to Active
over 1 year ago 2:06pm 29 May 2023 - πΊπΈUnited States dcam
This can apply to the 1.x branch too. I just haven't fixed its tests yet. We could apply the patch without fixing the tests first. I ran them locally without and with the fix and got the same results that I did for the 2.x branch. But I was trying to do things properly.
- π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
Yeah fine to backport we know tests on 1.x are in a bad place
- last update
over 1 year ago 144 pass - Status changed to Fixed
over 1 year ago 8:19pm 30 June 2023 - Status changed to Active
over 1 year ago 2:52am 1 July 2023 - πΊπΈUnited States dcam
This has been committed to contrib Aggregator. The patch in #14 can be rerolled for core, if anyone cares to do it.
- First commit to issue fork.
- last update
over 1 year ago 30,341 pass - @rpayanm opened merge request.
- Status changed to Needs review
over 1 year ago 7:09pm 4 July 2023 - Status changed to RTBC
over 1 year ago 8:19pm 4 July 2023 - πΊπΈUnited States darren oh Lakeland, Florida
Verified on Drupal 9.5. Thank you!
- π¬π§United Kingdom longwave UK
9.5 has perhaps seen its last bug fix release already, but for posterity let's get this in anyway.
Committed and pushed 3892aea923 to 9.5.x. Thanks!
- Status changed to Fixed
over 1 year ago 10:22pm 5 July 2023 -
longwave β
committed 16e2b64f on 9.5.x
Issue #3214630 by dcam, rpayanm, larowlan, Darren Oh: Invalidate /...
-
longwave β
committed 16e2b64f on 9.5.x
Automatically closed - issue fixed for 2 weeks with no activity.