Describe the bug
Try to import the project without a file attachment and the error will be shown.
To Reproduce
Steps to reproduce the behavior:
If you attach a wrong file/file format and try to proceed you will see the same error.
Current Results

Expected behavior
There should be an alert and I should not be allowed to proceed without a file attachment
Similar to this :

Desktop (please complete the following information):
OpenRefine (please complete the following information):
@AghaSaad04 Looking forward to your fix on this! :-) You can do it!
Sure @thadguidry, I will look into this
I want to do that
@chetan-v Great Chetan! Let us know if you need help.
@chetan-v Great Chetan! Let us know if you need help.
Yeah sure,if I need
Who will surely
Please give me some guidance @thadguidry @tfmorris
Please give some hint I read alot about this.
I tried but I failed to redirect
What is the specific problem you need help about? How are you planning to solve this problem and where exactly are you stuck?
Actually I just want to give a alert message when we do not choose any file and click import project button
Great! These are the steps you will need to follow to solve this issue:
https://github.com/OpenRefine/OpenRefine/wiki/Your-first-pull-request
At which of these stages are you stuck?
I am unable to find the root file in which I should change.
In (create project menu) has their JS file that check the condition and give alert
but in JS file of (import project menu) not have that condition to check and give alert.
I am confused about the type of Changes in Java or in JavaScript
This will be solved in the frontend, so Javascript. You are on the right track: imitating in the import project menu the check that is done in the create project menu sounds like a great approach! Can you give me a link to these two Javascript files?
In this file they check and give message
(main/webapp/modules/core/scripts/index/import-project-ui.js) I think they do their work perfectly
they only give data on screen they both are different to each other which is not a problem in (import project menu) all work is done by its backend. (ImportProjectCommand.java)
they contains
(doPost):-
function that give information or whatever to (respondWithErrorPage) and they dont contain the certain condition. I think the condition should be their.
(respondWithErrorPage):-
Checking for the presence of a file and alerting the user must be done before sending anything to the backend, so you should ignore all Java files for this issue. You are right that the check you should imitate is at
https://github.com/OpenRefine/OpenRefine/blob/306b541c699e7e87d5e08be1310575b85b15dbf0/main/webapp/modules/core/scripts/index/default-importing-sources/sources.js#L60-L62
How about just doing something similar in the JS file for the "import project" pane?
Closed by #2369.