Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load plugin on plugins_loaded instead of init. #16

Open
xlplugins opened this issue Mar 28, 2018 · 3 comments
Open

Load plugin on plugins_loaded instead of init. #16

xlplugins opened this issue Mar 28, 2018 · 3 comments
Labels

Comments

@xlplugins
Copy link

Hi,

We are getting into some cases where PHP console is failed to collect the errors.
It is even throwing undefined PC class error if used as an open statement (without any callbacks) or any hook above 'init'.

I think it's better to move it on plugins_loaded with priority in negative as it might catch errors that cause during loading of plugins/themes.
What do you think?

@unfulvio
Copy link
Owner

unfulvio commented Apr 6, 2018

Hey there,

I'm not sure about this error. Normally plugins are expected to initialize at 'init' level or later. WP PHP Console tries to be the first by setting -100 in priority when hooking there.

WordPress PHP Console wouldn't catch WordPress errors occurring before this time (including if you have a PHP compilation error or a server error) as it's generally meant for WordPress plugins and theme development and not so much as high level WordPress core development.

I'm not keen on changing this as I fear this might reintroduce this other more annoying issue: #13

Are you sure it may not depend on some host factor? If you are sure the problem solves for you when changing the init time, perhaps you could do so by manually editing the plugin. After all it is not updated very often since there's no need to and it's rather stable at the moment.

I'll keep this issue open in case someone else is interested.

Cheers!

@unfulvio
Copy link
Owner

While I could not replicate this yet, a new version of the tool has been released (v1.5.3) today, with some changes that may be relevant to OP.

I am going to keep this open for the time being, feedback is always welcome.

@unfulvio
Copy link
Owner

Is the issue still persisting on newer versions? (1.5.4)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants