Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the CollectiveAccess support forum! Here the developers and community answer questions related to use of the software. Please include the following information in every new issue posted here:

  1. Version of the software that is used, along with browser and version

  2. If the issue pertains to Providence, Pawtucket or both

  3. What steps you’ve taken to try to resolve the issue

  4. Screenshots demonstrating the issue

  5. The relevant sections of your installation profile or configuration including the codes and settings defined for your local elements.

If your question pertains to data import or export, please also include:

  1. Data sample

  2. Your mapping

Answers may be delayed for posts that do not include sufficient information.

Help finding a typo in all media urls

I just pulled pawtucket2 from git and no media will display because there seems to be a typo in the urls. All media is currently trying to display as:
<img src="CA_SITE_PROTOCOL://
with the src having "CA_SITE_PROTOCOL:" not substituting.

Where is this happening?


  • (it keeps reformating. it should be < underscore >< underscore >CA_SITE_PROTOCOL< underscore >< underscore >< colon >< slash >< slash >...)

  • Hi brucek,

    The __CA_SITE_PROTOCOL__ variable should contain "http" or "https", defined somewhere in pawtucket/setup.php file.

    If not, edit this file and add somewhere:

    if (!defined("__CA_SITE_PROTOCOL__")) {
            define("__CA_SITE_PROTOCOL__", isset($_SERVER['HTTPS']) ? 'https' : 'http');

    So now, you should see:
    <img src="
    <img src="


  • The constant is defined correctly. The problem is it is inside the quotation marks so it is being treated as a literal string and not a constant for the src.

  • Ok so if you want to fix it quickly, you can replace this constant by http (or https, depending of used protocol).

    Not sure that is the cleanest way, but it should work! :)
  • You are missing to point - the constant is inside the quotes so it is NOT being treated as a constant. It should be CONSTANT . "Bla bla bla"
    but is currently "CONSTANT.Bla bla bla"

  • Oh, yes, sorry! :#
    Is it the case for ALL media in ALL pages, or for some media in specific pages?
    We have to find which part of the code is generating this URL. So could you copy/paste more HTML before and after the wrong URL?

  • Ok...after a stupid amount of time it turns out that my setup.php was out of date (post-setup.php gets called in a different manner now and I didnt catch the change when coping over setup.php)

    So, a big question I have is why is this defined in global.conf ?

    site_protocol = CA_SITE_PROTOCOL
    site_hostname = CA_SITE_HOSTNAME
    site_host = ://

    why do we not just refer to CA_SITE_PROTOCOL or CA_SITE_HOSTNAME
    It just seems redundant and confusing.

  • edited November 2018

    (once again my < underscore >< underscore >'s went away for some reason)

Sign In or Register to comment.