[JCRTOOLS-40] JCR Tools does not support property has multiple values Created: 21/Mar/17  Updated: 29/Mar/22  Resolved: 03/Apr/17

Status: Closed
Project: JCR Tools
Component/s: None
Affects Version/s: 1.0.3
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Oanh Thai Hoang Assignee: Khuong Nguyen
Resolution: Cannot Reproduce Votes: 1
Labels: None
Remaining Estimate: 1d 5h
Time Spent: 1d 7h
Original Estimate: 3.5d

Attachments: PNG File JCR-Browser-multiple-values.png     PNG File JCR-tools-multiple-values.png     PNG File error_when_editing_multiple_property_on_jcr_browser.png    
Issue Links:
Relates
relates to MGNLDAM-563 DublinCore metadata cannot be retriev... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Sprint: Saigon 89
Story Points: 2
Team: Nucleus

 Description   

Step to reproduce:

  • Using Rest Tools to create a dam node that property "contributor" is multiple values
    Ex:
    {
       "name":"test",
       "type":"mgnl:asset",
       "path":"/test",
       "properties":[
          {
             "name":"type",
             "type":"String",
             "multiple":false,
             "values":[
                "png"
             ]
          },
          {
             "name":"name",
             "type":"String",
             "multiple":false,
             "values":[
                "test"
             ]
          },
          {
             "name":"type",
             "type":"String",
             "multiple":false,
             "values":[
                "png"
             ]
          },
          {
             "name":"contributor",
             "type":"String",
             "multiple":true,
             "values":[
                "hieugioi",
                "hieutot"
             ]
          }
       ]
    }
    
    
  • Open JCR Browser for checking that node
  • Open JCR Tools for checking that node
    -> JCR Tools does not show the "contributor" property and log exception is thrown as below:
javax.jcr.ValueFormatException: property /test/contributor is a multi-valued property, so it's values can only be retrieved as an array
	at org.apache.jackrabbit.core.PropertyImpl.internalGetValue(PropertyImpl.java:483)
	at org.apache.jackrabbit.core.PropertyImpl.getValue(PropertyImpl.java:510)
	at org.apache.jackrabbit.core.PropertyImpl.getString(PropertyImpl.java:520)
	at info.magnolia.jcr.wrapper.DelegatePropertyWrapper.getString(DelegatePropertyWrapper.java:162)
	at info.magnolia.jcr.wrapper.DelegatePropertyWrapper.getString(DelegatePropertyWrapper.java:162)
	at info.magnolia.jcr.wrapper.DelegatePropertyWrapper.getString(DelegatePropertyWrapper.java:162)
	at info.magnolia.jcr.wrapper.DelegatePropertyWrapper.getString(DelegatePropertyWrapper.java:162)
	at info.magnolia.jcr.wrapper.DelegatePropertyWrapper.getString(DelegatePropertyWrapper.java:162)
	at info.magnolia.cms.util.DumperUtil.dump(DumperUtil.java:153)
	at info.magnolia.cms.util.DumperUtil.dump(DumperUtil.java:83)


 Comments   
Comment by Mikaël Geljić [ 31/Mar/17 ]

Indeed, I cannot reproduce it either on demo, in tours for the tourTypes property
It displays correct output:

/magnolia-travels/Vietnam--Tradition-and-Today/tourTypes=415025c6-e4b5-4506-9384-34f428a52104,e007e401-1bf8-4658-8293-b9c743784264

oanh.thai can you still reproduce it your case? what is the difference between that and tourTypes then?

Comment by Oanh Thai Hoang [ 03/Apr/17 ]

Hi khuong.nguyenduy, mgeljic, Neither do I, I couldn't reproduce the problem again. Ticket should be closed

Generated at Mon Feb 12 02:17:21 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.