Hi,

If I enable the webprofiler, it destroys my site. I get

The website encountered an unexpected error. Please try again later.

on every page. I also cannot disable it by Drush. The log entries when I want to disable devel then:

peter@computer ~/php-framework-evaluation/d8 $ drush dis devel -y
[error] Drupal 8 does not support disabling modules. Use pm-uninstall instead.
[error] Error: Call to undefined method Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher::getListenerPriority() in Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->getListenerPriority() (line 107 of /home/peter/php-framework-evaluation/d8/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php).
Error: Call to undefined method Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher::getListenerPriority() in /home/peter/php-framework-evaluation/d8/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php on line 107
Error: Call to undefined method Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher::getListenerPriority() in Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->getListenerPriority() (line 107 of /home/peter/php-framework-evaluation/d8/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php).
[error] Drush command terminated abnormally due to an unrecoverable error.
peter@computer ~/php-framework-evaluation/d8 $

The logs after webprofiler was enabled:

[Thu Jul 21 18:24:12.942747 2016] [:error] [pid 8797] [client 127.0.0.1:57554] Error: Call to undefined method Drupal\\Component\\EventDispatcher\\ContainerAwareEventDispatcher::getListenerPriority() in /home/peter/php-framework-evaluation/d8/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php on line 107
[Thu Jul 21 18:24:15.412171 2016] [:error] [pid 8613] [client 127.0.0.1:57556] Error: Call to undefined method Drupal\\Component\\EventDispatcher\\ContainerAwareEventDispatcher::getListenerPriority() in /home/peter/php-framework-evaluation/d8/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php on line 107

CommentFileSizeAuthor
#8 webprofiler-shortcut-error.png107.04 KBsdstyles
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jepSter created an issue. See original summary.

lussoluca’s picture

Hi jepSter,
which version of Drupal core and Devel are you using?

Peter Majmesku’s picture

Drupal: 8.17 - the latest stable one
Devel: 8.x-1.0-alpha1

DamienMcKenna’s picture

I'm seeing this on an 8.2.x git checkout with Devel also checked out from git. I also see these:

Warning: uasort(): Array was modified by the user comparison function in Drupal\shortcut\Entity\ShortcutSet->getShortcuts() (line 120 of core/modules/shortcut/src/Entity/ShortcutSet.php).

and:

Twig_Sandbox_SecurityError: Calling "renderblock" method on a "__TwigTemplate_db3823f98d0cb47065ec9dea729df42260bf9279633d65f5e69d476584e35f84" object is not allowed in "modules/contrib/webprofiler/templates/Profiler/webprofiler_toolbar.html.twig" at line 31. in Drupal\Core\Template\TwigSandboxPolicy->checkMethodAllowed() (line 99 of core/lib/Drupal/Core/Template/TwigSandboxPolicy.php).

DamienMcKenna’s picture

FYI I was able to uninstall the module from admin/modules/uninstall.

lussoluca’s picture

Status: Active » Postponed (maintainer needs more info)

@jepSter the correct way for disabling (uninstall) a module via Drush in D8 is:

drush pm-uninstall devel -y

(also note that Webprofiler isn't Devel, it is a separate module contained into the Devel package).

The getListenerPriority() has been fixed in #2682343: Fatal error enabling web profiler on 8.1.x.

@DamienMcKenna the uasort() warning is a Core bug: #2567035: Database::startLog() cause a notice in Shortcut::sort()

I cannot reproduce the Twig error, could you provide some other info?

vkalmuk’s picture

I use Drupal 8.2.3 and drupal/devel8.x-1.0-alpha1

When I set in development.services.yml I have same error:

parameters:
  twig.config:
    #debug: true

Warning: uasort(): Array was modified by the user comparison function in Drupal\shortcut\Entity\ShortcutSet->getShortcuts() (line 120 of core/modules/shortcut/src/Entity/ShortcutSet.php).

After googling I found an interesting topic http://stackoverflow.com/questions/3235387/usort-array-was-modified-by-t...

I try to change php version from 5.6.10 to 7.0.0 message is gone (I use mamp 3.5 macOS 10.12.1 ).
It seems to me it's php bug.

sdstyles’s picture

Status: Postponed (maintainer needs more info) » Needs work
FileSize
107.04 KB

Seems error appears when you have twig debug enabled in your services.yml
I have PHP 5.6.23 and Drupal 8.2.1
error

willzyx’s picture

Status: Needs work » Postponed (maintainer needs more info)

@sdstyles the warning seems a core issue please see #2567035: Database::startLog() cause a notice in Shortcut::sort()

willzyx’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

Closing for lack of activity. Feel free to reopen if the issue still exists