Page 3 of 3

Re: FTP Website Manager

Posted: 04 Feb 2015 00:01
by tatewise
Sorry, but the more I check the Plugin the more fixes I find are needed.
Just ran it on XP and it did not like the apostrophe in ...\Mike's Documents\... and further tests showed it did not like an apostrophe in any of the Settings.
Further checks revealed that not only every file in the Source Folder but every file in its sub-folders would get updated in the one FTP Folder.

All the above and a few other minor fixes are included in the attached Plugin version.

Re: FTP Website Manager

Posted: 04 Feb 2015 14:20
by Bill Deverell
Mike

That works fine with my test.
I ran it once with target folder empty - that uploaded the single file - correct
Ran it again - reports nothing to update - correct.

The trace is helpful - worth adding info to the help if not already done.

I'll do a big run soon when my wife isn't hogging this PC !

Bill

Re: FTP Website Manager

Posted: 04 Feb 2015 14:45
by tatewise
It is actually Jane's Plugin, but she has other pressures on her time at present.
When it has stabilised, Jane will publish the updated version in the Plugin Store.
Then will be the time to update the Help.

I have attached another version with minor updates to the user dialogues.

I would appreciate it if you could try and break it.
An independent user is so much better at finding novel ways to misuse a Plugin!

Try and enter all manner of junk, invalid paths, folders, passwords, etc, via user dialogue.
Use oddly named folders & files on both PC & FTP server, e.g. use symbols ' and " and %, etc.

Have various nested folder structures with files at each level to check that only the chosen folder is used.

Re: FTP Website Manager

Posted: 05 Feb 2015 19:40
by Bill Deverell
Mike

I'm planning a big test on Monday as my wife and I are both out all day so I can do a long upload.
By the way when you modified it for special characters in folder name did you include the use of blanks?

Bill

Re: FTP Website Manager

Posted: 05 Feb 2015 20:17
by tatewise
The only particular character I found necessary to protect was apostrophe/single quote (').

All other characters, including accented ANSI characters, and spaces/blanks, should be OK, and not just in folder names, but also in file names.

A long upload is a worthwhile test, but it does not exercise the Plugin much, because it is simply repeating the same function.

Intensive testing experiments with scenarios that are unusual, along the lines I suggested above.

I have given some more attention to debug tracing and come up with another revised Plugin version attached.
This adds a temporary Settings option to enable an FTP Trace even when Run normally.
Then every FTP get/put function triggers a message box displaying the FTP Trace Log.
Click OK and the FTP Trace continues, or click Cancel to inhibit tracing.
In Plugin Edit/Debug mode the FTP Trace on Exit is always enabled.

Re: FTP Website Manager

Posted: 06 Feb 2015 21:11
by Bill Deverell
Mike

I added 2 sub folders to my Test folder (source and target) and then repeated my test
It only transferred the single file that was originally there for the previous tests.

I assume the directory List returned 1 file and 2 folders
and it only processed the file.

The new folders I'd added to the Test folder contained nearly 350 items from my wife's tree.

It's not critical to me as the site with sub-folders will die when my wife is ready to load her tree from FH.
Her existing tree is from Generations Easy Tree which splits the data across folders because of the old DOS limit of 512 files per folder.

Bill

Re: FTP Website Manager

Posted: 06 Feb 2015 21:51
by Bill Deverell
Mike

That first test was not fair as it was attempting something the plugin wasn't designed for.

My second test was to copy the contents of 1 of the sub-folders.
This worked OK despite folder name containing an underscore.
The third test was a sub-folder containing 334 items each with an underscore in the name.
This appears to be OK
The 4th test was a repeat of the 3rd without resetting Page History
This correctly copied no files.

A question which may be really for Jane.
In theory you can create multiple websites within a project.
Does the Plugin maintain a separate Page History for each website? I suspect not.

Bill

Re: FTP Website Manager

Posted: 06 Feb 2015 22:37
by tatewise
The Plugin does effectively keep a separate Page History for each Website.
It keeps an individual database entry for each uploaded file, including its full folder path.
So if all the files for one Website are in folder A, they have distinct entries from all the files for another Website in folder B, even if they share identical file-names, because the full path names are different.

If you experiment with two pairs of folders containing a few identically named files you should be able to prove it.
By that I mean folder A on PC paired with A on FTP server, and folder B on PC paired with B on FTP server.
Just swap the Settings between Source & FTP Folder = A and Source & FTP Folder = B, and in one folder change just a few files that have the same name as in the other folder. Only the files that change should get uploaded, and their identically named counterparts should not.

The only common action is Clear Page History that clears all the entries for all the files of all the websites.

Re: FTP Website Manager

Posted: 06 Feb 2015 22:50
by Bill Deverell
Mike

Thanks - that is quite clear.

Bill

Re: FTP Website Manager

Posted: 29 Dec 2021 16:54
by jelv
I've just tried using this plugin and it failed with this error:
[string "C:\ProgramData\Calico Pie\Family Historian\..."]:358: LuaSQL: 5 values for 6 columns. No changes have been made to data records.
I've never programmed with lua, but nevertheless had a look at the source code.

Just above line 358 I found this line:

Code: Select all

sql = string.format([[insert into settings (directory, host, folder, userid, password, trace) Values('%s','%s','%s','%s','%s')]],row.directory,row.host,row.folder,row.userid,row.password)
Changing that line to remove the trace column name thus:

Code: Select all

sql = string.format([[insert into settings (directory, host, folder, userid, password) Values('%s','%s','%s','%s','%s')]],row.directory,row.host,row.folder,row.userid,row.password)
and it now seems to be working (currently building transfer list).

Edit: I didn't select the debug check box.