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.

Pawtucket2 related entity display bundle links to self

Using the default theme included with Pawtucket2, I've found that the Entity Detail page lists links to related entities incorrectly:

For example, if I'm viewing the detail page for "Tom Smith" (..index.php/Detail/entities/677), it will correctly show that "Jane Smith" is a related person, displaying the proper label. However, the link that is included for "Jane Smith" is a link to the current entity detail (...index.php/Detail/entities/677), rather than Jane's page (perhaps ..index.php/Detail/entities/600).

This display code is found in ca_entities_default_html.php

{{{<ifcount code="ca_entities.related" min="1" max="1"><H6>Related person</H6></ifcount>}}}
{{{<ifcount code="ca_entities.related" min="2"><H6>Related people</H6></ifcount>}}}
{{{<unit relativeTo="ca_entities" delimiter="<br/>"><l>^ca_entities.related.preferred_labels.displayname</l></unit>}}}

Again, the label is being displayed properly, but the correct link isn't being pulled. I've tried to poke around a bit to see if I could figure out where the <l> markup is being parsed, but haven't stumbled on it yet.

Comments

  • Just noticed there is already a ticket in JIRA about this...sorry!
  • Which ticket are you looking at?
  • I just pushed a fix that _should_ address this. Can you do a pull on your installation and use the "develop" branch to give it a try?

    thanks,
    seth
  • Sure, I'll take a look and let you know.
  • Hi Seth,
     Sorry it took me so long to look at this... no, the dev branch doesn't seem to fix. The new code in ca_entities_default_html.php

                                            {{{<ifcount code="ca_entities.related" min="1" max="1"><H6>Related person</H6></ifcount>}}}
    {{{<ifcount code="ca_entities.related" min="2"><H6>Related people</H6></ifcount>}}}
    {{{<unit relativeTo="ca_entities_x_entities" delimiter="<br/>"><unit relativeTo="ca_entities" delimiter="<br/>">           <l>^ca_entities.related.preferred_labels.displayname</l></unit> (^relationship_typename)</unit>}}}

    renders the following html (where we are on Jim Doe's entity page, showing the relation to John Smith):

    <h6> Related person</h6>
    <a href="/site/index.php/Detail/entities/1">Smith, John</a><br/><a href="/site/index.php/Detail/entities/66">Doe, Jim</a> (is related to)


    The link to Smith points to Doe's page, and the link to Doe points to Smith's. What I'd expect to see is:

    <h6> Related person</h6>
    <a href="/site/index.php/Detail/entities/66">Smith, John</a> (is related to)

  • I found I was partially able to mitigate the issue when the relationship was between two objects with different types. Putting a "restrictToType" limiter in the interior unit, and then creating a second Detail page for the other type helped. Not sure how to handle this on my Entities page, where there is only one type...
  • Following up again to share a template from Seth which resolves the issue described:

    {{{<unit relativeTo="ca_objects.related" delimiter="<br/>"><l>^ca_objects.preferred_labels</l></unit>}}}

    Note that the ".related" limiter is part of the "relativeTo" unit value, rather than the displayed bundle specifier.
Sign In or Register to comment.