Problem/Motivation

When loading the viewreference widgets and getting view names via ViewsReferenceTrait::getViewNames, stale configuration with a configured view that may not actuallky exist resulting in error.

  • Configure viewreference field to only use one view
  • Delete this view
  • Edit the entity that uses this viewreference field and observer error

Proposed resolution

Check for null $view in ViewsReferenceTrait::getViewNames()

Remaining tasks

Patch

User interface changes

None

API changes

None

Data model changes

None

Comments

jasonawant created an issue. See original summary.

jasonawant’s picture

Version: 8.x-1.x-dev » 8.x-1.2
Status: Active » Needs review
StatusFileSize
new664 bytes

Here's a patch for this.

jasonawant’s picture

StatusFileSize
new763 bytes

Realized that if there are no views, $views_list will be undefined. New patch

ivan berezhnov’s picture

I reviewed and all work correctly. Thank you @jasonawant for fix.

ivan berezhnov’s picture

Status: Needs review » Reviewed & tested by the community

  • New Zeal committed eac4c39 on 8.x-1.x authored by jasonawant
    Issue #2953761 by jasonawant: ViewsReferenceTrait::getViewNames does...
NewZeal’s picture

Status: Reviewed & tested by the community » Fixed
NewZeal’s picture

Status: Fixed » Closed (fixed)

Deployed into 8.x-1.3