Context URL incompatible with tmgmt_config

Created on 19 May 2023, over 1 year ago
Updated 21 July 2023, over 1 year ago

Problem/Motivation

When submitting jobs to smartling that contain non-entity items, such as views or other config, an error occurs preventing proper job item assignment and prevents completing translations. If you attempt to select multiple items or multiple languages, only the first item is submitted. The rest are marked as inactive in Drupal and are never submitted to Smartling.

Error: Call to a member function bundle() on null in tmgmt_smartling_tmgmt_smartling_context_url_alter() (line 1033 of /var/www/html/docroot/modules/contrib/tmgmt_smartling/tmgmt_smartling.module)
#0 /var/www/html/docroot/core/lib/Drupal/Core/Extension/ModuleHandler.php(562): tmgmt_smartling_tmgmt_smartling_context_url_alter()

Steps to reproduce

Enable the following modules:

  • tmgmt
  • tmgmt_config
  • tmgmt_content
  • tmgmt_extension_suit
  • tmgmt_file
  • tmgmt_locale
  • tmgmt_smartling

Go to Sources
Select Views or Locale for source
Select multiple items
Select multiple target languages
Check out

Proposed resolution

Apply attached patch to check if we are working with an entity before attempting to access it's bundle, and unset the context URL if it is not an entity.

πŸ› Bug report
Status

Fixed

Version

5.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States scott.allison

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024