Closed mattss closed 9 years ago
I have no idea how to fix this.
It's a problem that scales are being generated when you just need a url for a scale. If we're going to lazy load scales, it should be done on the request of the scale.
It's a problem that scales are being generated when you just need a url for a scale.
We do this so that the scale has a unique URL which can be cached forever.
The issue is not really about image scales - that was just an example of a common write-on-read operation. The only way I've found to deal with this is by patching in plone.subrequest to pass the interface marker up once the subrequest is complete. I've raised the same ticket in plone.subrequest as I'm not sure what the best fix is.
This has been fixed in latest plone.subrequest.
If I mark the request with IDisableCSRFProtection during a plone.subrequest, this interface is applied only to the subrequest itself, and not the parent. This makes it impossible to disable CSRF protection inside tile code.
This is causing me specific issues using plone.app.imaging scales inside a tile, as the scales are generated when the tile is rendered, and then CSRF auto-protect blocks the main page request.