Possible Bug

15 views
Skip to first unread message

Tim Spindler

unread,
Apr 13, 2020, 8:00:51 AM4/13/20
to archipelago commons
I'm not sure if there is a bug reporting system but I have something that I can reproduce.

1. Creating a library object collection
2. Name the collection using the form to enter the title
3. When I save, it saves the title of the previous node.  I am able edit the library object collection node

I can also reproduce this. 

It also put the image from the previous node it originally named.

LILRC Governing Documents (library object collection)


Tim Spindler
Executive Director | Long Island Library Resources Council
tspi...@lilrc.org | 631-675-1570 x2000
http://www.lilrc.org



LILRC is a member of the Empire State Library Network (ESLN)

Follow LILRC on Facebook Twitter Instagram

Diego Pino

unread,
Apr 13, 2020, 8:14:27 AM4/13/20
to Tim Spindler, archipelago commons
Hi Tim, 

Thanks for reporting this. Give me 70-90 min or so to check my deployment and try to reproduce what you are seeing. I coded a failsafe that is miss acting  when a webform is not property setup, using your cached metadata(whole json) from the last node operation. Originally it was made to make your data survive a failed attempt to save or any error but it seems to be permeating in other places. Will check and come back to you with a solution or fix. Question. Are you using your own webform for collections the exact same we shipped? Thanks

--
You received this message because you are subscribed to the Google Groups "archipelago commons" group.
To unsubscribe from this group and stop receiving emails from it, send an email to archipelago-com...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/archipelago-commons/CAORQogtrQqOs9%3DbjZj2wKTFA2p9kUMXJWjJuLwzP4X6a1TQDsg%40mail.gmail.com.
--
Diego Pino Navarro
Digital Repositories Developer
Metropolitan New York Library Council (METRO)

Tim Spindler

unread,
Apr 13, 2020, 9:10:05 AM4/13/20
to Diego Pino, archipelago commons
Diego,

I did not alter the form. It is as shipped.

Tim Spindler
Executive Director | Long Island Library Resources Council
tspi...@lilrc.org | 631-675-1570 x2000
http://www.lilrc.org



LILRC is a member of the Empire State Library Network (ESLN)

Follow LILRC on Facebook Twitter Instagram

Diego Pino

unread,
Apr 13, 2020, 10:56:10 AM4/13/20
to archipelago commons
Tim!

Ok, i could reproduce. Sorry, this requires some explanation, it is a bug indeed, or said differently, a workflow inconsistency mixed with a WIP functionality. 

Archipelago provides 2 Strawberryfield Field Widgets (fancy name for ways of putting data into a node) that use Webforms as input. 

1. -When you ingest a new Digital Object you see one named 'Strawberryfield webform based input with inline rendering' in action, which loads the Webform immediately in its full expanded, multi step way. Means you see all the fields, wikidata, etc. PROS:  you see all the things you need to fill! CONS: you need to fill every required field before saving. You can't just save. You need to finish/pass through all steps and save the metadata at the final steps before saving/creating the Node. We can/should discuss that workflow with the community because there is a strong rationale behind it, even if it feels weird.

2.- Second, like when you ingest a new Collection Object you see, instead of a fully rendered Webform, a button that 'inspires' you to click on it [1] and my guts tell me you did not press that button. That widget is named 'Strawberryfield webform based input'. PROS:  just give a title and a Display mode and go on, no metadata needed (except when the WIP bug you found plays with you!), basically step and metadata validation does not trigger until you press that button (see screenshot[1]) which retrieves the webform and renders it, doing exactly what 1.- does automatically. CONS: Since we are keeping the old Cached JSON from your last ingest around, the bug, and you did not go through all the steps, we reuse that data. And you end with a Clone of the previously ingested object.

So why did we do this? I would say a bad decision really, but one users can override easily. We wanted to showcase both webform based widgets and let people decide which one worked better. Letting people decide without documenting those things is not good!

Now to the second problem, the Title issue, because you added a title and not even that was respected. That has a reason too. 

If you compare input of an Object and a Collection, you will see that Object ingest form has not upper Title Entry, only title field inside the webform. But Collection (after you press that button) will have two title fields. 
Because of that 2 title inout problem and the fact that Drupal has a mandated Title for a Node which is also super short (like 128 characters) and Metadata Titles tend/could extend for a lot more, and people, including the larger archipelago team, kept asking why two titles? we decided to make one rule both. The internal, the webform one. So there is now a piece of code, an event that triggers that uses the Metadata title (making the need for the other Node level title field obsolete). Sadly because of the Bug you found, where the old JSON is used if the webform is not expanded and filled, Archipelago used that previous title as source and decided to override your decision.

I know it sounds complicated and please feel free to follow up if i did not make any sense. I also explain things in too many words *shame on me

but GIST is:
If you leave things the way they are, make sure you press the button in the shared screenshot "Edit Collection Metadata" before saving. That way you actually pass new metadata.

If you want to make things consistent, and given the fact you are actually building a live server and not just playing, 
A) Go to /admin/structure/types/manage/digital_object_collection/form-display (which is where you define how a collection will be ingested using what widget, etc) and change from 
-  'Strawberryfield webform based input'   to 'Strawberryfield webform based input with inline rendering' and save.
- Then go there again and then drag the 'Title' field you see in that table down to 'Disabled section' and save.

That way Digital Objet and Collection will use the same 'logic' and workflow for ingesting.

B) More Step: Now go and make a Collection specific form, instead of using the same you use for Objects. This is a little more complex but worth your time
-  Go to /admin/structure/webform, For  the 'Descriptive Metadata' row, under Operations, press the down arrow on that button and choose Clone. Give it a new name 'Collection Descriptive Metadata'
- You will get now a new Webform, identically for the original shipped one. You can in that one change some things, (build tab) like the 'Media Types' displayed, since you are creating a collection it just makes sense to have only 'Collection' as an option there, or even remove some steps you don't need. Play, test, give it a try.
- Once happy with that webform, you need to 'Tell Archipelago to use it'. Go again to /admin/structure/types/manage/digital_object_collection/form-display
- on the 'Strawberry (Descriptive metadata source)' row that has 'Strawberryfield webform based input with inline rendering' select box (also a tiny strawberry emoji, easy to find) press the GEAR icon. You will see a form appear with two fields. First field is autocomplete, so clear that and start typing 'Collection D' and it shoudl autofill the new form you just cloned and customized. Press 'Update' And then at the bottom of the page press 

Save. Now Archipelago will use that form as input method for collections.

On my side of things i will fix that WIP bug, related to this ISSUE https://github.com/esmero/webform_strawberryfield/issues/41 (needs a title update, will dod that too) and make sure old data is only kept around in case of real ingest failure and not 'just in case' as i do know (All will go into Beta3).

Sorry for my super long posts, i wish we had better docs built already, which is almost quite the same effort as explaining everything in these answers, but we will get there. My appreciation for testing and helping make the system better.

Cheers

Diego Pino


add collection.jpeg[1]









To unsubscribe from this group and stop receiving emails from it, send an email to archipelago-commons+unsub...@googlegroups.com.

Tim Spindler

unread,
Apr 13, 2020, 3:36:34 PM4/13/20
to Diego Pino, archipelago commons
Diego,

That seems to have fixed some of the issues.  There may be something else going on if I don't strictly follow a set of steps but I need to test further before I can confirm this and describe the issue.

Tim Spindler
Executive Director | Long Island Library Resources Council
tspi...@lilrc.org | 631-675-1570 x2000
http://www.lilrc.org



LILRC is a member of the Empire State Library Network (ESLN)

Follow LILRC on Facebook Twitter Instagram

Tim!
To unsubscribe from this group and stop receiving emails from it, send an email to archipelago-com...@googlegroups.com.
--
Diego Pino Navarro
Digital Repositories Developer
Metropolitan New York Library Council (METRO)

--
You received this message because you are subscribed to the Google Groups "archipelago commons" group.
To unsubscribe from this group and stop receiving emails from it, send an email to archipelago-com...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/archipelago-commons/7b55a46f-71e3-41bd-9950-9985197c2096%40googlegroups.com.

Diego Pino

unread,
Apr 13, 2020, 3:38:20 PM4/13/20
to Tim Spindler, archipelago commons
Thanks Tim, keep us/me posted of any other abnormalities you find, will be around to code/fix and do some testing too

Cheers

Diego Pino Navarro
Assistant Director for Digital Strategy

Metropolitan New York Library Council
599 11th Av. New York, NY 10036

Tim!
Reply all
Reply to author
Forward
0 new messages