akosthurzo/liferay-portal — pull request #12 by lipusz (2014-03-31 14:51:44+00:00)
Title: [TECHNICAL-SUPPORT | March 14] LPS-43148 Logo Editor (image_uploader) generates FileExtensionException

https://issues.liferay.com/browse/LPS-43148

Finally, I was managed to fix all problems I' discovered regarding the image_uploader ("Logo Editor").

##### Render path
1- Usage of
2- logo_selector/page.jsp
3- Creates a new Liferay.LogoSelector instance

4- logo_selector.js: render, bind etc.
5- "Change" action --> logo_selector.js#_openEditLogoWindow --> Renders portlet "image_uploader" (=195) in an iframe
6- UploadImageAction#render --> image_uploader/view.jsp
7- Creates a new Liferay.LogoEditor instance
8- logo_editor.js: render, bind etc.

9- User browses a new file --> logo_editor.js#_onFileNameChange --> _defUploadStartFn --> actionURL hits UploadImageAction#processAction with cmd = "ADD_TEMP" -->

10- UploadImageAction: JSON response containing either an "errorMessage" or the "tempImageFileName"
11- logo_editor.js#_defUploadComplete: add params to the previewURL

12- User clicks on save --> logo_editor#_onSubmit

Regarding the lipusz@6734024: we should not add any error messages to SessionErrors, because there is nor "render" phase executed if writeJSON was called for a given actionRequest, otherwise, there would be error messages displayed (coming from a previous error) upon the next full render.

Let me know if you have any concerns.

Regads,
Tibor