deleting an entity reference field, used in a contextual view, makes the whole site unrecoverable

Created on 8 April 2019, over 5 years ago
Updated 24 May 2024, 6 months ago

hi there,

i am not 100% sure this is the reason for that bug , only asumptions , but here it goes.

step to reproduce :

-create a content type (research axes) with a entityreference field that reference that very same content type ( reference the parent axes )
- create a block view that display this content type with a contextual filter for that entityreference field , and a filter null on that entity referenced field . the intention here is to display all parent axes.
That works very well
- that parent axes concept being not necessary anymore, i have deleted that field .

what happens :

Error: Call to a member function getContextDefinition() on null in Drupal\views\Plugin\views\argument\ArgumentPluginBase->getContextDefinition() (line 1341 of core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php).
Drupal\views\Plugin\views\argument\ArgumentPluginBase->getContextDefinition() (Line: 117)
Drupal\views\Plugin\Derivative\ViewsBlock->getDerivativeDefinitions(Array) (Line: 101)
Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDerivatives(Array) (Line: 87)
Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDefinitions() (Line: 284)

The back office became unaccessible.
The whole site is crashed.
Cache rebuild would not do
No other options found but get a backup

what to expect:
Anything that do not crash the whole thing or better logs to figure out what's wrong

Best regards,
mathieu

🐛 Bug report
Status

Closed: cannot reproduce

Version

11.0 🔥

Component
Views 

Last updated 2 days ago

Created by

🇫🇷France matoeil

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇺🇸United States Kristen Pol Santa Cruz, CA, USA

    As part of the Bug Smash Initiative, we are triaging issues that are marked "Postponed (maintainer needs more info)". This issue was marked "Postponed (maintainer needs more info)" more a year ago.

    Since there was no additional information provided since it was requested last year, I'm marking the issue "Closed (cannot reproduce)". If anyone can provide complete steps to reproduce the issue (starting from "Install Drupal core"), document those steps in the issue summary and set the issue status back to "Active" [or "Needs Work" if it has a patch, etc.].

    Thanks!

  • 🇮🇪Ireland b0gucki3 Limerick

    Adding #11 as .patch for easier deployment.
    I'm having the same issue on Drupal 10.2.6 when importing config. I still cannot figure out how to reproduce the issue.

Production build 0.71.5 2024