Unhandled Warning: Undefined array key "translatable"

Created on 18 October 2022, over 1 year ago
Updated 13 August 2023, 11 months ago

Problem/Motivation

Warning message

Steps to reproduce

Just installed it on a client's website and got warning message:

Warning: Undefined array key "translatable" in Drupal\entity_reports\ReportGenerator->generateEntityStatisticsReport() (line 346 of modules/contrib/entity_reports/src/ReportGenerator.php).
Drupal\entity_reports\ReportGenerator->generateEntityStatisticsReport('node', 'album') (Line: 105)
Drupal\entity_reports\ReportGenerator->getEntityTypeStructure('node') (Line: 122)
Drupal\entity_reports\Controller\EntityReportsController->displayReport('node')
call_user_func_array(Array, Array) (Line: 123)

any warnings and exceptions should be handled appropriately

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇦🇺Australia jannakha Brisbane!

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.

  • 🇮🇷Iran sgarsivaz

    I encountered same problem. every entity I choose this warning comes up!

    Notice: Undefined index: translatable in Drupal\entity_reports\ReportGenerator->generateEntityStatisticsReport() (line 343 of modules/contrib/entity_reports/src/ReportGenerator.php).
    
    Drupal\entity_reports\ReportGenerator->generateEntityStatisticsReport('group_content', 'group_content_type_12f4322b7e8d9') (Line: 105)
    Drupal\entity_reports\ReportGenerator->getEntityTypeStructure('group_content') (Line: 122)
    Drupal\entity_reports\Controller\EntityReportsController->displayReport('group_content')
    call_user_func_array(Array, Array) (Line: 123)



    or

    Notice: Undefined index: translatable in Drupal\entity_reports\ReportGenerator->generateEntityStatisticsReport() (line 343 of modules/contrib/entity_reports/src/ReportGenerator.php).
    
    Drupal\entity_reports\ReportGenerator->generateEntityStatisticsReport('user', 'user') (Line: 105)
    Drupal\entity_reports\ReportGenerator->getEntityTypeStructure('user') (Line: 122)
    Drupal\entity_reports\Controller\EntityReportsController->displayReport('user')
    call_user_func_array(Array, Array) (Line: 123)
  • 🇺🇸United States ultimike Florida, USA

    I am still seeing the issue in 2.0.0 as well.

    -mike

  • 🇦🇺Australia jannakha Brisbane!
  • @jannakha opened merge request.
  • Status changed to Needs review 11 months ago
  • 🇦🇺Australia jannakha Brisbane!

    MR of 3315873-unhandled-warning-undefined-2x for v2.0.x branch

    - maintainer - can you please set 2.0.x as default branch on the repo

  • First commit to issue fork.
  • Status changed to Fixed 11 months ago
  • 🇦🇺Australia VladimirAus Brisbane, Australia

    Thank you! Committed! 🥂

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

Production build 0.69.0 2024