When the view has no result with the paragraphs, there is an error

Created on 2 April 2020, about 4 years ago
Updated 13 January 2024, 6 months ago

I created a view to display a block on my store page. But my page displays an error when the view has no result. If the view has a result, it works. What's the problem ?

https://i.stack.imgur.com/xaXIV.png

When I go to my store page, I get this error :

The website encountered an unexpected error. Please try again later.

Here is the PHP error in the logs :

    TypeError: Argument 1 passed to Drupal\views\Plugin\views\field\RenderedEntity::getEntityTranslation() must implement interface Drupal\Core\Entity\EntityInterface, null given, called in /var/www/www-example-com/web/core/modules/views/src/Plugin/views/field/RenderedEntity.php on line 149 in Drupal\views\Plugin\views\field\RenderedEntity->getEntityTranslation() (line 69 of /var/www/www-example-com/web/core/modules/views/src/Entity/Render/EntityTranslationRenderTrait.php)
    
    #0 /var/www/www-example-com/web/core/modules/views/src/Plugin/views/field/RenderedEntity.php(149): Drupal\views\Plugin\views\field\RenderedEntity->getEntityTranslation(NULL, Object(Drupal\views\ResultRow))
    #1 /var/www/www-example-com/web/core/modules/views/src/Plugin/views/field/FieldPluginBase.php(1155): Drupal\views\Plugin\views\field\RenderedEntity->render(Object(Drupal\views\ResultRow))
    #2 /var/www/www-example-com/web/core/modules/views/views.theme.inc(236): Drupal\views\Plugin\views\field\FieldPluginBase->advancedRender(Object(Drupal\views\ResultRow))
    #3 /var/www/www-example-com/web/core/lib/Drupal/Core/Theme/ThemeManager.php(287): template_preprocess_views_view_field(Array, 'views_view_fiel...', Array)
    .........
πŸ’¬ Support request
Status

Postponed: needs info

Version

1.0

Component

Code

Created by

πŸ‡«πŸ‡·France zenimagine

Live updates comments and jobs are added and updated live.
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.

  • πŸ‡¨πŸ‡­Switzerland Berdir Switzerland

    Very late response, but that looks like a problem with a broken reference that can't be loaded. There are core issues open about this and some improvements recently, so that might no longer be a problem.

Production build 0.69.0 2024