1
votes

I have strange error on activate my own plugin for WordPress.

On activate plugin I get only message "Plugin could not be activated because it triggered a fatal error." And that's all (see http://prntscr.com/snxdkw ). I don't get more errors, after enable debug mode I get only errors with level E_NOTICE, that's no critical.

That error showing only on live server, locally all ok. Googling has no effects

Local:
PHP: 7.3.16
WordPress: 5.4.1

Server:
PHP: 7.3.16
WordPress: 5.4.1

I tried:

  1. Enabled debug log on local and server (result: no critical errors)
  2. Fixed all errors
  3. Reactivate plugin on my local WordPress (result: locally no same error)
  4. Looked in PHP log on server (result: no critical errors)
  5. Tryed follow from error message to error handler in WP core for understanding error initiator (result: not found error initiator)
  6. Wrote debug messages to debug.log in register_activation_hook and register_deactivation_hook (result: I don't get my debug messages, I think WordPress doesn't reach to register_activation_hook() )
2

2 Answers

0
votes

Check the php extensions you have enabled locally with on the server. Also you may look at the permissions. If you are using ffmpeg or other extension which might be not available at your server if its(shared one).

This may due to following:

  1. Bad Coding
  2. Conflict with WordPress
  3. Conflict with Another Plugin
  4. Conflict with Your Theme So you have to check about the possible cause of failure.
0
votes

Problem was resolved.

json_decode() gave null as result, but this data put on function with array type variable. I don't know why PHP didn't give any errors.

Problem solved via inline checking lines step-by-step.