Problem/Motivation

The crop entity type is only used as an API for storing the crop settings of a referenced entity (like file) and it is not exposed directly to site users since it doesn't have any kind of user-facing links, like canonical.

Proposed resolution

Allow CRUD operations for 'crop' entities in a workspace by using the Drupal\workspaces\Entity\Handler\IgnoredWorkspaceHandler entity handler.

Remaining tasks

Review.

User interface changes

Nope.

API changes

Nope.

Data model changes

Nope.

Release notes snippet

Nope.

CommentFileSizeAuthor
#5 3058224-5.patch562 bytesamateescu
#2 3058224.patch661 bytesamateescu

Comments

amateescu created an issue. See original summary.

amateescu’s picture

Status: Active » Needs review
StatusFileSize
new661 bytes

This should do it.

berdir’s picture

Hm, not sure about this.

Yes, this is doesn't provide a UI, that happens through modules like focal point or image_widget_crop.

But.. that doesn't make it internal? If you'd reimplement e.g. focal point in a decoupled site, then you need to be able to write/update crops through an API?

amateescu’s picture

Status: Needs review » Closed (won't fix)
Related issues: +#3101671: Add mechanism to have workspaces skip processing entity types

I agree with #3, marking it as internal was just a workaround because we lacked proper support for "ignoring" processing some entity types in a workspace. That will no longer be the case after #3101671-13: Add mechanism to have workspaces skip processing entity types, so I'm closing this issue.

amateescu’s picture

Title: Mark the crop entity type as internal » Allow CRUD operations for Crop entities in a workspace
Category: Bug report » Task
Issue summary: View changes
Status: Closed (won't fix) » Needs review
StatusFileSize
new562 bytes

#3101671: Add mechanism to have workspaces skip processing entity types was recently committed to Drupal core, and it provides a way for entity types to be "ignored" by workspaces, by using the Drupal\workspaces\Entity\Handler\IgnoredWorkspaceHandler entity handler.

That handler is only instantiated by the Workspaces module, so it's safe to add it in the entity type annotation even though the Drupal core release which includes it (10.3) is not released yet.

amateescu’s picture

Issue tags: +Workspaces support

  • phenaproxima committed 14803891 on 8.x-2.x
    feat: #3058224 Allow CRUD operations for Crop entities in a workspace...
phenaproxima’s picture

Status: Needs review » Fixed

This makes sense to me, and seems safe since as @amateescu points out, the handler is only ever instantiated by Workspaces. Committed and pushed to 8.x-2.x. Thanks!

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.

Status: Fixed » Closed (fixed)

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