Bug #13196

CLI regenerate derivatives task produces error when --slug used with --no-overwrite

Added by Steve Breker about 1 year ago. Updated 10 months ago.

Status:VerifiedStart date:10/02/2019
Priority:MediumDue date:
Assignee:-% Done:

0%

Category:CLI tools
Target version:Release 2.6.0
Google Code Legacy ID: Tested version:2.6
Sponsored:No Requires documentation:

Description

If the CLI task digitalobject:regen-derivatives task is run with both of the --slug and --no-overwrite options set, the following error is produced:

sudo -u www-data php symfony digitalobject:regen-derivatives --no-overwrite --index --force --slug="test-slug" 

  SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LEFT JOIN digital_object child ON do.id = child.parent_id WHERE do.parent_id IS ' at line 2

Looking at the code this is likely because both options will attempt to add a WHERE clause to the $query.

Change the CLI task to either to prevent this combination of options, or fix the query build logic so both options can be used.

History

#1 Updated by Mike Cantelon 11 months ago

  • Status changed from New to Code Review

#2 Updated by Steve Breker 11 months ago

  • Status changed from Code Review to Feedback
  • Assignee set to Mike Cantelon

CR complete - looks good!

#3 Updated by Mike Cantelon 11 months ago

  • Status changed from Feedback to QA/Review
  • Assignee deleted (Mike Cantelon)

Thanks Steve!

Merged into qa/2.6.x.

#4 Updated by Dan Gillean 10 months ago

  • Status changed from QA/Review to Verified

Works!

Also available in: Atom PDF