Skip to content
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

Creating a new Islandora Content Type, and UI woes with the media_of field #1239

Open
rosiel opened this issue Aug 6, 2019 · 7 comments
Open
Labels
Subject: User Experience Related to a user’s experience with the software. Type: documentation provides documentation or asks for documentation. Type: enhancement Identifies work on an enhancement to the Islandora codebase Type: use case proposes a new feature or function for the software using user-first language.

Comments

@rosiel
Copy link
Member

rosiel commented Aug 6, 2019

Say I wanted to make a new Drupal content type for Islandora content. This was a closed documentation ticket, #85, and there is a "Create a Content Type" section at https://islandora-claw.github.io/CLAW/user-documentation/content_types/. It is good because it walks you through configuring that new content type to get indexed by Fedora and the triplestore.

@ajstanley noticed that even once you do this, you can't add any Media. If you want to be able to add Media to this new content type, you need to go to Structure > Media Types and "Manage fields" on every single media type to tell the "Media of" entity reference field that it's ok to point to this new content type.

That's unexpected and frustrating. It can be documented, but it's a fundamental mismatch between the Drupal paradigm and the Islandora paradigm.

Modest proposal: Could Islandora ship with a "dashboard" that displays to the user such things as Islandora Managers may want to know without digging through dozens of menus, such as:

  • which content types are "islandora" content types (i.e. that get indexed in Fedora by a Context)
  • for those content types, what media types are allowed? (i.e. this above scenario)
  • what derivatives run, and what criteria are necessary for that to happen (e.g. "islandora type" is image AND the media type is Image - again, this stuff is in Contexts if you know where to look, but have to look it up "backwards".)

Ideally, a user could use this dashboard to manage the settings, but that's probably getting ahead of myself. A display, and information pointing to where these settings can be modified, would go a long way.

@seth-shaw-unlv
Copy link
Contributor

We could also add a little form that provides a drop-down list of the content types and a button, labeled something like "Islandora-ize," that slots the new content type into all the configs Rosie mentioned.

@dannylamb
Copy link
Contributor

you need to go to Structure > Media Types and "Manage fields" on every single media type to tell the "Media of" entity reference field that it's ok to point to this new content type

...and that's the friggin' link between islandora_core_feature and islandora_defaults that's been thwarting me forever. Ima gonna verify that once my latest box spins up.

@dannylamb
Copy link
Contributor

dannylamb commented Aug 6, 2019

Nope. Dangit. By default, that field is set up to reference any node type. 😭 Good to know it'll work with new content types, but I was really hoping I found the missing link between those two features.

Anyhow, sorry to sidetrack this thread. 👍 to the improvement.

@ajstanley
Copy link
Contributor

ajstanley commented Aug 6, 2019

I've got a small change I'll put in as a pull request if folks think it's a good idea. It just filters through the media types (which are already filtered to show only those types with a media_of field) and only shows those media types which are legal for that content type. I've grandfathered in the semi-legal media types which we get by default with no content type selected yet.

@rosiel
Copy link
Member Author

rosiel commented Aug 6, 2019

Wait, @dannylamb , whaddya mean it's "set up to reference any node type"? That sounds like it's in direct opposition to what Alan experienced, where a newly created node type was not enabled by default.

@ajstanley,

It just filters through the media types (which are already filtered to show only those types with a media_of field) and only shows those media types which are legal for that content type.

Sounds cool, but to ask a question that demonstrates I don't actually get it: in what part of the interface would you put this filter?

@ajstanley
Copy link
Contributor

@rosiel - The media tab on any object allows you to add a new media (trying SO hard not to say datastream). Currently you can select any media type that has a field_media_of field. The filter I've got ready for a pull only shows you media types with field_media_of field that allows whatever content type you're currently on the media tab of.
To slightly complicate matters it's not actually legal to have no content types selected, but the default installation has created media types in exactly this condition. Drupal won't let you save them, but you can use them until you're found out. My filter allows these grey market media types to be selected as well.

@dannylamb
Copy link
Contributor

grey market media types

lol, pretty much. When you very first attach an entity reference field to a node, it doesn't restrict what types you can reference. As long as you never ever save those field settings again, it can live like that indefinitely. Go change a single field setting and try to save, and it'll force you to choose a type.

The reason why we don't lock things down to 'Repository Item' by default is because then that introduces linkages between the core feature and the islandora_deafaults, which we're trying to keep as separate as possible (easier said than done).

@kstapelfeldt kstapelfeldt added Type: documentation provides documentation or asks for documentation. Type: enhancement Identifies work on an enhancement to the Islandora codebase Type: use case proposes a new feature or function for the software using user-first language. Subject: User Experience Related to a user’s experience with the software. and removed documentation labels Sep 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Subject: User Experience Related to a user’s experience with the software. Type: documentation provides documentation or asks for documentation. Type: enhancement Identifies work on an enhancement to the Islandora codebase Type: use case proposes a new feature or function for the software using user-first language.
Projects
Development

No branches or pull requests

5 participants