Opened 16 years ago
Closed 16 years ago
#1229 closed enhancement (fixed)
"Save as" parameter in plug-in dialogues can be impoved
Reported by: | Jari Häkkinen | Owned by: | Nicklas Nordborg |
---|---|---|---|
Priority: | major | Milestone: | BASE 2.9.3 |
Component: | web | Version: | 2.9.2 |
Keywords: | Cc: |
Description
Setting the 'Save as' parameter in the dialogue could be smarter. As it is now, browsing to the directory where to store the file will select the directory but you are required to type the file name in the field in the bottom of the browse window. However, users easily forget this and will get a error from BASE saying that they are not allowed to write in home:
Permission denied: Not allowed to use Directory[id=2; name=home]
The output is very informative for an experienced BASE user but users get confused by not being allowed to write in their home directory.
I suggest the following, in the browsing for a target directory there should be a default name for the produced file. There is already a default in the original 'Save as' parameter but it is destroyed as soon as browsing is started. Is it possible to pass this default file name to the directory browser as default file name? If not, could a default be set if no file was given by the user when the browser dialogue returns? Or when the error above is generated?
Change History (8)
follow-up: 3 comment:1 by , 16 years ago
comment:3 by , 16 years ago
Replying to nicklas:
Is the error really related to if a file name is provided or not? I am not able to reproduce it. Can you post the complete stack trace!
The stack trace is attached below. What I do is that I browse to the target directory but "forget" to add a filename in the field in the bottom of the dialogue. Doing this generates
Permission denied: Not allowed to use Directory[id=2; name=home] [Toggle display of detailed stacktrace] net.sf.basedb.core.PermissionDeniedException: Permission denied: Not allowed to use Directory[id=2; name=home] ...at net.sf.basedb.core.BasicItem.checkPermission(BasicItem.java:110) ...at net.sf.basedb.core.File.setDirectory(File.java:792) ...at net.sf.basedb.core.File.getNew(File.java:97) ...at net.sf.basedb.core.File.getByPath(File.java:181) ...at net.sf.basedb.core.plugin.AbstractExporterPlugin.pathCanBeUsed(AbstractExporterPlugin.java:363) ...at net.sf.basedb.plugins.PackedFileExporter.configure(PackedFileExporter.java:268) ...at net.sf.basedb.core.PluginConfigurationRequest.invoke(PluginConfigurationRequest.java:114) ...at org.apache.jsp.common.plugin.index_jsp._jspService(index_jsp.java:485) ...at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) ...at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) ...at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) ...at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) ...at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) ...at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) ...at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) ...at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ...at net.sf.basedb.clients.web.servlet.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:70) ...at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) ...at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ...at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) ...at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) ...at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) ...at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) ...at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) ...at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) ...at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) ...at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283) ...at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767) ...at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697) ...at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889) ...at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) ...at java.lang.Thread.run(Thread.java:619)
comment:4 by , 16 years ago
I am still not able to reproduce this. I only get the problem described in #1230 after using the Browse button and if I don't enter a filename the last part of path is taken to be the filename and a file (with the same name as the directory) is created one step up from what would be expected.
follow-up: 6 comment:5 by , 16 years ago
is created one step up from what would be expected.
Ah.... I guess you are not logged in as root... and if the user selects the own home directory this means that the exporer will try to create the file in /home and this is a place were ordinary users doesn't have write permission.
comment:6 by , 16 years ago
Replying to nicklas:
Ah.... I guess you are not logged in as root... and if the user selects the own home directory this means that the exporer will try to create the file in /home and this is a place were ordinary users doesn't have write permission.
Correct, I am a plain user. The same effect that you see of course happens if I select a sub-directory in my home directory but the filename is the sub-directory with an added zip without the '.' character.
Select /home/subdir --> /home/subdirzip is created.
DO you get a subdir.zip?
comment:7 by , 16 years ago
Milestone: | → BASE 2.9.3 |
---|---|
Owner: | changed from | to
Status: | new → assigned |
Summary: | Save as in download dialogue the Packed file exporter can be impoved → "Save as" parameter in plug-in dialogues can be impoved |
comment:8 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Is the error really related to if a file name is provided or not? I am not able to reproduce it. Can you post the complete stack trace!
But... It also seems like the Browse... window is destroying the selection of files and directories and the resulting compressed file is always empty. I'll add this as a separate ticket.