Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

`onShutdown` not firing

Started by Muut Archive 10 years ago · 4 replies · 402 views
10 years ago

No matter how I modify my debugger settings, I can't get onShutdown to fire. Is there something else that might keep onShutdown from working? I'm confused.

10 years ago

It's not firing in the Precache plugin either, so something wider is happening. Hrm...

10 years ago

@Perlkönig it is fired. But this special event isn't accessible via the debugger as it fires after the connection between the client and the server has been closed.

10 years ago

So you're saying that I can't dump() from it? OK. I'll move forward and test differently. Thanks!

10 years ago

Yes, you can't dump your variables to the browser, but it's possible to dump variables, e.g., to the log file or to every other file in the file system.

The best way is to develop code in the onPageInitialized event first and then move it to the onShutdown event. The purpose of the onShutdown event is to provide a way to perform computational tasks etc.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1359 9 years ago
Archive · by Muut Archive, 9 years ago
2 936 9 years ago
Archive · by Muut Archive, 9 years ago
2 4066 9 years ago
Archive · by Muut Archive, 9 years ago
1 2955 9 years ago
Archive · by Muut Archive, 9 years ago
3 1121 9 years ago