1

this is my first Drupal installation (I'm a symfony dev) and I've spent several hours trying to get dump() working. However it just causes a WSOD.

Maybe related: I'm unable to install kint, there's issues with it now being a sub-module of devel and I haven't been able to install it.

Settings:

  • Drupal version 8.9.1
  • memory limit set to 6,000mb
  • execution time set to 90 seconds
  • Windows
  • acquia dev desktop
  • php 7.3.15
  • Apache/2.4.33 (Win64) OpenSSL/1.1.0h mod_fcgid/2.3.9

If anyone has suggestions I'm keen to hear it! Drupal is quite interesting from what I've seen so far. It's been a bit frustrating as someone new to Drupal, trying to get basic things working.

== Update ==

I have corrected a config error I made while configuring the site. See here (for correct config).

Calls to dump() (in twig) for null variables work, but {{ dump(items) }} will hang and then result in a 500 error (see link above).

3
  • 2
    How about enabling the error reporting rather than staring at a WSOD page? Add to /sites/default/settings.php $config['system.logging']['error_level'] = 'verbose'; and you'll be able to see the actual error. Commented Aug 16, 2020 at 4:17
  • 2
    Also, to be able to dump stuff on twig, you need to enable Twig Debugging. Commented Aug 16, 2020 at 4:19
  • Update is most likely due to this, Twig dump crashes site/server with out of memory. Use Kint instead and lower the kint recursion Commented Aug 17, 2020 at 8:53

1 Answer 1

1

I've solved this.

In Drupal, modules also use composer (which I wasn't aware of). The vardumper module depends on the symfony/var-dumper package.

Running:

composer require --dev symfony/var-dumper

causes dependency conflicts, however using:

composer update

Will install the var-dumper package, fix the problem - now I can see very beautiful variable dumps.

Lesson learnt:

  • Always check composer for dependency errors.
1
  • I've had a similar issue but I did it with composer update drupal/core ---with-dependencies (should install correct symfony/var-dumper unless you manually did it in composer.lock) Commented Aug 23, 2020 at 9:56

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.