I'm not sure when the error was introduced but $field_info is an undefined var and it throw a php error when you try to create a new transition.

This is the error:

PHP Fatal error:  Call to a member function label() on null in /var/www/html/backend/web/modules/contrib/workflow/src/Entity/WorkflowTransition.php on line 1047
PHP Stack trace:
PHP   1. {main}() /var/www/html/backend/vendor/drush/drush/drush.php:0
PHP   2. drush_main() /var/www/html/backend/vendor/drush/drush/drush.php:12
PHP   3. Drush\Boot\BaseBoot->bootstrap_and_dispatch() /var/www/html/backend/vendor/drush/drush/includes/preflight.inc:66
PHP   4. drush_dispatch() /var/www/html/backend/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php:67
PHP   5. call_user_func_array:{/var/www/html/backend/vendor/drush/drush/includes/command.inc:199}() /var/www/html/backend/vendor/drush/drush/includes/command.inc:199
PHP   6. drush_command() /var/www/html/backend/vendor/drush/drush/includes/command.inc:199
PHP   7. _drush_invoke_hooks() /var/www/html/backend/vendor/drush/drush/includes/command.inc:231
PHP   8. call_user_func_array:{/var/www/html/backend/vendor/drush/drush/includes/command.inc:422}() /var/www/html/backend/vendor/drush/drush/includes/command.inc:422
PHP   9. drush_bb_product_import_products_from_csv() /var/www/html/backend/vendor/drush/drush/includes/command.inc:422
PHP  10. Drupal\bb_product\ImportProduct->importProductFromCsv() /var/www/html/backend/web/modules/custom/bb_product/bb_product.drush.inc:49
PHP  11. Drupal\bb_product\ImportProduct->importProduct() /var/www/html/backend/web/modules/custom/bb_product/src/ImportProduct.php:108
PHP  12. Drupal\Core\Entity\Entity->save() /var/www/html/backend/web/modules/custom/bb_product/src/ImportProduct.php:199
PHP  13. Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() /var/www/html/backend/web/core/lib/Drupal/Core/Entity/Entity.php:387
PHP  14. Drupal\Core\Entity\EntityStorageBase->save() /var/www/html/backend/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php:820
PHP  15. Drupal\Core\Entity\ContentEntityStorageBase->doPreSave() /var/www/html/backend/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php:389
PHP  16. Drupal\Core\Entity\EntityStorageBase->doPreSave() /var/www/html/backend/web/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php:587
PHP  17. Drupal\Core\Entity\ContentEntityStorageBase->invokeHook() /var/www/html/backend/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php:435
PHP  18. Drupal\Core\Entity\EntityStorageBase->invokeHook() /var/www/html/backend/web/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php:730
PHP  19. Drupal\Core\Extension\ModuleHandler->invokeAll() /var/www/html/backend/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php:169
PHP  20. call_user_func_array:{/var/www/html/backend/web/core/lib/Drupal/Core/Extension/ModuleHandler.php:402}() /var/www/html/backend/web/core/lib/Drupal/Core/Extension/ModuleHandler.php:402
PHP  21. workflow_entity_presave() /var/www/html/backend/web/core/lib/Drupal/Core/Extension/ModuleHandler.php:402
PHP  22. _workflow_execute_transitions() /var/www/html/backend/web/modules/contrib/workflow/workflow.module:130
PHP  23. Drupal\workflow\Entity\WorkflowManager::executeTransitionsOfEntity() /var/www/html/backend/web/modules/contrib/workflow/workflow.module:149
PHP  24. Drupal\workflow\Entity\WorkflowTransition->execute() /var/www/html/backend/web/modules/contrib/workflow/src/Entity/WorkflowManager.php:193
PHP  25. Drupal\workflow\Entity\WorkflowTransition->logError() /var/www/html/backend/web/modules/contrib/workflow/src/Entity/WorkflowTransition.php:530

Comments

estoyausente created an issue. See original summary.

estoyausente’s picture

Status: Active » Needs review
StatusFileSize
new1.26 KB

Status: Needs review » Needs work

The last submitted patch, 2: 0001-Issue-2974268-executeTransitionsOfEntity-throw-an-er.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

estoyausente’s picture

Status: Needs work » Needs review

?¿ I don't understand the php test error: https://www.drupal.org/pift-ci-job/970429

Somebody can help?

mahtab_alam’s picture

StatusFileSize
new985 bytes
estoyausente’s picture

@mahtab_alam , Can you explain me the difference bewteen your commit and mine? :S

  • johnv committed 8ebaa90 on 8.x-1.x authored by mahtab_alam
    Issue #2974268 by estoyausente, mahtab_alam: executeTransitionsOfEntity...
johnv’s picture

Version: 8.x-1.0 » 8.x-1.1

Hmm, this is a stupid error of mine.
Thanks guys.

johnv’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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

switcode’s picture

Hello,

I offer to become the new maintainer of the project.

The main goal will be to have as soon as possible merge this fix issue for the next release.

Can the maintainer answer to this issue and indicate if he agree ?

Thanks a lot.

avpaderno’s picture

@switcode If you want to become maintainer of a project, you need to open a new issue, instead of posting a comment in a closed issue nobody will notice.

Given this module is part of Drupal 8 core, it's probable a request to become maintainer of the module would probably not be accepted.

laurent.lacote’s picture

Hi!

Sorry, my bad wrong issue.