Error in request of multiples parameters with same name and value

Enonic version: 7.2

I’m trying to replicate a behavior of a PHP project where the GET request send parameters with same name and value, but the request parameters values in the controller just show one unique occurrence per name and value.

evidence:

LOG: req.params - {“filter”:“yes”,“advanced-search[]”:“2020”,“logical[]”:"+",“status[]”:[“kommende”,“gjeldende”]}

Is there any solution for this issue?

I will give another explanation about the problem my colleague just found:
We are migrating from a legacy Ez Publish website.
There is a search page with the following parameter pattern that we must keep for compatibility purposes:

search.php
	 ?filter=yes
	 &status[]=Kommende
	 &status[]=Gjeldende
	 &advanced-search[]=og1
	 &logical[]=%2B
	 &advanced-search[]=og2
	 &logical[]=%2B
	 &advanced-search[]=ikke1
	 &logical[]=-
	 &advanced-search[]=eller1
	 &logical[]=

Those %2B with will be decoded as “+” symbol on Enonic controller (and it’s OK).
But it looks like Enonic request handler is removing duplicated entries from parameter array:

:point_up_2: this is what we got when printing (log.info + JSON.stringify) from Enonic controller

 

But that’s what we are expecting:

I mean, we are expecting both of “+” signs.

That looks strange indeed. We’ll file a bug and look into it!

1 Like

Follow up

1 Like