When a rich:fileUpload si submitted (i.e. files are uploaded) action of the form is not preserved well.
In fileupload.js __submit method there is the following code:
the var "originalAction" is then used to revert to the original action url of the form. However, encodedURLInputs and form action prop does not contain the same url. Because encodedURLInputs has bigger priority URL from that input is restored into the form and not the original form action. This breaks the form as the next submission fails.
In portal the solution is
and then restore "originalFormAction" instead of "originalAction", but I am not sure if this doesn't break anything in other environments.
Is this a bug in richfaces or is the content of input[name='javax.faces.encodedURL'] set badly?
To reproduce you can use the reproducer attached.