Hi Nicolas,

On Aug 29, 2013, at 12:36 PM, Nicolas Ecarnot <nicolas@ecarnot.net> wrote:

Hi,

I'm running a davical + apache setup since years, and I recently installed caldavzap.

Amongst my many virtualhosts, I added a specific one for caldavzap, and I'm struggling to make it work.
(This one is called webcal.mydomain.net)
I'm facing some serious issues to understand the documentation.

In globalAccountSettings, I defined that :
href: 'http://cal.mydomain.net/caldav.php/USERNAME1/'
crossDomain: true
[...]
ref: 'http://cal.ecarnot.net/caldav.php/USERNAME1/',
crossdomain: true,

In globalNetworkCheckSettings, I defined that :
href: 'http://cal.ecarnot.net/caldav.php/'
crossDomain: true

Do not mix multiple setup types, use ONE of the following options:

globalAccountSettings - it is used internally by the client and NOT invokes any login screen (but expects that username/password are set in this variable)
globalNetworkCheckSettings - it sends your username/password to the server and if the authentication is successful then it appends the username/password with all settings into the globalAccountSettings (and hides the login screen)
globalNetworkAccountSettings - this option is for more complicated setup ... your username/password are send to the "auth" module (this module verifies your login/password by sending a request to the CardDAV server) and if the login is successful it returns you the configuration in XML ... the main advantage of this method is, that you can generate different XML configuration for each user (it requires only minimal changes in the auth module [php]) ... the second advantage is that if you send wrong username/password then the browser will not show any authentication popup window (disadvantage of the first two options) ... then the client get the XML configuration and it appends the settings into the globalAccountSettings (and hides the login screen)


I also added the specific config about the mod_headers into the davical virtualhost settings.


- What I get is the login screen appears.
In apache log files, I see that :

File does not exist: /home/websites/webcal/lib/jquery-2.0.3.min.map

There is no reference to jquery-2.0.3.min.map file in our source code. This string is present only in jquery-2.0.3.min.js but it is commented out:

/*! jQuery v2.0.3 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
//@ sourceMappingURL=jquery-2.0.3.min.map
*/

so something is VERY wrong with your setup (or you changed something in the source code) ...

- Testing a wrong password correctly fails
- Testing a correct password leads to a blank page.
In the javascript console, I see that :
Uncaught TypeError: Cannot call method 'indexOf' of undefined main.js:398

This can be caused by misconfiguration or your mysterious "jquery-2.0.3.min.map problem".

I am really lost betweend the many things and places I should configure.
May you help please?

Please first try non-cross domain setup - for example copy the source code into /usr/share/davical/htdocs and try to open the directory in your browser (without any configuration). And do not forget, that you need to execute the cache_update.sh every time you change any file (including config.js).


JM


--
Nicolas Ecarnot