Islandora / islandora_mirador

Use the Mirador viewer with your Islandora site.
https://www.drupal.org/project/islandora_mirador
GNU General Public License v2.0
3 stars 9 forks source link

Fix/broken term #21

Closed adam-vessey closed 1 year ago

adam-vessey commented 1 year ago

What does this Pull Request do?

Avoids creating a broken taxonomy term on installation during site installation proper.

What's new?

A in-depth description of the changes made by this PR. Technical details and possible side effects.

How should this be tested?

A description of what steps someone could take to:

Documentation Status

Additional Notes:

Any additional information that you think would be helpful when reviewing this PR.

Interested parties

Tag (@ mention) interested parties or, if unsure, @Islandora/committers

rosiel commented 1 year ago

Maybe I jumped the gun on this... but I confirmed the problem that a term was being created without a URI. However with this branch in my starter-site, using commit 3aca206, no Mirador term was created at all.

adam-vessey commented 1 year ago

@rosiel : Would be up to adding/ensuring the new islandora_mirador_tags migration is included in the set of whatever migrations run during site installation... "traditionally", this was done with the --group=islandora bit, but it seems like things might've moved to target specific migrations?:

rosiel commented 1 year ago

Dang, of course.

I don't think there was a desire to go for specific migrations rather than calling as a group, but the migrations currently aren't all tagged 'islandora'. Secondly, there's a when clause in the Playbook that insinuates that sometimes the FITS migration shouldn't run. I'm hesitant to take that out because I don't want to get burned.

So in short I think we were lazy and listed migrations, rather than it being a deliberate choice. But now that we've brought it up, there's a lot of work we should do to harmonize the READMEs and the code.

adam-vessey commented 1 year ago

@rosiel : For FITS in the playbook, it was more that the starter site was the first thing using it in the play, so other environments had to default to not doing it (as they would've not had the migration present), and it was following the pattern of explicitly referencing the migrations... thinking, could similarly do something like https://github.com/Islandora-Devops/islandora-playbook/pull/264 to allow the starter site to start using --tag=islandora to run the migrations, while leaving any other environments alone, by default.

Is somewhat more difficult in isle-dc... https://github.com/Islandora-Devops/isle-dc/pull/342 should do the trick for starter site stuff; however technically, it would try to run the islandora_defaults_tags and islandora_tags twice. Not the end of the world, as it shouldn't do anything the second time it tries to run them, but it's one of those things that just seems kind of... less-than ideal? That said, unsure how to do things nice and generally there, as it's somewhat dependent whatever site's configuration that is installed, and with a single project trying to support multiple configurations, is somewhat rather unwieldly.

jordandukart commented 1 year ago

This looks fine to me, tested in the following scenarios:

On a box that had islandora_mirador installed I removed the URI of the term to facilitate a "broken" scenario.

Navigating to admin/reports/status#warning yields: Screenshot 2023-06-20 at 9 53 56 AM.

Similarly, deleting the term and re-enabling the module shows the following: Screenshot 2023-06-20 at 10 05 48 AM.

After running the migration the term exists as we expect:


 [notice] Processed 1 item (1 created, 0 updated, 0 failed, 0 ignored) - done with 'islandora_mirador_tags'```