Uploaded image for project: 'Islandora'
  1. Islandora
  2. ISLANDORA-1623

'Show More / Show Less' on field values with a maximum length

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 7.x-1.6
    • Fix Version/s: 7.x-1.7
    • Component/s: Solr Search
    • Labels:
      None

      Description

      'Show More / Show Less' will produce munged up code when linking a trimmed field value to object page or search results page when configured to be of maximum length. I believe the culprit is here: https://github.com/Islandora/islandora_solr_search/blob/7.x/includes/utilities.inc#L356 (wrapping links in links?). I have been able to reproduce this locally, and as the code implies, this only appears happens on display fields that are trimmed to a max length AND linked to a search result or object page. This creates broken or invalid html, and as a result, causes unexpected behavior with surrounding elements. Namely, the show more and show less links not functioning.

      -Steps to Reproduce-
      1: Add a default display field of appropriate length
      2: Click configure
      3: Select 'Link this field to the object's page. ' or 'Link the value to a Solr search result.'
      4: Expand Maximum Length field set, and select 'Limit length of whole field'
      5: Add a Maximum Length less then the characters that would appear in the value of the selected field.

      -Test Case-
      Follow the steps to reproduce, and ensure the show more/show less links produce valid output, and function as intended.

      Tags:
      Jordan Dukart


      Morgan Dawe
      Themer/Developer
      discoverygarden inc. | Managing Digital Content

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              morgandawe Morgan Dawe
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: