- Issue created by @Janner
- π©πͺGermany jurgenhaas Gottmadingen
Hmm, looks like not all cache backends implement
invalidateTags
.What we're doing is to cache all the heavy lifting about entity types and bundles and what subscriptions they support. But we need to invalidate those caches, when any content type setting gets changed. That's why we call
$this->cacheBackend->invalidateTags(['danse.cache:' . $this->pluginId]);
So, I wonder what should be done instead, any suggestions much appreciated.
- πΊπΈUnited States rex.barkdoll
I'm also getting this when I try to update a content type or comment type. It even happens when I'm not making any DANSE-related changes, which is frustrating.
The good news is that even though the error occurs, changes do seem to be applied when you reload the page (by going to the URL bar and hitting return to force the page to that URL).
Unfortunately, I don't know enough about Drupal Caching to understand why the error is occurring or how to fix it.
- π©πͺGermany jurgenhaas Gottmadingen
I'm reaching out on Slack, maybe somebody can help us there.
-
jurgenhaas β
committed 28bb5b01 on 2.2.x
Issue #3351054: Attempting to edit a content type throws a PHP Call to...
-
jurgenhaas β
committed 28bb5b01 on 2.2.x
- π©πͺGermany jurgenhaas Gottmadingen
In the meantime, I've disabled the cache invalidation which causes the exception. That means, you won't see this error anymore. The downside is that changed DANSE settings will not be reflected for users until you flush your cache once.
- Assigned to jurgenhaas
- Status changed to Needs work
over 1 year ago 7:55am 1 April 2023 - Status changed to Needs review
over 1 year ago 9:34am 1 April 2023 - π©πͺGermany jurgenhaas Gottmadingen
Got some help on Slack. There is a cache tag invalidator service in core, that allows us to do all that regardless of the used cache backend. I've implemented that in the dev release. Please give that a try.
- π¬π§United Kingdom Janner
After updating to the latest dev release, the content type edit page no longer throws the PHP error upon saving.
However, after allowing subscription for content type (in this case it was for the publish and comment events), navigating to an existing node of that content type now throws the following PHP error:
LogicException: The database connection is not serializable. This probably means you are serializing an object that has an indirect reference to the database connection. Adjust your code so that is not necessary. Alternatively, look at DependencySerializationTrait as a temporary solution. in Drupal\Core\Database\Connection->__sleep() (line 2042 of /public_html/core/lib/Drupal/Core/Database/Connection.php).
Since updating I have run drush updated and cleared the cache several times. The error persists.
- π©πͺGermany jurgenhaas Gottmadingen
The second error sounds like this one: π LogicException: The database connection is not serializable. Fixed
Can you confirm, that you see the same stack trace there?
- π¬π§United Kingdom Janner
It is indeed the same.
I had not encountered this issue prior to the latest dev release.
However, I've only been performing some very limited testing of this module to date. Consequently, it may have been present or present in different places, but my testing hasn't triggered it before now.
-
jurgenhaas β
committed f5de3cb4 on 2.2.x
Issue #3351054: Attempting to edit a content type throws a PHP Call to...
-
jurgenhaas β
committed f5de3cb4 on 2.2.x
- π©πͺGermany jurgenhaas Gottmadingen
@Janner I think we should be able to set this one to RTBC, can't we? And with regard to the other error, please have a look at the other issue and if that's RTBC'd as well, we can publish another release.
- Issue was unassigned.
- Status changed to RTBC
over 1 year ago 10:51am 2 April 2023 - Status changed to Fixed
over 1 year ago 11:04am 2 April 2023 - πΊπΈUnited States rex.barkdoll
Also confirming that the error is gone on my end. Thank you for all your hard work on this. :)
- Status changed to Fixed
over 1 year ago 3:34pm 18 April 2023 Automatically closed - issue fixed for 2 weeks with no activity.