Collections browse not available for public in a 1.5.3 installation

If we're logged in to Omeka the browse collections link works as expected. However if not logged in, we get the page headers & footers, and the title section (just says "Browse Collections"), but there are no collections actually listing out.

The collections themselves are set as "Public" in the admin interface so they should just appear.

I tried copying the browse.php from /omeka/application/views/scripts/collections/
over to our custom theme folder at /omeka/themes/LLrhythm/collections/browse.php but that seems to have made no difference.

The permissions at the OS level appear to be the same as for "Browse Exhibits" which is working fine.

This is Red Hat 6, Apache 2.x, Php 5.3x.

Any suggestions?

Thanks.

Bobb Menk

Hmm...the next thing I would try is to see what if you can get to an individual collection. putting in a url like this should get you to the collection with id 1:

{yoursite}/collections/show/1

If you get an error, that will mean that there's something odd with the access control

That url gives me a 404: "/omeka/collections/show/1 is not a valid URL"

Spoke to soon. As it happens collection 1 was actually deleted for one reason or another. Pointing to collection id of 5 works though.

So that gives me the "detail" page for the specific question. How do we get the browse file to work and loop through them all?

Sorry for typo - I meant it links to the specific collection (not question)

Hmm... as a debugging thing to see if there is anything in the loop, I'd add a line like <?php echo "looping"; ?> right after where the loop starts, just to see if the array of collections is arriving on the page

<?php while (loop_collections()): ?>

Not getting anything really. Here's a snip from the page source:

<div id="content"><div id="primary">
    <h1>Browse Collections</h1>
    <div class="pagination"></div>

</div><!-- end primary -->
</div><!-- end content -->

Here's the browse.php as it is at present:

<?php
$pageTitle = __('Browse Collections');
head(array('title'=>$pageTitle,'bodyid'=>'collections','bodyclass' => 'browse'));
?>
<div id="primary">
    <h1><?php echo $pageTitle; ?></h1>
    <div class="pagination"><?php echo pagination_links(); ?></div>

    <?php while (loop_collections()): ?>
    <?php echo "looping"; ?>
    <div class="collection">

        <h2><?php echo link_to_collection(); ?></h2>

        <div class="element">
            <h3><?php echo __('Description'); ?></h3>
            <div class="element-text"><?php echo nls2p(collection('Description', array('snippet'=>150))); ?></div>
        </div>

        <?php if(collection_has_collectors()): ?>
        <div class="element">
            <h3><?php echo __('Collector(s)'); ?></h3>
            <div class="element-text">
                <p><?php echo collection('Collectors', array('delimiter'=>', ')); ?></p>
            </div>
        </div>
        <?php endif; ?>

        <p class="view-items-link"><?php echo link_to_browse_items(__('View the items in %s', collection('Name')), array('co$

        <?php echo plugin_append_to_collections_browse_each(); ?>

    </div><!-- end class="collection" -->
    <?php endwhile; ?>

    <?php echo plugin_append_to_collections_browse(); ?>

</div><!-- end primary -->

<?php foot(); ?>

Thanks

hmm... could you give a link to the page so I can poke around a little more?

Thanks

Sorry - behind the Lab firewall so there's no public access of any sort.

Ok. So far it looks like the array of collection data isn't getting to the page, even though you have access to the collections.

Next tests I'd do are to put this right before the beginning the of while loop:

<?php print_r($collections); ?>

If it's an empty array, then somehow the collections data aren't getting to the page. If it's a lot of data, we'll know that there's a problem setting up the loop of records.

If it's empty, I'm pretty sure there's something odd going on with the file /application/controllers/CollectionsController.php, and the first thing I'd suggest is replacing that file with what's in the original zip of Omeka.

Hope this helps

Added the code to the copy of browse.php living under the them folder as follows:

<?php print_r($collections); ?>
    <?php while (loop_collections()): ?>
    <?php echo "looping"; ?>
    <div class="collection">

Pointing the browser to /omeka/collections still returns no actual collection data.

The array appears empty - the content area of the page just says: "array()".

So I copied in /application/controllers/CollectionsController.php from a copy of the original zip file, but this returned the exact same "array()".

I forced a load of the page from the site rather than browser cache - no difference. I restarted Apache to see if that might matter, but it did not.

Thanks.

Bobb

So I did fresh install of 1.5.3 and restored the data from backup.

I got rid of the browse.php that was living over in /omeka/themes/LLrhythm/collections/

I added <?php print_r($collections); ?> to the native browse.php in /applications/views/scripts/collections/

To no avail. Same results. No log errors to go by.

Other ideas?

Thanks.

Bobb

I confess I'm baffled at this point. I might go back to double-checking basics:

Make sure the collections really are public

Under the admin settings, check the number of records per page for admin and public views

If there are other plugins installed, deactivate them to see if one of them is somehow interfering with the collections page.

Found it - Collections Tree plugin v 1.1.1 seems to be the culprit. When I disable it, the collections/browse.php works normally. I'll have to check with the Archives staff to see how badly they need that capability before I know how big of an issue deactivating it represents.

Thanks for your help!

Bobb

Glad it got working! If you do not need plugins that are not yet updated for 2.0, and there is a strong need for Collection Tree, updating to 2.0 might help, and let you use the updated Collection Tree.

Good luck.