talk@lists.collectionspace.org

WE HAVE SUNSET THIS LISTSERV - Join us at collectionspace@lyrasislists.org

View all threads

Unusual database state linking collectionobject record to media record; seeking troubleshooting tips

PM
Peter Murray
Mon, Dec 28, 2015 7:37 PM

Our CollectionSpace database is in a strange state for a connection between a CollectionObject record and a Media record.  The symptoms are these:

  • There exists a CollectionObject record (cf9e5c0b) and a Media record (3c84e058) that were created by an intern through the CSpace web UI.

  • In the right sidebar of the CollectionObject record there is a listing and link to the Media procedure record.

  • In the right sidebar of the Media record there is a listing and link to the CollectionObject record.

  • The media view area of the CollectionObject record DOES NOT have a thumbnail view of the Media image, but the thumbnail DOES appear on the media view area of the Media procedure record.

  • On the CollectionObject record page under the "Media Handling" tab, there IS NOT a link to the Media procedure record.

  • On the Media record, there IS a link to the related CollectionObject record on the "Cataloging" tab.

  • There are Relations records where the CollectionObject record and Media record appear as the subject and object of relations with predicate type "affects" (see https://gist.github.com/dltj/c014f597b12672c93db7#file-38b3396a-4dc2-44d8-b375-xml for CollectionObject->affects->Media and https://gist.github.com/dltj/c014f597b12672c93db7#file-d662fa69-b7cc-4cf6-9915-xml for Media->affects->CollectionObject).

To my eye, all of this looks correct when comparing to other records.  It appears, though, that part of the system doesn't know that the CollectionObject record is related to the Media record.  I have not tried to relate the CollectionObject record to the Media record again so as not to contaminate the situation further until I got advice on how to troubleshoot something like this.

Peter

Peter Murray
Dev/Ops Lead and Project Manager
Cherry Hill Company

Our CollectionSpace database is in a strange state for a connection between a CollectionObject record and a Media record. The symptoms are these: * There exists a CollectionObject record (cf9e5c0b) and a Media record (3c84e058) that were created by an intern through the CSpace web UI. * In the right sidebar of the CollectionObject record there is a listing and link to the Media procedure record. * In the right sidebar of the Media record there is a listing and link to the CollectionObject record. * The media view area of the CollectionObject record DOES NOT have a thumbnail view of the Media image, but the thumbnail DOES appear on the media view area of the Media procedure record. * On the CollectionObject record page under the "Media Handling" tab, there IS NOT a link to the Media procedure record. * On the Media record, there IS a link to the related CollectionObject record on the "Cataloging" tab. * There are Relations records where the CollectionObject record and Media record appear as the subject and object of relations with predicate type "affects" (see https://gist.github.com/dltj/c014f597b12672c93db7#file-38b3396a-4dc2-44d8-b375-xml for CollectionObject->affects->Media and https://gist.github.com/dltj/c014f597b12672c93db7#file-d662fa69-b7cc-4cf6-9915-xml for Media->affects->CollectionObject). To my eye, all of this looks correct when comparing to other records. It appears, though, that part of the system doesn't know that the CollectionObject record is related to the Media record. I have not tried to relate the CollectionObject record to the Media record again so as not to contaminate the situation further until I got advice on how to troubleshoot something like this. Peter -- Peter Murray Dev/Ops Lead and Project Manager Cherry Hill Company
RL
Ray Lee
Mon, Jan 4, 2016 10:16 PM

Hi Peter,
Here are a few things to check:

  • Are any of the relation records soft-deleted?
  • Are either the media or collectionobject record soft-deleted?
  • Does the query to the REST API for the related media records of the
    collectionobject return the expected media record? If so, does the query
    from the UI to the app layer return the expected record?
  • What are your permissions on media and collectionobject records?

Ray

On Mon, Dec 28, 2015 at 11:37 AM, Peter Murray pmurray@chillco.com wrote:

Our CollectionSpace database is in a strange state for a connection
between a CollectionObject record and a Media record.  The symptoms are
these:

  • There exists a CollectionObject record (cf9e5c0b) and a Media record
    (3c84e058) that were created by an intern through the CSpace web UI.

  • In the right sidebar of the CollectionObject record there is a listing
    and link to the Media procedure record.

  • In the right sidebar of the Media record there is a listing and link to
    the CollectionObject record.

  • The media view area of the CollectionObject record DOES NOT have a
    thumbnail view of the Media image, but the thumbnail DOES appear on the
    media view area of the Media procedure record.

  • On the CollectionObject record page under the "Media Handling" tab,
    there IS NOT a link to the Media procedure record.

  • On the Media record, there IS a link to the related CollectionObject
    record on the "Cataloging" tab.

  • There are Relations records where the CollectionObject record and Media
    record appear as the subject and object of relations with predicate type
    "affects" (see
    https://gist.github.com/dltj/c014f597b12672c93db7#file-38b3396a-4dc2-44d8-b375-xml
    for CollectionObject->affects->Media and
    https://gist.github.com/dltj/c014f597b12672c93db7#file-d662fa69-b7cc-4cf6-9915-xml
    for Media->affects->CollectionObject).

To my eye, all of this looks correct when comparing to other records.  It
appears, though, that part of the system doesn't know that the
CollectionObject record is related to the Media record.  I have not tried
to relate the CollectionObject record to the Media record again so as not
to contaminate the situation further until I got advice on how to
troubleshoot something like this.

Peter

Peter Murray
Dev/Ops Lead and Project Manager
Cherry Hill Company


Talk mailing list
Talk@lists.collectionspace.org

http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org

Hi Peter, Here are a few things to check: - Are any of the relation records soft-deleted? - Are either the media or collectionobject record soft-deleted? - Does the query to the REST API for the related media records of the collectionobject return the expected media record? If so, does the query from the UI to the app layer return the expected record? - What are your permissions on media and collectionobject records? Ray On Mon, Dec 28, 2015 at 11:37 AM, Peter Murray <pmurray@chillco.com> wrote: > Our CollectionSpace database is in a strange state for a connection > between a CollectionObject record and a Media record. The symptoms are > these: > > * There exists a CollectionObject record (cf9e5c0b) and a Media record > (3c84e058) that were created by an intern through the CSpace web UI. > > * In the right sidebar of the CollectionObject record there is a listing > and link to the Media procedure record. > > * In the right sidebar of the Media record there is a listing and link to > the CollectionObject record. > > * The media view area of the CollectionObject record DOES NOT have a > thumbnail view of the Media image, but the thumbnail DOES appear on the > media view area of the Media procedure record. > > * On the CollectionObject record page under the "Media Handling" tab, > there IS NOT a link to the Media procedure record. > > * On the Media record, there IS a link to the related CollectionObject > record on the "Cataloging" tab. > > * There are Relations records where the CollectionObject record and Media > record appear as the subject and object of relations with predicate type > "affects" (see > https://gist.github.com/dltj/c014f597b12672c93db7#file-38b3396a-4dc2-44d8-b375-xml > for CollectionObject->affects->Media and > https://gist.github.com/dltj/c014f597b12672c93db7#file-d662fa69-b7cc-4cf6-9915-xml > for Media->affects->CollectionObject). > > To my eye, all of this looks correct when comparing to other records. It > appears, though, that part of the system doesn't know that the > CollectionObject record is related to the Media record. I have not tried > to relate the CollectionObject record to the Media record again so as not > to contaminate the situation further until I got advice on how to > troubleshoot something like this. > > > Peter > -- > Peter Murray > Dev/Ops Lead and Project Manager > Cherry Hill Company > > > _______________________________________________ > Talk mailing list > Talk@lists.collectionspace.org > > http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >
PM
Peter Murray
Tue, Jan 5, 2016 4:51 PM

Thanks for thinking about this, Ray.  Some answers to your questions inline below:

On Jan 4, 2016, at 5:16 PM, Ray Lee rhlee@berkeley.edu wrote:

Hi Peter,
Here are a few things to check:
Are any of the relation records soft-deleted?

No -- the relation records are <workflowState>project</workflowState>

Are either the media or collectionobject record soft-deleted?

No -- both are <workflowState>project</workflowState>

Does the query to the REST API for the related media records of the collectionobject return the expected media record? If so, does the query from the UI to the app layer return the expected record?

What are your permissions on media and collectionobject records?

The account that created the records has write permissions for both media and cataloging.  The account doing the querying (me) has full privileges across the board.

Peter

On Mon, Dec 28, 2015 at 11:37 AM, Peter Murray <pmurray@chillco.com mailto:pmurray@chillco.com> wrote:
Our CollectionSpace database is in a strange state for a connection between a CollectionObject record and a Media record.  The symptoms are these:

To my eye, all of this looks correct when comparing to other records.  It appears, though, that part of the system doesn't know that the CollectionObject record is related to the Media record.  I have not tried to relate the CollectionObject record to the Media record again so as not to contaminate the situation further until I got advice on how to troubleshoot something like this.

Peter

--
Peter Murray
Dev/Ops Lead and Project Manager
Cherry Hill Company

Thanks for thinking about this, Ray. Some answers to your questions inline below: > On Jan 4, 2016, at 5:16 PM, Ray Lee <rhlee@berkeley.edu> wrote: > > Hi Peter, > Here are a few things to check: > Are any of the relation records soft-deleted? No -- the relation records are <workflowState>project</workflowState> > Are either the media or collectionobject record soft-deleted? No -- both are <workflowState>project</workflowState> > Does the query to the REST API for the related media records of the collectionobject return the expected media record? If so, does the query from the UI to the app layer return the expected record? (I think this answers your questions.) No, the REST query -- https://cs.museumofman.org/collectionspace/tenant/sdmom/cataloging/media/cf9e5c0b-a874-4ed0-be0f?pageNum=0&pageSize=40 <https://cs.museumofman.org/collectionspace/tenant/sdmom/cataloging/media/cf9e5c0b-a874-4ed0-be0f?pageNum=0&pageSize=40> -- returns JSON where 'items' is an empty list. The REST query for related procedures -- https://cs.museumofman.org/collectionspace/tenant/sdmom/cataloging/procedures/cf9e5c0b-a874-4ed0-be0f?pageNum=0&pageSize=10&sortDir=1&sortKey=number <https://cs.museumofman.org/collectionspace/tenant/sdmom/cataloging/procedures/cf9e5c0b-a874-4ed0-be0f?pageNum=0&pageSize=10&sortDir=1&sortKey=number> -- returns JSON with a list of three 'items', one of which is the media procedure record. > What are your permissions on media and collectionobject records? The account that created the records has write permissions for both media and cataloging. The account doing the querying (me) has full privileges across the board. Peter > > On Mon, Dec 28, 2015 at 11:37 AM, Peter Murray <pmurray@chillco.com <mailto:pmurray@chillco.com>> wrote: > Our CollectionSpace database is in a strange state for a connection between a CollectionObject record and a Media record. The symptoms are these: > > * There exists a CollectionObject record (cf9e5c0b) and a Media record (3c84e058) that were created by an intern through the CSpace web UI. > > * In the right sidebar of the CollectionObject record there is a listing and link to the Media procedure record. > > * In the right sidebar of the Media record there is a listing and link to the CollectionObject record. > > * The media view area of the CollectionObject record DOES NOT have a thumbnail view of the Media image, but the thumbnail DOES appear on the media view area of the Media procedure record. > > * On the CollectionObject record page under the "Media Handling" tab, there IS NOT a link to the Media procedure record. > > * On the Media record, there IS a link to the related CollectionObject record on the "Cataloging" tab. > > * There are Relations records where the CollectionObject record and Media record appear as the subject and object of relations with predicate type "affects" (see https://gist.github.com/dltj/c014f597b12672c93db7#file-38b3396a-4dc2-44d8-b375-xml <https://gist.github.com/dltj/c014f597b12672c93db7#file-38b3396a-4dc2-44d8-b375-xml> for CollectionObject->affects->Media and https://gist.github.com/dltj/c014f597b12672c93db7#file-d662fa69-b7cc-4cf6-9915-xml <https://gist.github.com/dltj/c014f597b12672c93db7#file-d662fa69-b7cc-4cf6-9915-xml> for Media->affects->CollectionObject). > > To my eye, all of this looks correct when comparing to other records. It appears, though, that part of the system doesn't know that the CollectionObject record is related to the Media record. I have not tried to relate the CollectionObject record to the Media record again so as not to contaminate the situation further until I got advice on how to troubleshoot something like this. > > > Peter -- Peter Murray Dev/Ops Lead and Project Manager Cherry Hill Company
RM
Richard Millet
Tue, Jan 5, 2016 6:24 PM

Peter,

It's possible that not all image derivatives got created for the Media resource in question.

Get the CSID of the object's related Media resouce by using the Relation service API.  For example:
http://demo.collectionspace.org:8180/cspace-services/relations?wf_deleted=false&sbj=0e347e6e-42c7-4243-9b1e&objType=Media

Check that all the derivatives of the Media resource actually exist.  Here are some example API queries that you can use to do this:

Lists all the derivative resources:
http://demo.collectionspace.org:8180/cspace-services/media/b4e40f17-2377-4b55-9d78/blob/derivatives

See the actual content of the derivative resource:
http://demo.collectionspace.org:8180/cspace-services/media/b4e40f17-2377-4b55-9d78/blob/derivatives/Medium/content

-Richard


From: Talk talk-bounces@lists.collectionspace.org on behalf of Peter Murray pmurray@chillco.com
Sent: Tuesday, January 05, 2016 8:51 AM
To: CollectionSpace Talk List
Subject: Re: [Talk] Unusual database state linking collectionobject record to media record; seeking troubleshooting tips

Thanks for thinking about this, Ray.  Some answers to your questions inline below:

On Jan 4, 2016, at 5:16 PM, Ray Lee <rhlee@berkeley.edumailto:rhlee@berkeley.edu> wrote:

Hi Peter,
Here are a few things to check:

  • Are any of the relation records soft-deleted?

No -- the relation records are <workflowState>
project
</workflowState>

  • Are either the media or collectionobject record soft-deleted?

No -- both are <workflowState>
project
</workflowState>

  • Does the query to the REST API for the related media records of the collectionobject return the expected media record? If so, does the query from the UI to the app layer return the expected record?

(I think this answers your questions.) No, the REST query -- https://cs.museumofman.org/collectionspace/tenant/sdmom/cataloging/media/cf9e5c0b-a874-4ed0-be0f?pageNum=0&pageSize=40 -- returns JSON where 'items' is an empty list.  The REST query for related procedures -- https://cs.museumofman.org/collectionspace/tenant/sdmom/cataloging/procedures/cf9e5c0b-a874-4ed0-be0f?pageNum=0&pageSize=10&sortDir=1&sortKey=number -- returns JSON with a list of three 'items', one of which is the media procedure record.

  • What are your permissions on media and collectionobject records?

The account that created the records has write permissions for both media and cataloging.  The account doing the querying (me) has full privileges across the board.

Peter

On Mon, Dec 28, 2015 at 11:37 AM, Peter Murray <pmurray@chillco.commailto:pmurray@chillco.com> wrote:
Our CollectionSpace database is in a strange state for a connection between a CollectionObject record and a Media record.  The symptoms are these:

  • There exists a CollectionObject record (cf9e5c0b) and a Media record (3c84e058) that were created by an intern through the CSpace web UI.

  • In the right sidebar of the CollectionObject record there is a listing and link to the Media procedure record.

  • In the right sidebar of the Media record there is a listing and link to the CollectionObject record.

  • The media view area of the CollectionObject record DOES NOT have a thumbnail view of the Media image, but the thumbnail DOES appear on the media view area of the Media procedure record.

  • On the CollectionObject record page under the "Media Handling" tab, there IS NOT a link to the Media procedure record.

  • On the Media record, there IS a link to the related CollectionObject record on the "Cataloging" tab.

  • There are Relations records where the CollectionObject record and Media record appear as the subject and object of relations with predicate type "affects" (see https://gist.github.com/dltj/c014f597b12672c93db7#file-38b3396a-4dc2-44d8-b375-xml for CollectionObject->affects->Media and https://gist.github.com/dltj/c014f597b12672c93db7#file-d662fa69-b7cc-4cf6-9915-xml for Media->affects->CollectionObject).

To my eye, all of this looks correct when comparing to other records.  It appears, though, that part of the system doesn't know that the CollectionObject record is related to the Media record.  I have not tried to relate the CollectionObject record to the Media record again so as not to contaminate the situation further until I got advice on how to troubleshoot something like this.

Peter

--
Peter Murray
Dev/Ops Lead and Project Manager
Cherry Hill Company

Peter, It's possible that not all image derivatives got created for the Media resource in question. Get the CSID of the object's related Media resouce by using the Relation service API. For example: http://demo.collectionspace.org:8180/cspace-services/relations?wf_deleted=false&sbj=0e347e6e-42c7-4243-9b1e&objType=Media Check that all the derivatives of the Media resource actually exist. Here are some example API queries that you can use to do this: Lists all the derivative resources: http://demo.collectionspace.org:8180/cspace-services/media/b4e40f17-2377-4b55-9d78/blob/derivatives See the actual content of the derivative resource: http://demo.collectionspace.org:8180/cspace-services/media/b4e40f17-2377-4b55-9d78/blob/derivatives/Medium/content -Richard ________________________________ From: Talk <talk-bounces@lists.collectionspace.org> on behalf of Peter Murray <pmurray@chillco.com> Sent: Tuesday, January 05, 2016 8:51 AM To: CollectionSpace Talk List Subject: Re: [Talk] Unusual database state linking collectionobject record to media record; seeking troubleshooting tips Thanks for thinking about this, Ray. Some answers to your questions inline below: On Jan 4, 2016, at 5:16 PM, Ray Lee <rhlee@berkeley.edu<mailto:rhlee@berkeley.edu>> wrote: Hi Peter, Here are a few things to check: * Are any of the relation records soft-deleted? No -- the relation records are <workflowState> project </workflowState> * Are either the media or collectionobject record soft-deleted? No -- both are <workflowState> project </workflowState> * Does the query to the REST API for the related media records of the collectionobject return the expected media record? If so, does the query from the UI to the app layer return the expected record? (I think this answers your questions.) No, the REST query -- https://cs.museumofman.org/collectionspace/tenant/sdmom/cataloging/media/cf9e5c0b-a874-4ed0-be0f?pageNum=0&pageSize=40 -- returns JSON where 'items' is an empty list. The REST query for related procedures -- https://cs.museumofman.org/collectionspace/tenant/sdmom/cataloging/procedures/cf9e5c0b-a874-4ed0-be0f?pageNum=0&pageSize=10&sortDir=1&sortKey=number -- returns JSON with a list of three 'items', one of which is the media procedure record. * What are your permissions on media and collectionobject records? The account that created the records has write permissions for both media and cataloging. The account doing the querying (me) has full privileges across the board. Peter On Mon, Dec 28, 2015 at 11:37 AM, Peter Murray <pmurray@chillco.com<mailto:pmurray@chillco.com>> wrote: Our CollectionSpace database is in a strange state for a connection between a CollectionObject record and a Media record. The symptoms are these: * There exists a CollectionObject record (cf9e5c0b) and a Media record (3c84e058) that were created by an intern through the CSpace web UI. * In the right sidebar of the CollectionObject record there is a listing and link to the Media procedure record. * In the right sidebar of the Media record there is a listing and link to the CollectionObject record. * The media view area of the CollectionObject record DOES NOT have a thumbnail view of the Media image, but the thumbnail DOES appear on the media view area of the Media procedure record. * On the CollectionObject record page under the "Media Handling" tab, there IS NOT a link to the Media procedure record. * On the Media record, there IS a link to the related CollectionObject record on the "Cataloging" tab. * There are Relations records where the CollectionObject record and Media record appear as the subject and object of relations with predicate type "affects" (see https://gist.github.com/dltj/c014f597b12672c93db7#file-38b3396a-4dc2-44d8-b375-xml for CollectionObject->affects->Media and https://gist.github.com/dltj/c014f597b12672c93db7#file-d662fa69-b7cc-4cf6-9915-xml for Media->affects->CollectionObject). To my eye, all of this looks correct when comparing to other records. It appears, though, that part of the system doesn't know that the CollectionObject record is related to the Media record. I have not tried to relate the CollectionObject record to the Media record again so as not to contaminate the situation further until I got advice on how to troubleshoot something like this. Peter -- Peter Murray Dev/Ops Lead and Project Manager Cherry Hill Company
PM
Peter Murray
Tue, Jan 5, 2016 7:01 PM

Thanks for chiming in, Richard.  The REST query to get the Media resource CSID returned the one Media record that is related to the cataloging record.  The REST query for the derivatives for that media record did seem to return all of the appropriate entries (https://gist.github.com/dltj/c014f597b12672c93db7#file-cspace-services_media_3c84e058-90c8-4059-8722_blob_derivatives-xml https://gist.github.com/dltj/c014f597b12672c93db7#file-cspace-services_media_3c84e058-90c8-4059-8722_blob_derivatives-xml), and I am able to see the content of the Medium derivative.

Peter

On Jan 5, 2016, at 1:24 PM, Richard Millet richard.millet@lyrasis.org wrote:

Peter,

It's possible that not all image derivatives got created for the Media resource in question.

Get the CSID of the object's related Media resouce by using the Relation service API.  For example:
http://demo.collectionspace.org:8180/cspace-services/relations?wf_deleted=false&sbj=0e347e6e-42c7-4243-9b1e&objType=Media http://demo.collectionspace.org:8180/cspace-services/relations?wf_deleted=false&sbj=0e347e6e-42c7-4243-9b1e&objType=Media

Check that all the derivatives of the Media resource actually exist.  Here are some example API queries that you can use to do this:

Lists all the derivative resources:
http://demo.collectionspace.org:8180/cspace-services/media/b4e40f17-2377-4b55-9d78/blob/derivatives http://demo.collectionspace.org:8180/cspace-services/media/b4e40f17-2377-4b55-9d78/blob/derivatives

See the actual content of the derivative resource:
http://demo.collectionspace.org:8180/cspace-services/media/b4e40f17-2377-4b55-9d78/blob/derivatives/Medium/content http://demo.collectionspace.org:8180/cspace-services/media/b4e40f17-2377-4b55-9d78/blob/derivatives/Medium/content

-Richard

From: Talk talk-bounces@lists.collectionspace.org on behalf of Peter Murray pmurray@chillco.com
Sent: Tuesday, January 05, 2016 8:51 AM
To: CollectionSpace Talk List
Subject: Re: [Talk] Unusual database state linking collectionobject record to media record; seeking troubleshooting tips

Thanks for thinking about this, Ray.  Some answers to your questions inline below:

On Jan 4, 2016, at 5:16 PM, Ray Lee <rhlee@berkeley.edu mailto:rhlee@berkeley.edu> wrote:

Hi Peter,
Here are a few things to check:
Are any of the relation records soft-deleted?

No -- the relation records are <workflowState> project </workflowState>

Are either the media or collectionobject record soft-deleted?

No -- both are <workflowState> project </workflowState>

Does the query to the REST API for the related media records of the collectionobject return the expected media record? If so, does the query from the UI to the app layer return the expected record?

--
Peter Murray
Dev/Ops Lead and Project Manager
Cherry Hill Company

Thanks for chiming in, Richard. The REST query to get the Media resource CSID returned the one Media record that is related to the cataloging record. The REST query for the derivatives for that media record did seem to return all of the appropriate entries (https://gist.github.com/dltj/c014f597b12672c93db7#file-cspace-services_media_3c84e058-90c8-4059-8722_blob_derivatives-xml <https://gist.github.com/dltj/c014f597b12672c93db7#file-cspace-services_media_3c84e058-90c8-4059-8722_blob_derivatives-xml>), and I am able to see the content of the Medium derivative. Peter > On Jan 5, 2016, at 1:24 PM, Richard Millet <richard.millet@lyrasis.org> wrote: > > Peter, > > It's possible that not all image derivatives got created for the Media resource in question. > > Get the CSID of the object's related Media resouce by using the Relation service API. For example: > http://demo.collectionspace.org:8180/cspace-services/relations?wf_deleted=false&sbj=0e347e6e-42c7-4243-9b1e&objType=Media <http://demo.collectionspace.org:8180/cspace-services/relations?wf_deleted=false&sbj=0e347e6e-42c7-4243-9b1e&objType=Media> > > Check that all the derivatives of the Media resource actually exist. Here are some example API queries that you can use to do this: > > Lists all the derivative resources: > http://demo.collectionspace.org:8180/cspace-services/media/b4e40f17-2377-4b55-9d78/blob/derivatives <http://demo.collectionspace.org:8180/cspace-services/media/b4e40f17-2377-4b55-9d78/blob/derivatives> > > See the actual content of the derivative resource: > http://demo.collectionspace.org:8180/cspace-services/media/b4e40f17-2377-4b55-9d78/blob/derivatives/Medium/content <http://demo.collectionspace.org:8180/cspace-services/media/b4e40f17-2377-4b55-9d78/blob/derivatives/Medium/content> > > -Richard > > > > > From: Talk <talk-bounces@lists.collectionspace.org> on behalf of Peter Murray <pmurray@chillco.com> > Sent: Tuesday, January 05, 2016 8:51 AM > To: CollectionSpace Talk List > Subject: Re: [Talk] Unusual database state linking collectionobject record to media record; seeking troubleshooting tips > > Thanks for thinking about this, Ray. Some answers to your questions inline below: > > >> On Jan 4, 2016, at 5:16 PM, Ray Lee <rhlee@berkeley.edu <mailto:rhlee@berkeley.edu>> wrote: >> >> Hi Peter, >> Here are a few things to check: >> Are any of the relation records soft-deleted? > > No -- the relation records are <workflowState> project </workflowState> > >> Are either the media or collectionobject record soft-deleted? > > No -- both are <workflowState> project </workflowState> > >> Does the query to the REST API for the related media records of the collectionobject return the expected media record? If so, does the query from the UI to the app layer return the expected record? -- Peter Murray Dev/Ops Lead and Project Manager Cherry Hill Company
RM
Richard Millet
Fri, Jan 8, 2016 10:06 PM

Peter,

Mystery solved! It looks like you initially imported/added media records and then customized/modified the media schema and then imported more media records.

The initial media records were marked as Nuxeo document type "Media" and the post-customization records where marked as document type "MediaTenant11" (the name of the custom media schema).

The Services layer, thinking your media records where ALL of type "MediaTenant11" excluded the older ones.  This is certainly a bug in the Services layer.  Nuxeo supports the concept of document sub-types, so the CollectionSpace services should have been using the type "Media" when performing its queries.

We'll fix this (https://issues.collectionspace.org/browse/CSPACE-6869) before the v4.3 release (currently scheduled for Feb 8th).

Until then, you can work around this issue by performing an SQL update on the "hierarchy" table's "primarytype" column.  The SQL would look something like this:

UPDATE hierarchy SET primarytype = ''MediaTenant11" where primarytype = ''Media";

Of course, please make a backup of the database before making any change like this.

Thanks,

Richard


From: Richard Millet
Sent: Tuesday, January 05, 2016 10:24 AM
To: Peter Murray
Cc: CollectionSpace Talk List
Subject: Re: [Talk] Unusual database state linking collectionobject record to media record; seeking troubleshooting tips

Peter,

It's possible that not all image derivatives got created for the Media resource in question.

Get the CSID of the object's related Media resouce by using the Relation service API.  For example:
http://demo.collectionspace.org:8180/cspace-services/relations?wf_deleted=false&sbj=0e347e6e-42c7-4243-9b1e&objType=Media

Check that all the derivatives of the Media resource actually exist.  Here are some example API queries that you can use to do this:

Lists all the derivative resources:
http://demo.collectionspace.org:8180/cspace-services/media/b4e40f17-2377-4b55-9d78/blob/derivatives

See the actual content of the derivative resource:
http://demo.collectionspace.org:8180/cspace-services/media/b4e40f17-2377-4b55-9d78/blob/derivatives/Medium/content

-Richard


From: Talk talk-bounces@lists.collectionspace.org on behalf of Peter Murray pmurray@chillco.com
Sent: Tuesday, January 05, 2016 8:51 AM
To: CollectionSpace Talk List
Subject: Re: [Talk] Unusual database state linking collectionobject record to media record; seeking troubleshooting tips

Thanks for thinking about this, Ray.  Some answers to your questions inline below:

On Jan 4, 2016, at 5:16 PM, Ray Lee <rhlee@berkeley.edumailto:rhlee@berkeley.edu> wrote:

Hi Peter,
Here are a few things to check:

  • Are any of the relation records soft-deleted?

No -- the relation records are <workflowState>
project
</workflowState>

  • Are either the media or collectionobject record soft-deleted?

No -- both are <workflowState>
project
</workflowState>

  • Does the query to the REST API for the related media records of the collectionobject return the expected media record? If so, does the query from the UI to the app layer return the expected record?

(I think this answers your questions.) No, the REST query -- https://cs.museumofman.org/collectionspace/tenant/sdmom/cataloging/media/cf9e5c0b-a874-4ed0-be0f?pageNum=0&pageSize=40 -- returns JSON where 'items' is an empty list.  The REST query for related procedures -- https://cs.museumofman.org/collectionspace/tenant/sdmom/cataloging/procedures/cf9e5c0b-a874-4ed0-be0f?pageNum=0&pageSize=10&sortDir=1&sortKey=number -- returns JSON with a list of three 'items', one of which is the media procedure record.

  • What are your permissions on media and collectionobject records?

The account that created the records has write permissions for both media and cataloging.  The account doing the querying (me) has full privileges across the board.

Peter

On Mon, Dec 28, 2015 at 11:37 AM, Peter Murray <pmurray@chillco.commailto:pmurray@chillco.com> wrote:
Our CollectionSpace database is in a strange state for a connection between a CollectionObject record and a Media record.  The symptoms are these:

  • There exists a CollectionObject record (cf9e5c0b) and a Media record (3c84e058) that were created by an intern through the CSpace web UI.

  • In the right sidebar of the CollectionObject record there is a listing and link to the Media procedure record.

  • In the right sidebar of the Media record there is a listing and link to the CollectionObject record.

  • The media view area of the CollectionObject record DOES NOT have a thumbnail view of the Media image, but the thumbnail DOES appear on the media view area of the Media procedure record.

  • On the CollectionObject record page under the "Media Handling" tab, there IS NOT a link to the Media procedure record.

  • On the Media record, there IS a link to the related CollectionObject record on the "Cataloging" tab.

  • There are Relations records where the CollectionObject record and Media record appear as the subject and object of relations with predicate type "affects" (see https://gist.github.com/dltj/c014f597b12672c93db7#file-38b3396a-4dc2-44d8-b375-xml for CollectionObject->affects->Media and https://gist.github.com/dltj/c014f597b12672c93db7#file-d662fa69-b7cc-4cf6-9915-xml for Media->affects->CollectionObject).

To my eye, all of this looks correct when comparing to other records.  It appears, though, that part of the system doesn't know that the CollectionObject record is related to the Media record.  I have not tried to relate the CollectionObject record to the Media record again so as not to contaminate the situation further until I got advice on how to troubleshoot something like this.

Peter

--
Peter Murray
Dev/Ops Lead and Project Manager
Cherry Hill Company

Peter, Mystery solved! It looks like you initially imported/added media records and then customized/modified the media schema and then imported more media records. The initial media records were marked as Nuxeo document type "Media" and the post-customization records where marked as document type "MediaTenant11" (the name of the custom media schema). The Services layer, thinking your media records where ALL of type "MediaTenant11" excluded the older ones. This is certainly a bug in the Services layer. Nuxeo supports the concept of document sub-types, so the CollectionSpace services should have been using the type "Media" when performing its queries. We'll fix this (https://issues.collectionspace.org/browse/CSPACE-6869) before the v4.3 release (currently scheduled for Feb 8th). Until then, you can work around this issue by performing an SQL update on the "hierarchy" table's "primarytype" column. The SQL would look something like this: UPDATE hierarchy SET primarytype = ''MediaTenant11" where primarytype = ''Media"; Of course, please make a backup of the database before making any change like this. Thanks, Richard ________________________________ From: Richard Millet Sent: Tuesday, January 05, 2016 10:24 AM To: Peter Murray Cc: CollectionSpace Talk List Subject: Re: [Talk] Unusual database state linking collectionobject record to media record; seeking troubleshooting tips Peter, It's possible that not all image derivatives got created for the Media resource in question. Get the CSID of the object's related Media resouce by using the Relation service API. For example: http://demo.collectionspace.org:8180/cspace-services/relations?wf_deleted=false&sbj=0e347e6e-42c7-4243-9b1e&objType=Media Check that all the derivatives of the Media resource actually exist. Here are some example API queries that you can use to do this: Lists all the derivative resources: http://demo.collectionspace.org:8180/cspace-services/media/b4e40f17-2377-4b55-9d78/blob/derivatives See the actual content of the derivative resource: http://demo.collectionspace.org:8180/cspace-services/media/b4e40f17-2377-4b55-9d78/blob/derivatives/Medium/content -Richard ________________________________ From: Talk <talk-bounces@lists.collectionspace.org> on behalf of Peter Murray <pmurray@chillco.com> Sent: Tuesday, January 05, 2016 8:51 AM To: CollectionSpace Talk List Subject: Re: [Talk] Unusual database state linking collectionobject record to media record; seeking troubleshooting tips Thanks for thinking about this, Ray. Some answers to your questions inline below: On Jan 4, 2016, at 5:16 PM, Ray Lee <rhlee@berkeley.edu<mailto:rhlee@berkeley.edu>> wrote: Hi Peter, Here are a few things to check: * Are any of the relation records soft-deleted? No -- the relation records are <workflowState> project </workflowState> * Are either the media or collectionobject record soft-deleted? No -- both are <workflowState> project </workflowState> * Does the query to the REST API for the related media records of the collectionobject return the expected media record? If so, does the query from the UI to the app layer return the expected record? (I think this answers your questions.) No, the REST query -- https://cs.museumofman.org/collectionspace/tenant/sdmom/cataloging/media/cf9e5c0b-a874-4ed0-be0f?pageNum=0&pageSize=40 -- returns JSON where 'items' is an empty list. The REST query for related procedures -- https://cs.museumofman.org/collectionspace/tenant/sdmom/cataloging/procedures/cf9e5c0b-a874-4ed0-be0f?pageNum=0&pageSize=10&sortDir=1&sortKey=number -- returns JSON with a list of three 'items', one of which is the media procedure record. * What are your permissions on media and collectionobject records? The account that created the records has write permissions for both media and cataloging. The account doing the querying (me) has full privileges across the board. Peter On Mon, Dec 28, 2015 at 11:37 AM, Peter Murray <pmurray@chillco.com<mailto:pmurray@chillco.com>> wrote: Our CollectionSpace database is in a strange state for a connection between a CollectionObject record and a Media record. The symptoms are these: * There exists a CollectionObject record (cf9e5c0b) and a Media record (3c84e058) that were created by an intern through the CSpace web UI. * In the right sidebar of the CollectionObject record there is a listing and link to the Media procedure record. * In the right sidebar of the Media record there is a listing and link to the CollectionObject record. * The media view area of the CollectionObject record DOES NOT have a thumbnail view of the Media image, but the thumbnail DOES appear on the media view area of the Media procedure record. * On the CollectionObject record page under the "Media Handling" tab, there IS NOT a link to the Media procedure record. * On the Media record, there IS a link to the related CollectionObject record on the "Cataloging" tab. * There are Relations records where the CollectionObject record and Media record appear as the subject and object of relations with predicate type "affects" (see https://gist.github.com/dltj/c014f597b12672c93db7#file-38b3396a-4dc2-44d8-b375-xml for CollectionObject->affects->Media and https://gist.github.com/dltj/c014f597b12672c93db7#file-d662fa69-b7cc-4cf6-9915-xml for Media->affects->CollectionObject). To my eye, all of this looks correct when comparing to other records. It appears, though, that part of the system doesn't know that the CollectionObject record is related to the Media record. I have not tried to relate the CollectionObject record to the Media record again so as not to contaminate the situation further until I got advice on how to troubleshoot something like this. Peter -- Peter Murray Dev/Ops Lead and Project Manager Cherry Hill Company
PM
Peter Murray
Mon, Jan 11, 2016 3:00 PM

That did the trick -- many thanks, Richard.

Peter

On Jan 8, 2016, at 5:06 PM, Richard Millet richard.millet@lyrasis.org wrote:

Peter,

Mystery solved! It looks like you initially imported/added media records and then customized/modified the media schema and then imported more media records.

The initial media records were marked as Nuxeo document type "Media" and the post-customization records where marked as document type "MediaTenant11" (the name of the custom media schema).

The Services layer, thinking your media records where ALL of type "MediaTenant11" excluded the older ones.  This is certainly a bug in the Services layer.  Nuxeo supports the concept of document sub-types, so the CollectionSpace services should have been using the type "Media" when performing its queries.

We'll fix this (https://issues.collectionspace.org/browse/CSPACE-6869 https://issues.collectionspace.org/browse/CSPACE-6869) before the v4.3 release (currently scheduled for Feb 8th).

Until then, you can work around this issue by performing an SQL update on the "hierarchy" table's "primarytype" column.  The SQL would look something like this:

UPDATE hierarchy SET primarytype = ''MediaTenant11" where primarytype = ''Media";

Of course, please make a backup of the database before making any change like this.

Thanks,

Richard

From: Richard Millet
Sent: Tuesday, January 05, 2016 10:24 AM
To: Peter Murray
Cc: CollectionSpace Talk List
Subject: Re: [Talk] Unusual database state linking collectionobject record to media record; seeking troubleshooting tips

Peter,

It's possible that not all image derivatives got created for the Media resource in question.

Get the CSID of the object's related Media resouce by using the Relation service API.  For example:
http://demo.collectionspace.org:8180/cspace-services/relations?wf_deleted=false&sbj=0e347e6e-42c7-4243-9b1e&objType=Media http://demo.collectionspace.org:8180/cspace-services/relations?wf_deleted=false&sbj=0e347e6e-42c7-4243-9b1e&objType=Media

Check that all the derivatives of the Media resource actually exist.  Here are some example API queries that you can use to do this:

Lists all the derivative resources:
http://demo.collectionspace.org:8180/cspace-services/media/b4e40f17-2377-4b55-9d78/blob/derivatives http://demo.collectionspace.org:8180/cspace-services/media/b4e40f17-2377-4b55-9d78/blob/derivatives

See the actual content of the derivative resource:
http://demo.collectionspace.org:8180/cspace-services/media/b4e40f17-2377-4b55-9d78/blob/derivatives/Medium/content http://demo.collectionspace.org:8180/cspace-services/media/b4e40f17-2377-4b55-9d78/blob/derivatives/Medium/content

-Richard

From: Talk talk-bounces@lists.collectionspace.org on behalf of Peter Murray pmurray@chillco.com
Sent: Tuesday, January 05, 2016 8:51 AM
To: CollectionSpace Talk List
Subject: Re: [Talk] Unusual database state linking collectionobject record to media record; seeking troubleshooting tips

Thanks for thinking about this, Ray.  Some answers to your questions inline below:

On Jan 4, 2016, at 5:16 PM, Ray Lee <rhlee@berkeley.edu mailto:rhlee@berkeley.edu> wrote:

Hi Peter,
Here are a few things to check:
Are any of the relation records soft-deleted?

No -- the relation records are <workflowState> project </workflowState>

Are either the media or collectionobject record soft-deleted?

No -- both are <workflowState> project </workflowState>

Does the query to the REST API for the related media records of the collectionobject return the expected media record? If so, does the query from the UI to the app layer return the expected record?

--
Peter Murray
Dev/Ops Lead and Project Manager
Cherry Hill Company

That did the trick -- many thanks, Richard. Peter > On Jan 8, 2016, at 5:06 PM, Richard Millet <richard.millet@lyrasis.org> wrote: > > Peter, > > Mystery solved! It looks like you initially imported/added media records and then customized/modified the media schema and then imported more media records. > > The initial media records were marked as Nuxeo document type "Media" and the post-customization records where marked as document type "MediaTenant11" (the name of the custom media schema). > > The Services layer, thinking your media records where ALL of type "MediaTenant11" excluded the older ones. This is certainly a bug in the Services layer. Nuxeo supports the concept of document sub-types, so the CollectionSpace services should have been using the type "Media" when performing its queries. > > We'll fix this (https://issues.collectionspace.org/browse/CSPACE-6869 <https://issues.collectionspace.org/browse/CSPACE-6869>) before the v4.3 release (currently scheduled for Feb 8th). > > Until then, you can work around this issue by performing an SQL update on the "hierarchy" table's "primarytype" column. The SQL would look something like this: > > UPDATE hierarchy SET primarytype = ''MediaTenant11" where primarytype = ''Media"; > > Of course, please make a backup of the database before making any change like this. > > Thanks, > > Richard > > From: Richard Millet > Sent: Tuesday, January 05, 2016 10:24 AM > To: Peter Murray > Cc: CollectionSpace Talk List > Subject: Re: [Talk] Unusual database state linking collectionobject record to media record; seeking troubleshooting tips > > Peter, > > It's possible that not all image derivatives got created for the Media resource in question. > > Get the CSID of the object's related Media resouce by using the Relation service API. For example: > http://demo.collectionspace.org:8180/cspace-services/relations?wf_deleted=false&sbj=0e347e6e-42c7-4243-9b1e&objType=Media <http://demo.collectionspace.org:8180/cspace-services/relations?wf_deleted=false&sbj=0e347e6e-42c7-4243-9b1e&objType=Media> > > Check that all the derivatives of the Media resource actually exist. Here are some example API queries that you can use to do this: > > Lists all the derivative resources: > http://demo.collectionspace.org:8180/cspace-services/media/b4e40f17-2377-4b55-9d78/blob/derivatives <http://demo.collectionspace.org:8180/cspace-services/media/b4e40f17-2377-4b55-9d78/blob/derivatives> > > See the actual content of the derivative resource: > http://demo.collectionspace.org:8180/cspace-services/media/b4e40f17-2377-4b55-9d78/blob/derivatives/Medium/content <http://demo.collectionspace.org:8180/cspace-services/media/b4e40f17-2377-4b55-9d78/blob/derivatives/Medium/content> > > -Richard > > > > > From: Talk <talk-bounces@lists.collectionspace.org> on behalf of Peter Murray <pmurray@chillco.com> > Sent: Tuesday, January 05, 2016 8:51 AM > To: CollectionSpace Talk List > Subject: Re: [Talk] Unusual database state linking collectionobject record to media record; seeking troubleshooting tips > > Thanks for thinking about this, Ray. Some answers to your questions inline below: > > >> On Jan 4, 2016, at 5:16 PM, Ray Lee <rhlee@berkeley.edu <mailto:rhlee@berkeley.edu>> wrote: >> >> Hi Peter, >> Here are a few things to check: >> Are any of the relation records soft-deleted? > > No -- the relation records are <workflowState> project </workflowState> > >> Are either the media or collectionobject record soft-deleted? > > No -- both are <workflowState> project </workflowState> > >> Does the query to the REST API for the related media records of the collectionobject return the expected media record? If so, does the query from the UI to the app layer return the expected record? -- Peter Murray Dev/Ops Lead and Project Manager Cherry Hill Company