Active
Project:
Paragraphs
Version:
8.x-1.12
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Feb 2021 at 14:39 UTC
Updated:
13 Jan 2026 at 04:15 UTC
Jump to comment: Most recent
I get a "500 Internal Server Error" when I try to edit oder add a node, which has a Paragraph field.
When I remove the field from "Manage form display", the error disappears - (but I cannot edit the paragraph fields).
I am not sure, when exactly the error occurs, but I think that's way to reproduce:
The error appears on add new content too.
I have no idea how to debug it?
(No errors in Drupal-Log-Files).
(Tried different PHP-Versions 7.1,7.2,7.3.,7.4)
Comments
Comment #2
Tilo Schumann commentedComment #3
Tilo Schumann commentedComment #4
johnchqueIt would be helpful if you could write about your Drupal version and the error that you must get at admin/reports/dblog
Comment #5
Tilo Schumann commentedHello johnchque,
thank you for your reply. I cannot reproduce the problem in a fresh installation. So I closed the issue and look for the solution in my installation :-/
cu
Zeg
Comment #6
Tilo Schumann commentedI can reproduce the error and have found a workaround for solving it, but I don't understand whether I touched cause or symptom.
Steps to reproduce
* create a new paragraph with a field
* add a reference-field at a content type to that paragraph
* call url node/add/my-content-type
Result is a WSOD with "500 Internal Server Error"
When I remove "http.response.debug_cacheability_headers: true" from following files the error disappears
* sites/development.service.yml
* sites/default/service.yml
I am grateful for every advice!
Comment #7
Tilo Schumann commentedComment #8
System Lord commentedZeg, had the same issue and was about to use your workaround when I noticed the comment at the top of development.service.yml: "To activate this feature, follow the instructions at the top of the 'example.settings.local.php' file, which sits next to this file." It reminded me that I enabled "settings.local.php" a while back when I began my project so that I could disable some caching systems. I just deleted settings.local and everything seems to work now. So, perhaps caching ultimately has something to do with this or there's another setting in settings.local that causes this issue. If you're not using settings.local then this is probably not a fix and I'll probably see this 500 error again. If so, I'll use your workaround.
Comment #9
weekbeforenextThe workaround worked for me.
We have a local-only services.local.yml file with twig debugging settings that can be uncommented when in use. So our services.local.yml file looks like when in use:
Within the settings.php file, there is a check to verify if this is a local environment. If so, something like this recognizes the local file:
Comment #10
damienmckennaHas 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.
Comment #11
zebda commentedSame problem here, unfortunately removing or changing the code doesn't work for me.
http.response.debug_cacheability_headers: trueAny suggestions on how to solve this?
Comment #12
damienmckennaFWIW 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.
Comment #13
zebda commentedThanks for the reply, I found out my problem was because of an infinite loop.
To reproduce:
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.
Comment #14
aaronelborg commentedI 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:
Comment #15
aaronelborg commentedInteresting...
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).
EDIT: After uninstalling pantheon_advanced_page_cache I'm back in business.
Comment #16
andycarlbergI also ran into this problem with an infinite recursion loop with a self-referencing paragraph.
Seems like there might be two issues discussed in this thread. I don't think my issue had anything to do with caching.
For me, I had a paragraph that had a paragraph field that only included the same paragraph type (to create a tree/hierarchy). Creating the default paragraph in the widget caused a loop and the process runs out of memory. It can be fixed by just not including a default paragraph form.
1. Under "Manage form display" for the paragraph type, edit the widget settings for the paragraph field.
2. Set "Default paragraph type" to. "--none--".
This is a quick workaround if you notice the issue but the error isn't obvious. It would be nice if the module identified this kind of reference cycle and did not generate a default paragraph in the field if it will cause the error.
I'm happy to come take a look at this but it will be a bit before I can dedicate time to it.
Comment #17
kenorb commentedWorkaround from above worked.
Stack trace:
Comment #18
firewaller commentedI had a 500 error when loading multiple nested paragraphs and removing `http.response.debug_cacheability_headers: true` ended up fixing this issue for me.
Edit: I'm guessing this is actually indirectly related to the quantity of cache tags being added to the page by the paragraphs since the error I was seeing in the logs were related to proxy_fcgi headers ie.
```
Premature end of script headers: index.php
AH01070: Error parsing script headers
```