Autocomplete for tags does not work on public interface unless logged in

Hi everyone,

I posted to the forum last month about adding autocomplete functionality that is available for adding tags to the advanced search for tags on the Public Interface. I was able to get it to work, but it only works when I’m logged into Omeka:


Can anyone give me insight on how to keep this functionality when I’m not logged in?

Thanks in advance,

Jen Cwiok AMNH Library, Systems Librarian

Hello, @jcwiok Could we see your code? It might be that the function you’ve implemented is limited to specific users…

Hello, @jcwiok.

Just managed to add autocomplete functionality to the tags input field in Items batch-edit page (admin side). To do it, I’ve changed the admin/themes/default/items/batch-edit.php as you can see following the link, basically adding

queue_js_file('items');
$tagDelimiter = get_option('tag_delimiter');

at the beginning of the file, and

    <script type="text/javascript">
    //<![CDATA[
    jQuery(document).ready(function () {
        Omeka.Items.tagDelimiter = <?php echo js_escape($tagDelimiter); ?>;
        Omeka.Items.tagChoices('#metadata-tags', <?php echo js_escape(url(array('controller' => 'tags', 'action' => 'autocomplete'), 'default', array(), true)); ?>);
    });
    //]]>
    </script>

at the beginning of the batch-edit-form.

I wonder whether your problem comes from some missing reference to Items while in the public side. Hope this can help a bit.

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