Problem/Motivation

Trying to slim down TrashStorageTrait to only the parts that can not be done differently, with the end goal of not generating PHP classes anymore.

Issue fork trash-3569155

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

amateescu created an issue. See original summary.

  • amateescu committed 2986428f on 3.1.x
    task: #3569155 Refactor TrashStorageTrait::setPersistentCache
    
    By:...
amateescu’s picture

Status: Active » Fixed

Merged.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • amateescu committed a7071f21 on 3.1.x authored by twod
    task: #3569155 followup - Added missing reset() method.
    

  • amateescu committed 8b77ee4a on 3.x authored by twod
    task: #3569155 followup - Added missing reset() method.
    

  • amateescu committed dc6748ae on 3.x
    task: #3569155 Refactor TrashStorageTrait::setPersistentCache
    
    By:...
codebymikey’s picture

Priority: Normal » Major
Status: Fixed » Needs work

I believe this change breaks installation of the module on the UI for me. It seems to work fine via Drush though.

This is the stacktrace when trying to install on the Umami demo profile:

The website encountered an unexpected error. Try again later.
Error: Call to undefined function Drupal\trash\Cache\trash_entity_is_deleted() in Drupal\trash\Cache\TrashEntityMemoryCacheBackend->set() (line 34 of /var/www/html/repos/trash/src/Cache/TrashCacheBackendTrait.php).

Drupal\trash\Cache\TrashEntityMemoryCacheBackend->set() (Line: 203)
Drupal\Core\Entity\EntityStorageBase->setStaticCache() (Line: 1373)
Drupal\Core\Entity\ContentEntityStorageBase->setStaticCache() (Line: 351)
Drupal\Core\Entity\EntityStorageBase->loadMultiple() (Line: 267)
Drupal\Core\Entity\EntityStorageBase->load() (Line: 216)
Drupal\Core\Session\AccountProxy->loadUserEntity() (Line: 77)
Drupal\Core\Session\AccountProxy->getAccount() (Line: 98)
Drupal\Core\Session\AccountProxy->getRoles() (Line: 118)
Drupal\locale\LocaleLookup->getCid() (Line: 326)
Drupal\Core\Cache\CacheCollector->lazyLoadCache() (Line: 144)
Drupal\Core\Cache\CacheCollector->get() (Line: 123)
Drupal\locale\LocaleTranslation->getStringTranslation() (Line: 92)
Drupal\Core\StringTranslation\TranslationManager->getStringTranslation() (Line: 141)
Drupal\Core\StringTranslation\TranslationManager->doTranslate() (Line: 113)
Drupal\Core\StringTranslation\TranslationManager->translateString() (Line: 190)
Drupal\Core\StringTranslation\TranslatableMarkup->render() (Line: 15)
Drupal\Core\StringTranslation\TranslatableMarkup->__toString() (Line: 131)
Drupal\Core\EventSubscriber\FinalExceptionSubscriber->onException() (Line: 246)
Symfony\Component\EventDispatcher\EventDispatcher::Symfony\Component\EventDispatcher\{closure}() (Line: 206)
Symfony\Component\EventDispatcher\EventDispatcher->callListeners() (Line: 56)
Symfony\Component\EventDispatcher\EventDispatcher->dispatch() (Line: 241)
Symfony\Component\HttpKernel\HttpKernel->handleThrowable() (Line: 91)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 118)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 92)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 53)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 54)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 745)
Drupal\Core\DrupalKernel->handle() (Line: 19)

amateescu’s picture

Yup, I can reproduce that. We'll probably have to inline that function there.. I'll check quickly.

amateescu changed the visibility of the branch 3569155-refactor-cache-handling to hidden.

amateescu changed the visibility of the branch 3569155-refactor-cache-handling to active.

amateescu’s picture

Status: Needs work » Fixed

Back to fixed, thanks for spotting this!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.