-
Notifications
You must be signed in to change notification settings - Fork 92
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
Wordpress crashes on set up. "There has been a critical error on this website." #900
Comments
I successfully got WordPress running by modifying the following lines of code. However, this change disrupted the functionality of Auth0. Now, users can log in but are unable to log out, and their sessions never expire. --- /opt/bitnami/wordpress/wp-content/plugins/vendor/auth0/wordpress/src/Cache/WpObjectCachePool_ORIGINAL.php
+++ /opt/bitnami/wordpress/wp-content/plugins/vendor/auth0/wordpress/src/Cache/WpObjectCachePool_MY_CHANGES.php
@@ -59,7 +59,7 @@
return $success;
}
- public function deleteItem(string $key): bool
+ public function deleteItem($key): bool
{
return $this->wpDeleteItem($key);
}
@@ -77,7 +77,7 @@
return $deleted;
}
- public function getItem(string $key): CacheItemInterface
+ public function getItem($key): CacheItemInterface
{
return $this->wpGetItem($key);
}
@@ -104,7 +104,7 @@
return $items;
}
- public function hasItem(string $key): bool
+ public function hasItem($key): bool
{
return $this->getItem($key)
->isHit(); |
It appears that the issue arises because another plugin also utilizes a PSR. Deactivating the conflicting plugin resolves the following error: "PHP Fatal error: Declaration of Auth0\WordPress\Cache\WpObjectCachePool::hasItem(string $key): bool must be compatible with Psr\Cache\CacheItemPoolInterface::hasItem($key) in /bitnami/wordpress/wp-content/plugins/vendor/auth0/wordpress/src/Cache/WpObjectCachePool.php on line 107." However, after deactivation, the site is experiencing further issues. Users are unable to log out, Elementor is non-functional, sessions do not expire, and each time I attempt to deactivate a plugin, I receive the error message: "The link you followed has expired." This problem is likely related to cookies or caching. |
Hi @serance 👋 Unfortunately, this is a common occurrence with Composer dependencies. As you identified, you're seeing another plugin in your install that requires an old version of the PSR-6 specification (either v1 or v2), while our plugin supports v3, which introduced type-hinting. This is not a unique problem for our plugin and is not something we can address. We cannot relax our version constraint on the dependency, and doing so would simply be kicking the proverbial can down the road for yet other plugins. The conflicting plugin you identified must update its PSR-6 dependency to avoid creating these kinds of conflicts. Your follow-up question is welcome. Please feel free to create a new issue around it and provide any additional details you can to help us troubleshoot together. |
Checklist
Description
WordPress crashes, displaying the message:
"There has been a critical error on this website."
In the logs, I found the following error:
Reproduction
I am installing Auth0 v5 on Bitnami WordPress.
I cd into
/opt/bitnami/wordpress/wp-content/plugins
then I run:
Additional Context
No response
wp-auth0 version
WordPress version
6.5.3
PHP version
8.2.13
The text was updated successfully, but these errors were encountered: