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.

CA_URL_ROOT variable in your setup.php is not set correctly

I am getting the "It looks like the CA_URL_ROOT variable in your setup.php is not set correctly" error ONLY when browsing by different facets in Pawtucket 2.
Also the media viewer for files in both Providence and Pawtucket is not working.

So these are examples of two URLs that are coming up with the CA_URL_ROOT error message

Note that had worked completely fine in the week or so that I've had Pawtucket up and running, just started this error despite the fact that I haven't edited setup.php or really any files that I know of that would cause this.

I've tried setting the root in both setup and global to be the subdirectory of my website '/ca_library' but doesn't help. I never had set up the root variable before and everything was working fine! It is baffling that this would seemingly start all of a sudden

Comments

  • edited June 23

    I'm trying to do some debugging but not getting anywhere really. When I take off the configuration check in index.php it says "view does not exist" for the following url

    http://www.hobartsynagogue.org/ca_library/pawtucket/index.php/Browse/objects/facet/entity_facet/getFacet/1/key//isNav/1

    This must be some sort of systematic problem, as while most things initially seem to load fine I noticed the media is not showing on both providence and pawtucket, and coming up with this same root issue on configuration check. In Prov for the following url it says 'invalid controller path' when I remove the config check

    https://www.hobartsynagogue.org/ca_library/index.php/editor/objects/ObjectEditor/GetMediaData/identifier/representation:762/context/GetMediaOverlay/object_id/1822

  • This is really confusing to me.

    1. Why would so many other pages on the site working fine?
    2. I created the Pawtucket directory and uploaded a fresh copy of Pawtucket. After updating setup.php, the same issue with browsing facets is still occurring.

    Any help would be appreciated. It is so bizarre that this was working fine for the first week I had Pawtucket up

  • edited June 23

    Hi,
    something is strange, when I visit your site: https://hobartsynagogue.org/ca_library/pawtucket/index.php
    The image at the top loft (logo) is not displayed. When I try to open this image with a right-click button, I get an error with the URL as follow:
    Errors occurred when trying to access /ca_library/pawtucket/themes/default/assets/pawtucket/graphics/hhc_lib_logo.jpg/index.php
    This /index.php at the end is abnormal.
    Do you have some rewrite rules, for example in .htaccess file somewhere?

  • Thanks. When uploading a fresh copy of Pawtucket and making my changes I neglected to upload my logo. I noticed that on any CA site if you try to open up an image in a new tab and the image doesn't exist (for example, purposely put an extra character in the image address), then it puts the index.php at the end. Strange but not specific to my site

    I had done redirects in .htaccess right before this craziness. I thought it may have been causing this and they have been removed and there shouldn't be any caching issues, so I don't think it is that

  • OK so that was not related.
    And what about the files inside your /ca_library/pawtucket/themes/default/views/Browse directory? Did you made some changes there? Or in the browse.conf file? (Because it seems that your problem is related to the browse function)

  • edited June 23

    Well, earlier today I deleted all the Pawtucket files and put a fresh copy from the repository. I just updated setup.php with my basic details, and the browse problem was still occurring. So that shows it is nothing to do with changes in the files but some sort of issue with my environment. I just can't figure out what!

    Also it it not isolated to just browse. Media representations, such as .jpg and .pdfs are not loading properly when you expand the preview. This is also occurring in Providence too. When I go in the browser dev tools there are more warnings about this ca_url_root. e.g. https://www.hobartsynagogue.org/ca_library/index.php/editor/objects/ObjectEditor/GetMediaData/identifier/representation:762/context/GetMediaOverlay/object_id/1822

    or

    https://hobartsynagogue.org/ca_library/pawtucket/index.php/Detail/GetMediaData/identifier/representation:1258/context/objects/object_id/2724

    This is another part that was working beautifully before and now is just getting this ca_url_root error

  • So you just uptaded setup.php.

    But I know that some path should be update in some other files...
    For example in global.conf in /app/conf you have these:

    # You should not have to change this.
     ca_media_url_root = <ca_url_root>/media/<app_name>
    
    # This is to take care of the possible differences between the name of the directory
    # path and the URL path due to web server aliases being in play.
    ca_media_root_dir = <ca_base_dir>/media/<app_name>
    

    I remember that, for some reason, as I moved the Pawtucket directory outside from the Providence directory, I needed to change these lines like:

    # You should not have to change this.
    ca_media_url_root = /ca_library/media/<app_name>
    

    (here you may write the relative path)

    # This is to take care of the possible differences between the name of the directory
    # path and the URL path due to web server aliases being in play.
    ca_media_root_dir = /absolute/path/to/ca_library/media/<app_name>
    

    (here, of course, you write the absolute path, for example /home/www/ca_library/media/)

    For me it was OK... Try it...
    (I'm using CA only since 2 years so may be someone else could help you)

  • Thanks. I tried setting those values but it doesn't help. I've played around a lot with setting values in setup.php and global.conf. doesn't help

  • OK...
    Could you paste here your browse.conf file?

  • Well the error was still occurring even when using files straight from a clean CA repo (except setup.php)

  • edited June 24

    Yes, but when I read this page, it seems that you should modify some settings. Maybe this is your case?

    Browse results when no criteria are defined

    By default the browse will not return results if you attempt to execute a browse with no criteria defined. In principle, a criteria-less browse should return all possible results – every item in your database. However, for most data sets such a result set would be of limited use and slow to render. In most CA Providence and Pawtucket implementations, a special "start browsing" display is used when no criteria are defined.

    If you really do want all results returned when no criteria are defined you can force it on a per-table basis by setting show_all_for_no_criteria_browse in the table-level block (the one that must contain the facets list). See the ca_objects block in the example below to see how this is done.

  • Symlinking of file systems can cause problems like this. If you want to give me access to the machine I can take a look and figure it out for you.

  • Thanks Seth! I emailed you

  • Your hosting environment is returning an unexpected value for the script path in $_SERVER. I've not seen this one before. I just patched it on your server and will merge the fix into the next release.

  • Thanks so much Seth!
  • Hi Seth, can you please let me know what you updated? I took a quick look but couldn't figure it out. I ask because the same issue is happening with Providence as well so I need to know what to do to fix it there too

Sign In or Register to comment.