[ECOMMERCE-360] Exception when open Product Chooser which "productChooserField" field Created: 01/Feb/21  Updated: 05/Apr/21  Resolved: 31/Mar/21

Status: Closed
Project: E-commerce
Component/s: None
Affects Version/s: 1.2.3
Fix Version/s: 1.2.4

Type: Bug Priority: Neutral
Reporter: Oanh Thai Hoang Assignee: Antonín Juran
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: 2d 3.25h
Original Estimate: Not Specified

Attachments: PNG File Screen Shot 2021-02-01 at 17.11.47.png    
Issue Links:
Relates
relates to ECOMMERCE-355 Product Picker. categoryChooserField ... Closed
relates to ECOMMERCE-339 Exception opening product & category ... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* 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:
Epic Link: Commerce fixes and improvements 1.2.4 - 1.2.5
Sprint: Add-Ons 60
Story Points: 5

 Description   

Steps to reproduce

  •  Configure a dialog using the productChooserField
    form: 
      properties: 
        product: 
          $type: productChooserField
          connection: connection
          definition: commercetools
          categoryId: 05005125-3b5b-40df-bd8f-18cf6e2aa0d4
    
  • Open the dialog and browse the product, select one product.
  • Click to edit that selected product

Expected results

Can browse the products and then select new one.

Actual results

  • Exception throw but still can select the new one

Error log:

java.lang.ClassCastException: info.magnolia.ecommerce.commercetools.common.CommercetoolsProduct cannot be cast to java.lang.Stringjava.lang.ClassCastException: info.magnolia.ecommerce.commercetools.common.CommercetoolsProduct cannot be cast to java.lang.String at info.magnolia.ui.contentapp.CaptionFilteringDataProviderWrapper.lambda$fetch$0(CaptionFilteringDataProviderWrapper.java:88) ~[magnolia-ui-framework-6.2.5.jar:?] at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174) ~[?:1.8.0_181] at java.util.stream.SliceOps$1$1.accept(SliceOps.java:204) ~[?:1.8.0_181] at java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:395) ~[?:1.8.0_181] at java.util.stream.Sink$ChainedReference.end(Sink.java:258) ~[?:1.8.0_181] at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:499) ~[?:1.8.0_181] at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485) ~[?:1.8.0_181] at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[?:1.8.0_181] at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[?:1.8.0_181] at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_181] at java.util.stream.LongPipeline.reduce(LongPipeline.java:438) ~[?:1.8.0_181] at java.util.stream.LongPipeline.sum(LongPipeline.java:396) ~[?:1.8.0_181] at java.util.stream.ReferencePipeline.count(ReferencePipeline.java:526) ~[?:1.8.0_181]

Workaround

No apparent workaround.

Development notes

May create a new converter like https://jira.magnolia-cms.com/browse/ECOMMERCE-339


Generated at Mon Feb 12 01:43:19 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.