Files
ofbiz-framework/framework/webtools
Jacques Le Roux 61e5435b30 Fixed: "entity/list" request is not handled well
(OFBIZ-11593)

The "entity/list" request has been put in with OFBIZ-11007. It's used to call
the entitymaint view and so is a demo/didactic duplicate of entitymaint request.
It's only used in FindGeneric screen (look for WebtoolsBackToEntityList label).
It's problematic because since the CSRF token defense was put in you can no
longer filter the entities from the entities list screen, even when the default
NoCsrfDefenseStrategy is used. It works if you use the entitymaint request
instead.

2020-01-19 I proposed in OFBIZ-11306 a solution for such cases.
It was not used because 2020-02-14 I thought it was no longer needed.
It was necessary for this case and implemented with commit e487122.

But as, Rohit Koushal reported, it breaks some functionalities like adding
address/update address during Quick Finalize Order. The issue can also be
reproduced in ecommerce when trying the same while checking out, or quick
checking out, an order.

More generally the error is of this kind:
|27.0.0.1-8009-exec-3 |ControlServlet                |E| Error in request handler:
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
  at java.util.LinkedList.checkElementIndex(LinkedList.java:555) ~[?:1.8.0_252]
  at java.util.LinkedList.get(LinkedList.java:476) ~[?:1.8.0_252]
  at org.apache.ofbiz.webapp.control.RequestHandler.getRequestUri(RequestHandler.java:837) ~[main/:?]

and happens with URLs like
updateCheckoutOptions/editcontactmech?DONE_PAGE=checkoutoptions&contactMechId=9015
or
updateCheckoutOptions/editcontactmech?preContactMechTypeId=POSTAL_ADDRESS&
contactMechPurposeTypeId=SHIPPING_LOCATION&DONE_PAGE=checkoutoptions

So I decided to revert the concerned part of commit e487122 and to rather use
entitymaint instead of "entity/list" request.
2020-04-29 08:29:33 +02:00
..
2020-01-17 15:14:15 +01:00
2020-02-27 14:36:26 +01:00