Is DOLS Dead? Unanswerd issue with path-years now

This is a copy of a question asked about 18 months ago…But similar questions go back 5+ years now.

…"Is there a way to configure DOLS not to use the Sub_0 in the url for the location of the database?

instead of having: http://127.0.0.1:89/sub_0/databaseName.nsf

to have it: http://127.0.0.1:89/databaseName.nsf"…

Is Iris saying that I have to redesign 7 complex databases from top to bottom…just to have them work in DOLS? There must be a work around somewhere…

anyone? anyone? Bueller? Fry?

Is anyone using DOLS and not plauged with the “Sub_0” dilema?

Subject: DOLS is available in release 7

You may find that you have Sub_0, Sub_1, Sub_2, Sub_n subfolders on the client machine. You should have a separate subfolder on the machine under c:\Program Files\Lotus iNotes for each unique web user who used DOLS to take a web database offline.

If your application is using relative URLs and relative paths, I would not anticipate problems using the application online and offline.

Please provide an example of what works online and is broken offline due to the Sub_0 pathing.

Subject: RE: DOLS is available in release 7

The problem is the majority of apps that I need offline are not single databases but multiple dbs (10-20) in different sub folders off the data directory.

And throughout the millions of lines of code are static references to these other dbs… like “apps/db1.nsf” links to “contacts/company2/blah.nsf”…etc…etc… My issues arise when I try to use lookups and computed fields for my relative paths…but they’re only relative based on where i’m coming from !

example…I use a single db for all CSS + JS objects… so if i create a computed relative path field for linking to that db and put that field into use in 2 databases (one under one sub dir and another 2 sub dirs deep) then the “relative” paths are different.

I know i’m doing something wrong. Thanks for you help.

Subject: DOLS and the infamous Sub_0 problem

I’ve got the same problem here. If you’re using relative paths then everything works okay as long as your server’s data directory tree is flat. But if you’ve got required subscription databases in your data directory and folders inside of that with other databases, you’ve got problems.

For example, I have an app that has the following structure on the server:

…data/coredb.nsf

…data/folder1/dbA.nsf

…data/folder1/dbB.nsf

…data/folder2/dbA.nsf

…data/folder2/dbB.nsf

…etc.

On the server I can reference “/folder1/dbB.nsf” and all is fine. But offline on DOLS I have to reference “/Sub_x/folder1/dbB.nsf”.

Fortunately, I can (for now) rely on my subscription being the only one on the offline machine (i.e. always inside of “Sub_0”), so I have a few hacks to determine whether I’m online or off and then add “Sub_0/” or “/Sub_0” appropriately:

Javascript:

function isBrowserOffline(){

// returns TRUE if the browser is running in offline (DOLS) mode

if (window.location.hostname.toLowerCase() == “localhost” || window.location.hostname == “127.0.0.1”) {

return true;

} else {

return false;

}

@Formula:

isBrowserOffline := @If(@ServerName = “CN=OfflineSync/O=DOLS”; @True; @False);

WebQuerySave agents that run LotusScript:

Function isRunningOnOfflineServer

'returns TRUE if the server running this code is an offline DOLS server

Dim sess as New NotesSession

If Right$(sess.currentDatabase.Server, 7) = “Offline” Then

isRunningOnOfflineServer = True

Else

isRunningOnOfflineServer = False

End If

End Function

You would obviously need to modify the last function so that it correctly identifies the server / user ID running your code. Depending on your security rights, etc. this can be extremely tricky as you may have several agents running under different rights.

Regardless, there is no way to know which Sub_x folder you should be referencing, though perhaps you can parse out the path information of your current database context and prepend that. I.E. scan your database filepath for “Sub_x/” and if you see it, use it. You’d need to be prepared for the possibility of double-digits as well.

It really would be nice to have either (A) @Formula and script methods to derive the current Sub_x folder, e.g. “@DolsSubscriptionFolder”, or (B) have the DOLS http server perform all this translation behind the scenes for us.