Plugin Author
Meitar
(@meitar)
:/ Not sure. What do your WordPress logs show?
There is the following error:
PHP Fatal error: Cannot redeclare class NumberFormatter in /home/ringuett/public_html/wp-content/plugins/inline-google-spreadsheet-viewer/lib/visformat.php on line 20
It might looks like a conflict with another plugin. If this can help, it works when the file is on Google Drive. It fails only with the file on Dropbox and on my shared hosting.
Plugin Author
Meitar
(@meitar)
Yeah, that’s a plugin conflict.
I’m not sure about that, because the local development environment is exactly the same as prod environment, with the same theme and plugins.
And if it was realy a conflict, how could I prevent this from happening.
Plugin Author
Meitar
(@meitar)
I’m not sure about that, because the local development environment is exactly the same as prod environment, with the same theme and plugins.
If your site is behaving differently between different environments, then by definition your environments are not “exactly the same.”
A “PHP Fatal error: Cannot redeclare class” error means that there was a previously-loaded class in the same namespace as the class attempting to be loaded. If this is happening in your prod environment but not your dev environment, then your prod environment is loading a class that you may not be aware of.
The way to resolve this conflict is to figure out what that is, and determine whether or not you need that other NumberFormatter class. Note that plugins that are not “activated” are still loaded by WordPress. Your prod and dev environment may also have different php.ini runtime configuration directives set, notably with different include_paths.
The point is, the environments are not the same. If they were the same, they would behave identically, because computers are deterministic.
For your information, I finaly found what was the conflict. It was the NumberFormatter class of the PHP Internationalization package. I deactivated this package from my prod environment and now it works. Probably that it was the same problem described in this post.
For your information, I finaly found what was the conflict. It was the NumberFormatter class of the PHP Internationalization package. I deactivated this package from my prod environment and now it works. Probably that it was the same problem described in this post.