These are chat archives for collectiveaccess/support

21st
Dec 2017
ca-ubos
@ca-ubos
Dec 21 2017 10:44

@mwbenowitz thanks, I changed to str_replace but it still does not change anything. My Code is:

{{{<ifcount code="ca_objects.lcsh_terms" min="1">    
    <H5>Library of Congress Subject Headings</H5>
    <ul>
        <li><unit relativeTo="ca_objects.lcsh_terms.id" delimiter="<li>">^ca_objects.lcsh_terms.text</unit>
    </ul>
    <?php
        $str = '^ca_objects.lcsh_terms.id';
        $url = str_replace('info:lc', 'http://id.loc.gov', $str);
        echo "The URL is ".$url;
    ?>  
<HR></ifcount>}}}

and the Output looks like this:

CollectiveAccess
@collectiveaccess
Dec 21 2017 11:58
@sshipley64 I've never seen this one. Make sure there isn't something clearing the contents of the app/tmp directory while people are logged in. Removing tmp files will log all users out.
sshipley64
@sshipley64
Dec 21 2017 16:06
No. It doesn't look to be that. It's odd that it seems to be happening only after those particular activities.
Mike Benowitz
@mwbenowitz
Dec 21 2017 17:40
@ca-ubos ah, I see. The ^ notation in the code block doesn't get rendered until after your php executes, so it can't do the match there. You can do that in php by using get $t_object->get() creating the element with that method (you'll probably want to create the entire list in php and echo the resulting string)