-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Derivative actions can be created for Media Use terms with no URI #1537
Comments
This actually brings up another issue; since actions aren't using uniquely identifiable properties for the terms, you're not actually guaranteed to get the correct term back. There's nothing enforcing unique URIs either; not sure this is a use case that would ever exist, but I dunno, would it not be more correct to store the term's ID in the action? |
@qadan, we use the URIs because they allow us to share the configs across repositories. We can't rely on a term having the same tid across Drupal instances, but we can rely on the URI since we define them with the term migration. |
I've set up a set of actions that extend directly from EmitEvent instead
of AbstractGenerateDerivative, that don't use Media Use tags at all. I
select Entity Bundle and Media Source File Mimetype in the Context
selection instead. For the use cases I was using at the time I found it to
be more dependable since it doesn't require the user to enter the right tag
on ingest.
…On Thu, Jun 4, 2020 at 2:26 PM Seth Shaw ***@***.***> wrote:
@qadan <https://github.com/qadan>, we use the URIs because they allow us
to share the configs across repositories. We can't rely on a term having
the same tid across Drupal instances, but we can rely on the URI since we
define them with the term migration.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1537 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADY2J3YNIDKNF3L5YXI4MLRU7KNVANCNFSM4NSWVJFA>
.
--
Alan Stanley
Developer and Training Specialist
Agile Humanities
|
So I guess the point then perhaps is that if those URIs are intended to be unique to terms, this isn't really enforced in any way or communicated through UI (i.e., with a 'required' field or with validation)? Currently the forms seem volatile, or at least don't communicate their intentions, or if things go south |
I actually am not 100% sure what direction to go in with this, but here's the case:
Reason it happens is simple enough; the form submit handler attempts an IslandoraUtils::getUriForTerm(), which just tosses back NULL with no complaint, and the submit handler accepts this and pops it back into the config.
Like I say, not 100% on the best way to handle this. Would be simplest to handle this in the validation handler for the form, but then you're placing a requirement on Media Use terms that Media Use terms themselves don't have. Could make the URI required in Media Use terms, but I expect that's not the case for a reason? Possibly to not strictly tie Media Use to PCDM? It also may be worth using the
nullable
property in stuff like the different action config schemata to ensure strict conformanceThe text was updated successfully, but these errors were encountered: