$container->get('entity.query')->get('crop')

This creates an actual query object which can only be used once. If someone somehow tries to use the same plugin instance twice, it fail will. Inject just the entity.query service and then all get('crop') on it.

Actually, since you already inject the crop storage, you can also just do $this->cropStorage->getQuery().

CommentFileSizeAuthor
#5 2617446-5.patch2.36 KBjoshi.rohit100

Comments

Berdir created an issue. See original summary.

slashrsm’s picture

Issue tags: +Media Initiative, +D8Media, +Novice
joshi.rohit100’s picture

Assigned: Unassigned » joshi.rohit100
joshi.rohit100’s picture

Assigned: Unassigned » joshi.rohit100
joshi.rohit100’s picture

Status: Active » Needs review
StatusFileSize
new2.36 KB
berdir’s picture

Looks good, but this is one of the projects that works with pull requests on github I think: https://github.com/drupal-media/crop

slashrsm’s picture

Status: Needs review » Fixed

True, but patches also work. Whatever works for people works for me. :)

Thank you!

Status: Fixed » Closed (fixed)

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