SOLVED: WebCalendar only using short name URLs

raifwrite
Posts: 14
Joined: Sat Apr 28, 2012 6:27 pm

SOLVED: WebCalendar only using short name URLs

Postby raifwrite » Fri Jun 29, 2012 11:26 am

After installing WebCalendar I cannot access most features as the behavior is for the program to default to webcalendar/"anypage".php instead of webcalendar.mydomain.com/"anypage".php. Since I have my router handling DHCP due to some issues with AES recognizing wireless devices, I only have Amahi running as a DNS.

As a result, it cannot resolve the shortnames WebCalendar is trying to use. Even if I input the full domain name to access a page in WebCalendar, as soon as I click on an internal link it tries to navigate using the short form url again. Is there a way to change WebCalendar's default behavior so it only uses the long form domain url?

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: WebCalendar only using short name URLs

Postby bigfoot65 » Fri Jun 29, 2012 11:29 am

I am sure there probably is, but you will need to check out the code. You might consider checking their web site for forums. Might find help there.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

raifwrite
Posts: 14
Joined: Sat Apr 28, 2012 6:27 pm

Re: WebCalendar only using short name URLs

Postby raifwrite » Fri Jun 29, 2012 11:52 am

Will do. I'll check back if I make any progress

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: WebCalendar only using short name URLs

Postby bigfoot65 » Fri Jun 29, 2012 12:04 pm

Thanks. I am sure it's something simple, but knowing where to look is the problem :)
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

rdagijones
Posts: 274
Joined: Thu Jan 26, 2012 7:56 am

Re: WebCalendar only using short name URLs

Postby rdagijones » Tue Jun 18, 2013 9:29 am

I am having this same problem. Right now if I put in "webcalendar/" as the url it does not resolve correctly to the application. If I put in "webcalendar.home.com/" the web page resolves to the WebCalendar login screen. When I put in the user name and password the next page that tries to come up is "webcalendar/month.php", which fails to load. I then edit the url to be "webcalendar.home.com/month.php" and I can see the month layout in WebCalendar. From then on, some pages resolve correctly and others do not. For example, I can go to the page to add a new user, but when I attempt to save that new users settings it fails. I have two hda's in the building and have to use long urls to get apps to work.

I contacted WebCalendar's forum and got the following:
All I can tell you is that when webcalendar is going to "webcalendar/month.php", he's actually doing a redirect. In index.php, he finds 'month.php' as your default page, then calls function do_redirect, passing 'month.php' as the URL. Function do_redirect prepends the URL passed by your webserver to the URL passed from index.php. So he should be redirecting to "webcalendar.home.com/month.php", but for some reason is not getting the "webcalendar.home.com/" from your webserver. He apparently is only getting "webcalendar/". You might discuss this with your network and/or web administrator to find out why.
Here's what I am wondering: Could an .htaccess file get around this problem?

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: WebCalendar only using short name URLs

Postby bigfoot65 » Tue Jun 18, 2013 10:06 am

Try changing the SERVER_URL value in the database webcalendar, table webcal_config. It is currently set to http://webcalendar/ and removing the tailing slash might do the trick.

If not, will have to consider another option, like maybe adding the domain, http://webcalendar.home.com/.

Once of these two solutions should fix the problem. We can modify the app to do this automatically if it works. The .htaccess is another option, but we can explore that if one of these don't work.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

rdagijones
Posts: 274
Joined: Thu Jan 26, 2012 7:56 am

Re: WebCalendar only using short name URLs

Postby rdagijones » Tue Jun 18, 2013 1:16 pm

Tried changing the SERVER_URL value in the database webcalendar, table webcal_config from http://webcalendar/ to http://webcalendar.home.com/ (with and without the trailing "/" and no success. WebCalendar still tries to resolve each page to the short url. Attempting to add users fails due to invalid url problems.

How would I add the domain? I tried adding an alias under "Webapps" > webcalendar and that did nothing to solve the issue.

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: WebCalendar only using short name URLs

Postby bigfoot65 » Tue Jun 18, 2013 1:27 pm

May need to look for other places in the app dir where the URL might be set. I will see what I can find.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: WebCalendar only using short name URLs

Postby bigfoot65 » Tue Jun 18, 2013 1:31 pm

One other note. If you are not using the HDA for DHCP server, see the link below for what will not work.
https://www.amahi.org/faq#is-dhcp-server-required

This appears to be part of your problem.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: WebCalendar only using short name URLs

Postby bigfoot65 » Tue Jun 18, 2013 1:39 pm

I just tried changing the URL to http://webcalendar.home.com/ in the app and it appears to be working correctly from what I can tell.

Maybe it needs to be changed that way vs the database directly. The domain would be whatever you are using for your hda, so not necessarily home.com.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

Who is online

Users browsing this forum: No registered users and 12 guests