- πΈπ¬Singapore anish.a Singapore
I am not able to reproduce this issue. Can you tell me how to reproduce this issue in a fresh installation?
- π·πΊRussia mr.pomelov
Confirm, D9.5.9 php 8.1.17
"PHP Fatal error: ob_get_clean(): Cannot use output buffering in output buffering display handlers in /var/www/chel-dpsh.ru/data/www/-----/vendor/twig/twig/src/Template.php on line 399"
I get this error on the page created by the views module. I display teasers of materials on the page, in the template of which I actively use the capabilities of the Twig Tweak module. In my case, the problem was in this module. In the module file TwigTweakExtension.php there really is an ob_end_clean();
To solve the problem:
- I applied a patch: https://gist.github.com/omahm/fadf6491c33487ddce54c43b9eb2c3a0#file-ob_g...
- Also increased the memory_limit value in php.ini from 128 to 1024
- π¦πΉAustria maxilein
Moving here, since it seems the problem seems to be with twig tweak and only triggered by fast permission administration (with a lot of modules).
See last comment, also seems to provide a solution in code. - π·πΊRussia Chi
ob_end_clean()
is only used by PHP filter. Have you enabled this filter? - π¦πΉAustria maxilein
I have not installed https://www.drupal.org/project/php β . It is not even on the site.
Is it possible that any other module uses/brings a php filter?
- π·πΊRussia Chi
Twig Tweak does have PHP filter. But it needs to be enabled in your settings.php file.
- π¦πΉAustria maxilein
Sorry, what do you mean?
I don't think I have ever enabled a php in settings.phpWhat is the line I should look for?
- π·πΊRussia Chi
What is the line I should look for?
https://git.drupalcode.org/project/twig_tweak/-/blob/3.x/docs/cheat-shee...
- π·πΊRussia Chi
If you don't have PHP filter enabled then the error is unlikely related to Twig Tweak module.
- Status changed to Closed: cannot reproduce
11 months ago 9:35am 5 January 2024 - πΊπΈUnited States rimbu002
Drupal 10.1.7 and PHP 8.1.24
The error seems to be triggered by the by fast permission administration with a lot of modules permissions. Disabling the module gets rid of the error, however I need the module enabled.
Unfortunately the patch from #6 didn't apply, although I don't see any conflicts. Anything else I could try? - π³π±Netherlands borisr
Following up on #17. In my case, the issue seems more a memory issue than a Twig Tweak related issue. The issue occurs when working with limited memory and a lot of nester entity references.