Closed (fixed)
Project:
Drupal core
Version:
11.x-dev
Component:
node system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
20 Aug 2015 at 13:01 UTC
Updated:
20 May 2025 at 10:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
jeremy commentedThis patch removes
src/PageCache/DenyNodePreview.php, the reference innode.services.yml, and adds ano_cache: TRUEinnode.routing.yml. There are no functional or API changes, this is just a simplification patch.Comment #5
wim leersYay, less code! :)
The solution here should work, but setting
max-age = 0on the controller won't work until #2352009: Bubbling of elements' max-age to the page's headers and the page cache lands.So, +1 to the solution proposed here.
DrupalCI is green, but
DenyNodePreviewTestinstantiatesDenyNodePreview. Since that's removed, I'd expect both DrupalCI & classic testbot to come back red. Re-tested both.This patch should also remove
DenyNodePreviewTest, and add an integration test instead.Comment #7
jeremy commentedRemoving
DenyNodePreviewTestfor now. Still needs a replacement test.Comment #8
wim leersComment #9
dawehnerWe already have test coverage for 'no_cache' in general so I don't think we actually need test coverage here. Its almost like testing '_title' explicitly.
Comment #10
bdragon commentedActually, it appears we DON'T have test coverage.
Also, DenyPrivateImageStyleDownload that DenyNodePreview was based on is ALSO redundant when we have no_cache.
Comment #11
bdragon commentedUpdated patch implementing an actual test for the no_cache option, removing comment copypasto referring to node, and removing DenyPrivateImageStyleDownload as well.
Comment #12
bdragon commenteds/response/policy/
Comment #13
bdragon commentedNote to self: Remember to rerun test after renaming test.
Comment #18
duaelfrPatch rerolled against 8.4.x
Comment #19
duaelfrComment #29
mstrelan commentedI think we'll need to deprecate the services, and remove in 10.x
Comment #30
kim.pepperReviewed this as part of the Bug Smash Initiative. Looks like an improvement task, rather than a bug.
Comment #31
kim.pepperComment #32
mstrelan commentedComment #33
quietone commentedUn-assigning because bdragon has not worked on this in 6 years.
Comment #34
ravi.shankar commentedAdded reroll of patch #18 on Drupal 9.4.x.
Comment #40
acbramley commentedRolled into an MR, re #29 these services were marked as private so I don't think we need to do a deprecation dance here?
Comment #41
acbramley commentedComment #42
mstrelan commentedLet's update the issue summary to also mention the entity.image.preview route. I agree with #40, no need to deprecate.
Comment #43
acbramley commentedDone
Comment #44
acbramley commentedComment #45
mstrelan commentedLooks great
Comment #47
catchNice find. Committed/pushed to 11.x, thanks!