- Merge request !7Issue #3137890: Call to a member function label() on null β (Merged) created by IT-Cru
- πΊπΈUnited States dave reid Nebraska USA
Should access tokens automatically get deleted when the host entity is deleted? Maybe we're missing that link?
- πΊπΈUnited States dave reid Nebraska USA
I would probably prefer to see "Deleted" instead of nothing.
- Issue was unassigned.
- π©πͺGermany IT-Cru Munich
@Dave Reid: There is already a hook_entity_delete() implemented since 5 years in the module. So normally all access tokens should be deleted, when a host entity gets deleted.
/** * Implements hook_entity_delete(). */ function access_unpublished_entity_delete(EntityInterface $entity) { /** @var \Drupal\access_unpublished\AccessTokenManager $tokenManager */ $tokenManager = \Drupal::service('access_unpublished.access_token_manager'); foreach ($tokenManager->getAccessTokensByEntity($entity) as $token) { $token->delete(); } }
-
chr.fritsch β
committed 0bb0195e on 8.x-1.x authored by
it-cru β
Issue #3137890 by joseph.olstad: Call to a member function label() on...
-
chr.fritsch β
committed 0bb0195e on 8.x-1.x authored by
it-cru β
- Status changed to Fixed
26 days ago 8:00am 20 August 2025 - π©πͺGermany chr.fritsch π©πͺπͺπΊπ
We are using this patch for month in production and don't have any issues. Could not harm to add it.
Automatically closed - issue fixed for 2 weeks with no activity.