- ๐บ๐ธUnited States DamienMcKenna NH, USA
Has anyone confirmed for certain that the problem is only from http.response.debug_cacheability_headers:true and that the other developer settings aren't also interfering? If so, it might be possible for Entity Reference Revision or Paragraphs to work around this setting, or at least display a warning that it's set.
- ๐ณ๐ฑNetherlands zebda
Same problem here, unfortunately removing or changing the code doesn't work for me.
http.response.debug_cacheability_headers: true
Any suggestions on how to solve this? - ๐บ๐ธUnited States DamienMcKenna NH, USA
FWIW once you set http.response.debug_cacheability_headers to "false", or remove the line from all services.yml files loaded on the site, you have to rebuild the caches in order for Drupal to pick up the changed value.
- ๐ณ๐ฑNetherlands zebda
Thanks for the reply, I found out my problem was because of an infinite loop.
To reproduce:
- Add one paragraph
- Add a field to add a nested paragraph
- On node level add a paragraphs field
Because there is one paragraph this is added by default and because the paragraph has a nested paragraph it keeps adding paragraphs till a 500 error occurs. So if this is your setup make sure the paragraph is not added by default.
- ๐บ๐ธUnited States aaronelborg
Has anyone confirmed for certain that the problem is only from http.response.debug_cacheability_headers:true and that the other developer settings aren't also interfering?
I can confirm that the http.response.debug_cacheability_headers setting is indeed what's causing the issue for me. Never ran into this before today.
To trigger the issue, I added a boolean field to one paragraph and all was well. However if I added that same field (e.g. reused the field) to another paragraph that appears within a 'field_flexible_content' field (which is a entity_reference_revision field), I got the whitescreen/500 error. Both paragraphs are nested within the same node and both have content, fwiw.
This is my development.services.yml:
# Local development services. # # To activate this feature, follow the instructions at the top of the # โexample.settings.local.phpโ file, which sits next to this file. parameters: http.response.debug_cacheability_headers: false #<-when this is true i get a whitescreen/500 error on node/edit twig.config: # Twig debugging: # # When debugging is enabled: # - The markup of each Twig template is surrounded by HTML comments that # contain theming information, such as template file name suggestions. # - Note that this debugging markup will cause automated tests that directly # check rendered HTML to fail. When running automated tests, โdebugโ # should be set to FALSE. # - The dump() function can be used in Twig templates to output information # about template variables. # - Twig templates are automatically recompiled whenever the source code # changes (see auto_reload below). # # For more information about debugging Twig templates, see # https://www.drupal.org/node/1906392. # # Not recommended in production environments # @default false debug: true # Twig auto-reload: # # Automatically recompile Twig templates whenever the source code changes. # If you donโt provide a value for auto_reload, it will be determined # based on the value of debug. # # Not recommended in production environments # @default null auto_reload: null # Twig cache: # # By default, Twig templates will be compiled and stored in the filesystem # to increase performance. Disabling the Twig cache will recompile the # templates from source each time they are used. In most cases the # auto_reload setting above should be enabled rather than disabling the # Twig cache. # # Not recommended in production environments # @default true cache: false services: cache.backend.null: class: Drupal\Core\Cache\NullBackendFactory
- ๐บ๐ธUnited States aaronelborg
Interesting...
I had to add that reused field to yet another paragraph (so now 3 paragraphs have that field). Truth be told, I need to add it to at least 4 more.
After adding it to the 3rd one, the 500 error is back on node/edit regardless of the http.response.debug_cacheability_headers setting (true or false).