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

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

jannakha created an issue. See original summary.

jannakha’s picture

Issue summary: View changes
gisle’s picture

Site moderator here. I'v deleted an empty commit to issue fork by shwetaDevkate. Since any commit (including empty ones) provides automatic issue credit, empty commits is recognized as one way top game our issue credit system. For the record: This user has created a lot of such emtpty commits.

sgarsivaz’s picture

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)

actually this warning comes up in 2.0.0 version for me !

ultimike’s picture

Version: 8.x-1.x-dev » 2.0.0

I am still seeing the issue in 2.0.0 as well.

-mike

jannakha’s picture

Version: 2.0.0 » 2.0.x-dev

jannakha’s picture

Status: Active » Needs review

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

VladimirAus made their first commit to this issue’s fork.

vladimiraus’s picture

Status: Needs review » Fixed

Thank you! Committed! 🥂

Status: Fixed » Closed (fixed)

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