Problem/Motivation

Filtering by "Job type" at /admin/tmgmt/job_items errors with...

TypeError: addcslashes(): Argument #1 ($string) must be of type string, array given in addcslashes() (line 1089 of /var/www/html/web/core/lib/Drupal/Core/Database/Connection.php).

Steps to reproduce

  1. Install a vanilla Drupal instance
  2. Composer require drupal/tmgmt
  3. Enable modules: locale, tmgmt_locale, tmgmt_local
  4. Add a new language, say Italian
  5. Visit few pages in Italian, so that Locale tables get populated
  6. Edit current user profile and, under "Translation skills", configure "From: English" and "To: Italian". Save.
  7. Visit /admin/tmgmt/jobs and add a new continuous job
  8. Visit /admin/tmgmt/sources. Select all Source texts. Press "Request translation"
  9. Visit /admin/tmgmt/job_items
  10. Select "Continuous" from "Job type" and press "Apply"

You should see the error.

Proposed resolution

Fix it

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

Re-exported the tmgmt_translation_all_job_items view as default content

Issue fork tmgmt-3578626

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

claudiu.cristea created an issue. See original summary.

claudiu.cristea’s picture

Assigned: Unassigned » claudiu.cristea

claudiu.cristea’s picture

Assigned: claudiu.cristea » Unassigned
Status: Active » Needs review

Probably an update path test would be too much.

Ready for review.

andras_szilagyi’s picture

Status: Needs review » Reviewed & tested by the community

Looks good

claudiu.cristea’s picture

Status: Reviewed & tested by the community » Needs review

Improved the update path

andras_szilagyi’s picture

Status: Needs review » Reviewed & tested by the community

Ok, I went over everything again and it is still good

  • claudiu.cristea committed ce0cbd9b on 8.x-1.x
    fix: #3578626 Filtering job items by type crashes
    
    By: claudiu.cristea...
claudiu.cristea’s picture

Status: Reviewed & tested by the community » Fixed

Thank you for review

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.