When enabling the webprofiler, I get a 404 at the bottom of my pages. Upon looking in the php error log, I see that something is trying to call a ::destruct method.
This is with drupal 8.3.1
This may not be the correct solution, but adding this code to the bottom of "devel/webprofiler/src/State/StateWrapper.php" fixed my issue and the bar started working (mostly, it still doesn't always load and doesn't work for anon users when giving that perm, but I see other bugs have been logged for that).
diff --git a/docroot/modules/contrib/devel/webprofiler/src/State/StateWrapper.php b/docroot/modules/contrib/devel/webprofiler/src/State/StateWrapper.php
index f42e66f..f2aa45d 100644
--- a/docroot/modules/contrib/devel/webprofiler/src/State/StateWrapper.php
+++ b/docroot/modules/contrib/devel/webprofiler/src/State/StateWrapper.php
@@ -107,4 +107,7 @@ public function __call($method, $args) {
return call_user_func_array([$this->state, $method], $args);
}
+ public function destruct() {
+ return true;
+ }
}
I am attaching a link to a video in the comments as I think my issues might be getting marked as spam, as I submitted the issue last week but it seems to have vanished.
Comment | File | Size | Author |
---|---|---|---|
#5 | destruct_method-2887471-5.patch | 1018 bytes | lussoluca |
| |||
#4 | destruct_method-2887471.patch | 413 bytes | kylesloan2 |
|
Comments
Comment #2
kylesloan2 CreditAttribution: kylesloan2 commentedLink to video showing broken action: https://www.youtube.com/watch?v=X2Ip_gDoSvQ&t=1s
Comment #3
kylesloan2 CreditAttribution: kylesloan2 commentedYes it seems to not want to let me post the link to the video... anyway not much to see other then what I described.
Comment #4
kylesloan2 CreditAttribution: kylesloan2 commentedComment #5
lussolucaCould you please try with this patch
Comment #6
kylesloan2 CreditAttribution: kylesloan2 commentedSorry for the delay, I didn't see the new patch until now. Yes, from my testing, destruct_method-2887471-5.patch makes webprofiler work out of the box for me.
Comment #7
kylesloan2 CreditAttribution: kylesloan2 commentedComment #9
lussolucaCommitted and pushed to 8.x-1.x
Thanks!
Comment #10
lussolucaComment #11
selinav CreditAttribution: selinav commentedI have no error with the patch #5 but the display bar doesn't appears.
Comment #12
lussolucaHi selinav,
could you provide us more details?
Do you notice some javascript errors?
Comment #13
selinav CreditAttribution: selinav commentedJs message error get with firebug :
Comment #14
lussolucaAnd if you go to http://localhost/drupalsymfony/fr/profiler/31c748 do you have any errors in page?
Comment #15
selinav CreditAttribution: selinav commentedFatal error: Call to undefined method Symfony\Component\EventDispatcher\Debug\WrappedListener::getSubscribedEvents() in C:\wamp64\www\drupalsymfony\modules\webprofiler\src\DataCollector\EventsDataCollector.php on line 52
Comment #16
lussolucaWhich version of webprofiler are you using?
From your path (C:\wamp64\www\drupalsymfony\modules\webprofiler) it seems that you are using the old standalone webprofiler. Now webprofiler is part of Devel and the path should be something like C:\wamp64\www\drupalsymfony\modules\devel\webprofiler
Try with the latest version.
Comment #17
selinav CreditAttribution: selinav commentedSorry it works now. I have installed two times webprofiler. The stand alone module and with devel.
Thanks for your reply.