WE HAVE SUNSET THIS LISTSERV - Join us at collectionspace@lyrasislists.org
View all threadsHi All,
I'm kind stuck getting a structured date field that is nested inside a repeat field to persist its data after saving. The expected structured date functionality in the UI occurs, as in the drop down appears and the value entered into "display date" populates the simple field, but when I save the record, that data disappears. Other fields within the repeat group do persist successfully.
The app layer config is here:
The UI template is here:
Examining the POST request that is sent on saving the record, all sub-fields within the failing structured date sub-field are empty. BY comparison, another structured date field (not within a repeat) in the same extension and which is persisting data successfully has a POST request with the expected data in the fields, so I think the issue is front end and not back end.
I modeled my work on an existing structured date within a repat
https://github.com/collectionspace/application/blob/master/tomcat-main/src/main/resources/defaults/base-collectionobject.xml#L530
https://github.com/collectionspace/ui/blob/master/src/main/webapp/defaults/html/pages/CatalogingTemplate.html
I also tried copying what is done in the Place authority since it resembles my use case even closer, but again no luck:
https://github.com/collectionspace/ui/blob/master/src/main/webapp/defaults/html/pages/PlaceTemplate.html#L144-L146https://github.com/collectionspace/ui/blob/master/src/main/webapp/defaults/html/pages/PlaceTemplate.html#L144
But obviously I'm missing something.
Any thoughts?
Thanks
Chad
Hi Chad,
An issue whose behavior sounds similar to the behavior you describe is
still listed as unresolved:
http://issues.collectionspace.org/browse/CSPACE-5085
While that may or may not be the issue you encountered - and also noting
this issue predates the Unified Configuration work in v4.0, so I'm not sure
if the issue and its analysis might still be applicable - it looks like Ray
provided a suggested workaround - explicitly setting the 'section'
attribute (schema) for each field in the structured date (see first comment
in that issue).
Ray also mentions a possibly necessary hack to the JSON-to-XMLconversion
code (see this later comment:
http://issues.collectionspace.org/browse/CSPACE-5085?focusedCommentId=29092&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-29092
).
Anyway, if the workaround - with or without the code hack - resolves this
for you, there's some high likelihood this is the same issue.
Aron
On Tue, May 5, 2015 at 2:15 PM, Chad Nelson chad.nelson@lyrasis.org wrote:
Hi All,
I'm kind stuck getting a structured date field that is nested inside a
repeat field to persist its data after saving. The expected structured date
functionality in the UI occurs, as in the drop down appears and the value
entered into "display date" populates the simple field, but when I save the
record, that data disappears. Other fields within the repeat group do
persist successfully.
The app layer config is here:
The UI template is here:
Examining the POST request that is sent on saving the record, all
sub-fields within the failing structured date sub-field are empty. BY
comparison, another structured date field (not within a repeat) in the
same extension and which is persisting data successfully has a POST
request with the expected data in the fields, so I think the issue is
front end and not back end.
I modeled my work on an existing structured date within a repat
I also tried copying what is done in the Place authority since it
resembles my use case even closer, but again no luck:
https://github.com/collectionspace/ui/blob/master/src/main/webapp/defaults/html/pages/PlaceTemplate.html#L144-L146
https://github.com/collectionspace/ui/blob/master/src/main/webapp/defaults/html/pages/PlaceTemplate.html#L144
But obviously I'm missing something.
Any thoughts?
Thanks
Chad
Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
Ah yes, Aron is correct. It's a longstanding bug that structured dates in
repeating groups in extension schema do not work, and it's still an issue
in 4.X. The workaround is described in that JIRA, which is to explicitly
declare all the fields in the structured date, with the appropriate section
attribute. I don't think you'll need the code hack for this situation. If
I'm understanding my comment, that's only needed if the structured date
itself is repeating.
Ray
On Tue, May 5, 2015 at 5:54 PM, Aron Roberts aron@socrates.berkeley.edu
wrote:
Hi Chad,
An issue whose behavior sounds similar to the behavior you describe is
still listed as unresolved:
http://issues.collectionspace.org/browse/CSPACE-5085
While that may or may not be the issue you encountered - and also noting
this issue predates the Unified Configuration work in v4.0, so I'm not sure
if the issue and its analysis might still be applicable - it looks like Ray
provided a suggested workaround - explicitly setting the 'section'
attribute (schema) for each field in the structured date (see first comment
in that issue).
Ray also mentions a possibly necessary hack to the JSON-to-XMLconversion
code (see this later comment:
http://issues.collectionspace.org/browse/CSPACE-5085?focusedCommentId=29092&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-29092
).
Anyway, if the workaround - with or without the code hack - resolves
this for you, there's some high likelihood this is the same issue.
Aron
On Tue, May 5, 2015 at 2:15 PM, Chad Nelson chad.nelson@lyrasis.org
wrote:
Hi All,
I'm kind stuck getting a structured date field that is nested inside a
repeat field to persist its data after saving. The expected structured date
functionality in the UI occurs, as in the drop down appears and the value
entered into "display date" populates the simple field, but when I save the
record, that data disappears. Other fields within the repeat group do
persist successfully.
The app layer config is here:
The UI template is here:
Examining the POST request that is sent on saving the record, all
sub-fields within the failing structured date sub-field are empty. BY
comparison, another structured date field (not within a repeat) in the
same extension and which is persisting data successfully has a POST
request with the expected data in the fields, so I think the issue is
front end and not back end.
I modeled my work on an existing structured date within a repat
I also tried copying what is done in the Place authority since it
resembles my use case even closer, but again no luck:
https://github.com/collectionspace/ui/blob/master/src/main/webapp/defaults/html/pages/PlaceTemplate.html#L144-L146
https://github.com/collectionspace/ui/blob/master/src/main/webapp/defaults/html/pages/PlaceTemplate.html#L144
But obviously I'm missing something.
Any thoughts?
Thanks
Chad
Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
Aron, Ray
Thanks guys. That fixed my issue.
Chad
From: Ray Lee rhlee@berkeley.edu
Sent: Tuesday, May 5, 2015 9:22 PM
To: Aron Roberts
Cc: Chad Nelson; talk@lists.collectionspace.org
Subject: Re: [Talk] structured date field inside a repeat
Ah yes, Aron is correct. It's a longstanding bug that structured dates in repeating groups in extension schema do not work, and it's still an issue in 4.X. The workaround is described in that JIRA, which is to explicitly declare all the fields in the structured date, with the appropriate section attribute. I don't think you'll need the code hack for this situation. If I'm understanding my comment, that's only needed if the structured date itself is repeating.
Ray
On Tue, May 5, 2015 at 5:54 PM, Aron Roberts <aron@socrates.berkeley.edumailto:aron@socrates.berkeley.edu> wrote:
Hi Chad,
An issue whose behavior sounds similar to the behavior you describe is still listed as unresolved:
http://issues.collectionspace.org/browse/CSPACE-5085
While that may or may not be the issue you encountered - and also noting this issue predates the Unified Configuration work in v4.0, so I'm not sure if the issue and its analysis might still be applicable - it looks like Ray provided a suggested workaround - explicitly setting the 'section' attribute (schema) for each field in the structured date (see first comment in that issue).
Ray also mentions a possibly necessary hack to the JSON-to-XMLconversion code (see this later comment: http://issues.collectionspace.org/browse/CSPACE-5085?focusedCommentId=29092&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-29092).
Anyway, if the workaround - with or without the code hack - resolves this for you, there's some high likelihood this is the same issue.
Aron
On Tue, May 5, 2015 at 2:15 PM, Chad Nelson <chad.nelson@lyrasis.orgmailto:chad.nelson@lyrasis.org> wrote:
Hi All,
I'm kind stuck getting a structured date field that is nested inside a repeat field to persist its data after saving. The expected structured date functionality in the UI occurs, as in the drop down appears and the value entered into "display date" populates the simple field, but when I save the record, that data disappears. Other fields within the repeat group do persist successfully.
The app layer config is here:
The UI template is here:
Examining the POST request that is sent on saving the record, all sub-fields within the failing structured date sub-field are empty. BY comparison, another structured date field (not within a repeat) in the same extension and which is persisting data successfully has a POST request with the expected data in the fields, so I think the issue is front end and not back end.
I modeled my work on an existing structured date within a repat
https://github.com/collectionspace/application/blob/master/tomcat-main/src/main/resources/defaults/base-collectionobject.xml#L530
https://github.com/collectionspace/ui/blob/master/src/main/webapp/defaults/html/pages/CatalogingTemplate.html
I also tried copying what is done in the Place authority since it resembles my use case even closer, but again no luck:
https://github.com/collectionspace/ui/blob/master/src/main/webapp/defaults/html/pages/PlaceTemplate.html#L144-L146https://github.com/collectionspace/ui/blob/master/src/main/webapp/defaults/html/pages/PlaceTemplate.html#L144
But obviously I'm missing something.
Any thoughts?
Thanks
Chad
Talk mailing list
Talk@lists.collectionspace.orgmailto:Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
Talk mailing list
Talk@lists.collectionspace.orgmailto:Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org