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
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
- 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
I am really lost betweend the many things and places I should configure. May you help please?
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
Thank you Ján for your answer.
Le 30/08/2013 22:23, Ján Máté a écrit :
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)
Ok, I commented out globalAccountSettings.
*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)
I only left this globalNetworkCheckSettings with cross domain = true.
I kept reading error in Apache2 logs about a missing file : File does not exist: /home/sites/webcal/lib/jquery-2.0.2.min.js
and indeed, this file is called from the index.html file. In the lib directory, the file has the 2.0.3 version.
I manually added a symbolic link to this file, named 2.0.2 and I reached the login screen.
Entering the correct login + passwd lead me to the correct display of the calendar.
My tests of creating, editing and deleting worked well between chromium and lightning. Using a recent version of firefox did not even opened the event window. Disturbing, but I could live with it.
Next step for me : try to understand how a user can access and display multiple calendars (like in the demo of your website)...
Hi Nicolas,
On Sep 2, 2013, at 10:45 AM, Nicolas Ecarnot nicolas@ecarnot.net wrote:
I kept reading error in Apache2 logs about a missing file : File does not exist: /home/sites/webcal/lib/jquery-2.0.2.min.js
and indeed, this file is called from the index.html file. In the lib directory, the file has the 2.0.3 version.
in the source code http://www.inf-it.com/CalDavZAP_0.9.1.2.zip there is no reference to jquery 2.0.2:
from index.html: <script src="lib/jquery-2.0.3.min.js" type="text/javascript"></script>
so your situation still looks like misconfiguration.
Have you executed the cache_update.sh script?
Do you use some Apache (or other web server) cache which uses the previous version of the index.html and not the latest version from the file system? ... try apache2 reload or restart
Have you tried to empty your browser offline cache?
Until you solve the mysterious jquery 2.0.2 problem your installation is wrong and may cause LOT of problems (mixing different version of files from source code is not a good idea) ...
I manually added a symbolic link to this file, named 2.0.2 and I reached the login screen.
Entering the correct login + passwd lead me to the correct display of the calendar.
My tests of creating, editing and deleting worked well between chromium and lightning. Using a recent version of firefox did not even opened the event window. Disturbing, but I could live with it.
It can be caused by the problem described above.
Next step for me : try to understand how a user can access and display multiple calendars (like in the demo of your website)...
CalDavZAP shows all calendars for the logged user ... if you want to display other users' calendars use delegation: true (+ configure your server privileges)
JM
-- Nicolas Ecarnot
Le 02/09/2013 11:07, Ján Máté a écrit :
Hi Nicolas,
On Sep 2, 2013, at 10:45 AM, Nicolas Ecarnot nicolas@ecarnot.net wrote:
I kept reading error in Apache2 logs about a missing file : File does not exist: /home/sites/webcal/lib/jquery-2.0.2.min.js
and indeed, this file is called from the index.html file. In the lib directory, the file has the 2.0.3 version.
in the source code http://www.inf-it.com/CalDavZAP_0.9.1.2.zip there is no reference to jquery 2.0.2:
from index.html:
<script src="lib/jquery-2.0.3.min.js" type="text/javascript"></script>
so your situation still looks like misconfiguration.
I honestly don't know whatt happend, so I re-installed the complete .zip, restored the config.js and it worked.
Have you executed the cache_update.sh script?
I forgot to say that at every change, I execute this script and restart apache.
Do you use some Apache (or other web server) cache which uses the previous version of the index.html and not the latest version from the file system? ... try apache2 reload or restart
Have you tried to empty your browser offline cache?
The problem with firefox remainded after the re-installs and apache restart, but disapeared after a firefox browser cache cleanup ! :)
Next step for me : try to understand how a user can access and display multiple calendars (like in the demo of your website)...
CalDavZAP shows all calendars for the logged user ... if you want to display other users' calendars use delegation: true (+ configure your server privileges)
Very nice, just a browser cleanup and it is working fine.
Thank you for your help.
Have a nice day.