Closed (fixed)
Project:
OpenChurch
Version:
7.x-1.10-alpha7
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Aug 2012 at 20:12 UTC
Updated:
8 Sep 2012 at 16:51 UTC
View Full Archives - Link broken for me
View - Openchurch Latest Bulletin
FOOTER: Global: Text Area
<a href="/multimedia/bulletins">View Full Archives »</a>
<a href="multimedia/bulletins">View Full Archives »</a>
When running from a single localhost it ran fine. But on a multisite Apache server I had to remove the first slash to make it a relative path for that site.
Comments
Comment #1
vidichannel commentedAs I quickly found out, the method above will not work for this or the many other blocks/views since they change depending on the page accessed. Need a place to fix the site root so the hard-coded PHP will show up correctly?
Comment #2
vidichannel commentedProblem resolved:
I was testing this on a localhost site where /church was a relative path so "localhost/church" was the site root folder but localhost root resolved to only localhost/. The code breaks in this scenario since the code for Drupal wants to run from the root folder of the site. Usually I have a domainname.com mapped directly to a folder and then everything works great. But since I was running this only on the local test server, new challenges arose.
After making a DNS routing entry for "127.0.0.1 church" in the /etc/hosts file (running Ubuntu) and creating a VirtualHost with the ServerName "church" in Apache I was able to pull up the site correctly.
Clearly this won't be an issue for anyone with an actual domain pointed properly like http://MyChurch.org.
Sorry to waste time on such a novice mistake. It may help the next guy though.
Comment #3
drupalninja99 commentedYa in the D6 version I had pathologic which I used to fix paths if OpenChurch was in a subdirectory. I might try that again.
Comment #4
drupalninja99 commentedI am going to try to install pathologic and reinstall locally to see if that fixes the broken images. Unfortunately this feature worked in D6 but was lower priority for OpenChurch D7. It's a good time to readdress though now.
Comment #5
drupalninja99 commentedYa pathologic is awesome. All you have to do is download, enable and then check the pathologic checkbox for the full html and filtered html text formats.
I am going to go ahead and add this to the 1x dev release.
Comment #6
drupalninja99 commentedOK I have added to dev, I have also added an update hook which I haven't tested yet but it should make the change retro active if someone runs update.php.
I will do an end to end test later when the dev packager is finished.
Comment #7
vidichannel commentedI did not realized that pathologic would work that way. I thought it was only for converting paths to absolute in HTML e-mails. Ironically, I have found that only a few of my sites run correctly from a subdirectory of localhost so any critic was probably unduly harsh. I will try your tip with pathologic and see if it fixes them.
Alternatively, I was actually in the process of setting up my own DNS for the local LAN so all the machines would see the test sites on localhost with a set name for the VirtualHost in Apache (not in a subdirectory of localhost) even without an official domain.com connecting in the outside world. Ubuntu provides it free, but I haven't quite gotten the config of bind9 down yet. Not to stray from the main topic of this thread but hopefully it will help other community members who are struggling.
Thx again for the great distro drupalninja99.
Comment #8
drupalninja99 commentedOK well I am going to test this this morning and hopefully push out a stable release.
Comment #9
drupalninja99 commentedPushed to 1.11-alpha1
Comment #10
drupalninja99 commentedSetting to fixed