Incorrect FTP URL When Uploading File
-
- Posts: 8
- Joined: Wed Jan 23, 2008 9:19 pm
Incorrect FTP URL When Uploading File
Using Zeus 3.96n, I have a workspace called "htdocs" with a project under it also called "htdocs" with three files in the project. Under workspace options, I have defined the options on the FTP tab of Server (ftp://ftp.nars2000.org) with UserID and Password.
BTW, the Local Base directory is actually R:\NARS2000\trunk\htdocs, but when I type that in and click on Apply, Zeus displays the path without the drive letter (i.e., \NARS2000\trunk\htdocs) -- I think it should display everything the user types.
Continuing, under File > FTP > FTP Configuration..., in the FTP Hosts tab List of Defined Hosts there is ftp.nars2000.org with a Server of ftp.nars2000.org, along with UserId, Password, Port (empty), and Protocol of FTP.
With a file from the "htdocs" workspace/project open, when I click on File > FTP > Save As to FTP, the File Save As URL dialog displays a URL Name of ftp://NARS2000/trunk/htdocs/index.ahtml. Note the erroneous domain name. I expected that it would pick up the FTP URL of ftp.nars2000.org from one of the two places in which I typed it.
Is this a bug, expected behavior, or have I missed specifying something?
BTW, the Local Base directory is actually R:\NARS2000\trunk\htdocs, but when I type that in and click on Apply, Zeus displays the path without the drive letter (i.e., \NARS2000\trunk\htdocs) -- I think it should display everything the user types.
Continuing, under File > FTP > FTP Configuration..., in the FTP Hosts tab List of Defined Hosts there is ftp.nars2000.org with a Server of ftp.nars2000.org, along with UserId, Password, Port (empty), and Protocol of FTP.
With a file from the "htdocs" workspace/project open, when I click on File > FTP > Save As to FTP, the File Save As URL dialog displays a URL Name of ftp://NARS2000/trunk/htdocs/index.ahtml. Note the erroneous domain name. I expected that it would pick up the FTP URL of ftp.nars2000.org from one of the two places in which I typed it.
Is this a bug, expected behavior, or have I missed specifying something?
I checked the project/workspace FTP upload feature and it seemed to be working fine, but there does appear to be a bug in the download featureIs this a bug, expected behaviour, or have I missed specifying something?

Here is an example to explain how the FTP upload works. Assume we have a file at this location as seen on the local development server:
I create a Zeus htdocs workspace in the same folder:D:\nars2000\trunk\htdocs\index.ahtml
and it looks like this:D:\nars2000\trunk\htdocs\
and contains this project file which contains the single index.htmla file:<!-- Workspace file for the Zeus for Windows editor.-->
<workspace name="htdocs" sorted="Yes">
<mode>Debug</mode>
<active>htdocs</active>
<project name="htdocs">htdocs.zpi</project>
</workspace>
Now assume the ftp://ftp.nars2000.org/ internet server has some d:\ftp home address which also contains the htdocs folder so we want the index.htmla file to live at this location on the FTP server:<!-- Project file for the Zeus for Windows editor.-->
<project name="htdocs" sorted="Yes">
<file>index.ahtml</file>
</project>
This means the effective Internet address of the file (i.e the d:\ftp home address is not seen from the internet) will be:d:\ftp\htdocs\index.ahtml
Now going into the Zeus Workspace FTP panel I enter these details:
Zeus tells me it thinks the remote file location should be:server: ftp.nars200.org
local base directory: d:\nars2000\trunk\
remote base directory: /
which is exactly what I want

So I apply these numbers and hit the workspace upload feature and sure enough the file is copied from the development server to the required FTP address

For example I could have got the same result using these values:
So the FTP upload is working and the FTP download will be fixed in the next patchserver: ftp.nars200.org
local base directory: d:\nars2000\trunk\htdocs
remote base directory: /htdocs

Cheers Jussi
-
- Posts: 8
- Joined: Wed Jan 23, 2008 9:19 pm
You didn't mention anything about the missing drive letter, perhaps because I forgot to mention that the drive letter I used (R:) is a SUBST drive.
If you repeat the steps shown above with your system what data do you enter at each step and what exactly gets displayed and goes wrong

I'm not sure what you mean by SUBSTIf you use a SUBST drive letter, does Zeus delete the drive letter in the Local Base Directory as it does on my system?


If the R: is a logical Windows drive then it should not matter that I used a D: drive and you use an R: drive.
To test this I setup a local FTP server (127.0.0.1) with a home directory configured as d:\ftp and for me it worked fine.
I can't tell for sure since I am only going on the information you provide, but if the drive letter goes missing then either the data you entered is not the same as shown above, or some far more strange is going wrong

Cheers Jussi
-
- Posts: 8
- Joined: Wed Jan 23, 2008 9:19 pm
I entered the details as you asked.
When I use a physical drive letter, the drive letter in the Local Base Directory still disappears. To be sure, the text in the GroupBox labeled "Example of the Local/Remote File mapping" below the GroupBox labeled "Base Directory Details" shows the correct drive letter, but if I re-enter the drive letter (I used C and it points to a valid directory) at the beginning of the Local Base Directory then click Apply, the drive letter (and the following colon) disappears.
SUBST is a command which allows you to define a virtual drive letter. For example, I use SUBST R: C:\D\SOURCE so that references to drive R: point to C:\D\SOURCE. However the problem of the disappearing drive letter occurs on non-SUBSTed drives, so you can ignore that.
BTW, in the second sentence after IMPORTANT:, I think you mean to say "The transfer will fail if either directory specified does not exist."
When I use a physical drive letter, the drive letter in the Local Base Directory still disappears. To be sure, the text in the GroupBox labeled "Example of the Local/Remote File mapping" below the GroupBox labeled "Base Directory Details" shows the correct drive letter, but if I re-enter the drive letter (I used C and it points to a valid directory) at the beginning of the Local Base Directory then click Apply, the drive letter (and the following colon) disappears.
SUBST is a command which allows you to define a virtual drive letter. For example, I use SUBST R: C:\D\SOURCE so that references to drive R: point to C:\D\SOURCE. However the problem of the disappearing drive letter occurs on non-SUBSTed drives, so you can ignore that.
BTW, in the second sentence after IMPORTANT:, I think you mean to say "The transfer will fail if either directory specified does not exist."
When I use a physical drive letter, the drive letter in the Local Base Directory still disappears.
Can you use Alt+Print Screen buttons to capture the FTP screen and attach it to this thread or send it to me as an e-mail attachment

For example here is the screen capture of my FTP configuration panel:

ThanksBTW, in the second sentence after IMPORTANT:, I think you mean to say "The transfer will fail if either directory specified does not exist."

Cheers Jussi
-
- Posts: 8
- Joined: Wed Jan 23, 2008 9:19 pm
There's no need to post a picture of what I'm talking about as you have already done that! What you are seeing is exactly what I've been trying to describe!
In the Local Base Directory type (say) D: at the start so that it looks like D:\nars2000\trunk. Now click on Apply and see the D: disappear.
Yikes!
In the Local Base Directory type (say) D: at the start so that it looks like D:\nars2000\trunk. Now click on Apply and see the D: disappear.
Yikes!
I can not replicate what you are seeing as shown belowIn the Local Base Directory type (say) D: at the start so that it looks like D:\nars2000\trunk. Now click on Apply and see the D: disappear.


I even tried this using an earlier version of Zeus just to make sure it was not a version related issue.
Cheers Jussi
-
- Posts: 8
- Joined: Wed Jan 23, 2008 9:19 pm
Ok. I now understand what you mean about a missing D: letterYour left hand (Before) image does not have "D:\nars2000\trunk" in the Local Base Directory. Instead it has "\nars2000\trunk".

This is not a bug, because the entry fields on this panel represent directories and are designed to not hold drive information.
As I said earlier, the Local Base Directory represent the portion of the directory that will be removed from each and every file contain in the project/workspace.
Adding a drive letter is irrelevant since the files actual drive location has already fully determined by their fully qualified path details as stored in the project itself. For example if a file in the project lives on e: then adding anything but e: to this entry field would make no sense at all.
Since the user has no choice but to enter e: there is really no point in letting the user enter any drive details in the first place and this is exactly what Zeus is doing by stripping away the drive details for this field

Cheers Jussi
-
- Posts: 8
- Joined: Wed Jan 23, 2008 9:19 pm
Thanks for the explanation -- I now understand what you are trying to do.
However, what happens if the file being edited is D:\example\foo.html and the user enters D:\whatever\ as the LBD. The LBD has no common root to delete from the file's path, so I don't see how it can be interpreted. Moreover the "will map to the following remote file:" displayed upon clicking Apply is quite messed up.
It seems to me that the LBD must completely match some leading part of the file's path, not just the drive letter. Then the trailing part of the file's path (after the LBD has been removed from the leading part) is appended to the end of the Remote Base Directory to obtain the remote path on the Server.
However, what happens if the file being edited is D:\example\foo.html and the user enters D:\whatever\ as the LBD. The LBD has no common root to delete from the file's path, so I don't see how it can be interpreted. Moreover the "will map to the following remote file:" displayed upon clicking Apply is quite messed up.
It seems to me that the LBD must completely match some leading part of the file's path, not just the drive letter. Then the trailing part of the file's path (after the LBD has been removed from the leading part) is appended to the end of the Remote Base Directory to obtain the remote path on the Server.
However, what happens if the file being edited is D:\example\foo.html and the user enters D:\whatever\ as the LBD. The LBD has no common root to delete from the file's path, so I don't see how it can be interpreted.
This will not be a valid input which is why the upload example does not change for this case:
This is really a case of user input error so I think Zeus should check for it on Apply and display a warning or error messageThis example local file:
d:\nars2000\trunk\htdocs\index.ahtml
will map to the following remote file:
ftp://ftp.nars2000.org/nars2000?trunk/h ... ndex.ahtml

Yes and because the drive letter is assumed to match the drive letter of the workspace file, it is removed no matter what value is entered by the user.It seems to me that the LBD must completely match some leading part of the file's path, not just the drive letter.
ExactlyThen the trailing part of the file's path (after the LBD has been removed from the leading part) is appended to the end of the Remote Base Directory to obtain the remote path on the Server.

Cheers Jussi
-
- Posts: 8
- Joined: Wed Jan 23, 2008 9:19 pm
I strongly urge you not to delete anything the user enters. Signal an error if it's invalid, but if it's valid leave it alone. When you change something entered, a user quite rightly is going to ask "Why, what did I do wrong?". As the user has done nothing wrong, don't raise the issue. Just as you wouldn't delete the leading portions of the LBD which match the file's path, don't delete the drive letter!Yes and because the drive letter is assumed to match the drive letter of the workspace file, it is removed no matter what value is entered by the user.
I agree totally that this FTP configuration panel is confusing, but I am not sure of any other way it can be designed to work that is any less confusingJust as you wouldn't delete the leading portions of the LBD which match the file's path, don't delete the drive letter!

The whole point of this panel is to define the mapping of a project file to a corresponding remote host file. Now the project file location is fixed and the remote file location is partially (defined since it must go to an ftp server address), but other than that the variations between the local an remote file locations are pretty much infinite.
For example consider just these few examples of possible mappings of local file to a corresponding remote file:
So the FTP configuration panel has to provide a way to configure each and every one of these examples.d:\Division\Projects\MainPage\index.html <=> ftp://ftp.server.com/Division/Projects/ ... index.html
d:\Division\Projects\MainPage\index.html <=> ftp://ftp.server.com/Div/Projects/MainPage/index.html
d:\Division\Projects\MainPage\index.html <=> ftp://ftp.server.com/Projects/MainPage/index.html
d:\Division\Projects\MainPage\index.html <=> ftp://ftp.server.com/MainPage/index.html
d:\Division\Projects\MainPage\index.html <=> ftp://ftp.server.com/index.html
d:\Division\Projects\MainPage\index.html <=> ftp://ftp.server.com/MyProjects/MainPage/index.html
d:\Division\Projects\MainPage\index.html <=> ftp://ftp.server.com/MyProjects/index.html
d:\Division\Projects\MainPage\index.html <=> ftp://ftp.server.com/WebSite/index.html
At present I think the current FTP panel does let you configure these types of mappings, granted in a some what confusing manner

Now given this file d:\Division\Projects\MainPage\index.html, how should the dialog react to this nonsensical user input

It can only reject it with an error message, which has to contain enough information to explain to the user why the input is wrong, or it can try to fix it. I don't think either option works particularly well. The reason is that until the user understands what the dialog is trying to do, any amount of error messages or intervention is not going to help.e:\Division\Projects\MainPage\index.html <=> ftp://ftp.server.com/WebSite/index.html
I think this is quite a difficult dialog to implement and while I don't think the current implementation is great, I don't think it is too far off. But I am always open to any other alternative designs

Cheers Jussi