Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 301287

Ensure entity views argument definitions include the entity_type property.

$
0
0

Problem/Motivation

Follow up issue from #2640994: Fix label token replacement for views entity reference arguments where existing sites making use of argument plugins like node_id were crashing the site.

Steps to reproduce

1. Install the tracker module
2. Create a view which uses the tracker's ID as a contextual filter.
3. Save the view.
4. Viewing the view on the frontend results in a crash.

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 142 of core/lib/Drupal/Core/Entity/EntityTypeManager.php).
Drupal\Core\Entity\EntityTypeManager->getHandler(NULL, 'storage') (Line: 195)
Drupal\Core\Entity\EntityTypeManager->getStorage(NULL) (Line: 75)
Drupal\views\Plugin\views\argument\EntityArgument->titleQuery() (Line: 80)
Drupal\views\Plugin\views\argument\NumericArgument->title() (Line: 1048)
Drupal\views\Plugin\views\argument\ArgumentPluginBase->getTitle() (Line: 1169)
Drupal\views\ViewExecutable->_buildArguments() (Line: 1326)
Drupal\views\ViewExecutable->build(NULL) (Line: 1450)
Drupal\views\ViewExecutable->execute(NULL) (Line: 1513)
Drupal\views\ViewExecutable->render() (Line: 133)
Drupal\views\Plugin\views\display\Block->execute() (Line: 1689)
Drupal\views\ViewExecutable->executeDisplay('block_1', Array) (Line: 81)
Drupal\views\Element\View::preRenderViewElement(Array) (Line: 61)
Drupal\views\Plugin\Block\ViewsBlock->build() (Line: 171)
Drupal\block\BlockViewBuilder::preRender(Array)

Proposed resolution

Ensure all hook_views_data() declarations of the file_fid, node_nid, taxonomy, vocabulary_vid, user_uid views argument plugins have a corresponding entity_type property set.

Couldn't find any usages of the taxonomy argument in code.

Remaining tasks

Provide an update path for the existing views, as well as ensure all the

User interface changes

N/A

API changes

N/A

Data model changes

N/A

Release notes snippet

TDB


Viewing all articles
Browse latest Browse all 301287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>