View Full Archives - Link broken for me

View - Openchurch Latest Bulletin

FOOTER: Global: Text Area

<a href="/multimedia/bulletins">View Full Archives &raquo;</a>
<a href="multimedia/bulletins">View Full Archives &raquo;</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.


vidichannel’s picture

As 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?

vidichannel’s picture

Problem 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 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 " 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

Sorry to waste time on such a novice mistake. It may help the next guy though.

drupalninja99’s picture

Status:Active» Needs work

Ya in the D6 version I had pathologic which I used to fix paths if OpenChurch was in a subdirectory. I might try that again.

drupalninja99’s picture

I 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.

drupalninja99’s picture

Ya 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.

drupalninja99’s picture

Status:Needs work» Needs review

OK 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.

vidichannel’s picture

I 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 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.

drupalninja99’s picture

OK well I am going to test this this morning and hopefully push out a stable release.

drupalninja99’s picture

Pushed to 1.11-alpha1

drupalninja99’s picture

Status:Needs review» Fixed

Setting to fixed

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.