Public page content not appearing when user logged in

Hey,

I have created a plugin that works with all installations except one, that I know of. I am not sure if this is an issue with the plugin or an issue with the particular install of Omeka. There are no errors being generated that I can find. Here is the relevant snippet from my plugin.

<ul id="splashset" class="splashlist">
   
    
<?php foreach (loop('items') as $item): ?>
<?php if (metadata('item', 'item_type_name')): ?>
 <?php 
$type = $item->getItemType()->name;
if ('Oral History' === $type): ?>
<li id="<?php echo metadata('item', array('Item Type Metadata','Sort Priority')); ?>" class="splashitem">
<div class="item record">

    <div class="item-meta">
    <?php if (metadata('item', 'has files')): ?>
    <div class="item-img">
        <?php echo link_to_item(item_image('square_thumbnail')); ?>
    </div>
    <?php endif; ?>
    <h2 class="splash_head_style"><?php echo link_to_item(metadata('item', array('Dublin Core', 'Title'), array('snippet'=>35))); ?></h2>
    <?php if ($description = metadata('item', array('Dublin Core', 'Description'), array('snippet'=>160))): ?>
    <div class="splashitem-description">
        <?php echo $description; ?>
    </div>
    <?php endif; ?>

Note that when NOT logged into admin, the content generated via the query after the line <ul id="splashset" class="splashlist"> appears just fine. However, when logged into admin, accessing the public page shows no sign of the query results on the page. The install in question is 2.6.1. However, others have installed and implemented with this version of Omeka just fine. I’m wondering if there is anything you can think of that might cause this kind of issue, so that I can investigate a fix. For reference, the full plugin is available here: https://github.com/libmanuk/SimpleSplashForm

Thx.

–Eric

My first guess in a situation like this is that there’s some plugin conflict unique to the installation where it doesn’t work, so I’d try disabling other plugins one by one to see if that makes it work again.

I browsed through the code a little looking for anything related to permissions – from your description, my second guess is that there’s a weird thing where anonymous users have access, but somehow admins don’t have access to items. Do the other pages, like items/browse, work as expected?

Other pages, like items/browse work as expected. Also, not seeing this on other installs. I do think that this particular install when through an auto update to 2.6.1 recently. I believe that your disabling other plugins approach was tried without success/change in the behavior.

Hey, Any further thoughts on how I might troubleshoot this issue?

Thx.

–Eric

Is it possible that the “Sort Priority” Item Type Metadata field doesn’t exist on the problem install but does on the others? Or possibly is spelled differently, something like that?

This topic was automatically closed after 250 days. New replies are no longer allowed.