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

"Sort field for collection query" causes errors, empty collection display

    Details

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

      Description

      Adding a field to the "Sort field for collection query" option in the collection SP, or at the collection level in the collection's "Set Solr Sort String" tab, causes the collection display to show no results and the following error messages to appear:

      • Error searching Solr index "400" Status: Bad Request
      • Warning: array_map(): Argument #2 should be an array in islandora_solr_islandora_basic_collection_backend_callable() (line 409 of /var/www/drupal/sites/all/modules/islandora_solr_search/includes/utilities.inc).

      I've tried using "mods_originInfo_dateIssued_dt" and "mods_originInfo_dateIssued_t" as sort fields, and all objects in the collection have these fields.

      I've seen this on the Vagrant and on our production server as well. Dumping out the $qp variable in line 409 of the cited file looks like:

      IslandoraSolrQueryProcessor Object
      (
          [solrQuery] => RELS_EXT_isMemberOf_uri_ms:("info:fedora/islandora:sp_basic_image_collection" OR "islandora:sp_basic_image_collection") OR RELS_EXT_isMemberOfCollection_uri_ms:("info:fedora/islandora:sp_basic_image_collection" OR "islandora:sp_basic_image_collection")
          [internalSolrQuery] =>
          [solrStart] => 0
          [solrLimit] => 12
          [solrDefType] =>
          [solrParams] => Array
              (
                  [facet] => true
                  [facet.mincount] => 2
                  [facet.limit] => 20
                  [facet.field] => Array
                      (
                          [0] =>
                      )
      
                  [fq] => Array
                      (
                          [0] => -RELS_EXT_isConstituentOf_uri_mt:[* TO *]
                          [1] => RELS_EXT_isViewableByUser_literal_ms:"admin" OR RELS_EXT_isViewableByRole_literal_ms:"authenticated user" OR RELS_EXT_isViewableByRole_literal_ms:"administrator" OR ((*:* -RELS_EXT_isViewableByUser_literal_ms:[* TO *]) AND (*:* -RELS_EXT_isViewableByRole_literal_ms:[* TO *]))
                      )
      
                  [sort] => mods_originInfo_dateIssued_dt
              )
      
          [islandoraSolrResult] =>
          [display] => default
          [internalSolrParams] => Array
              (
              )
      
          [differentKindsOfNothing] => Array
              (
                  [0] =>
                  [1] => %20
                  [2] => %252F
                  [3] => %2F
                  [4] => %252F-
                  [5] =>
              )
      
      )
      

      The array member "islandoraSolrResult" is the "Argument #2" mentioned in the array_map() warning. As you can see, it's empty in this dumped IslandoraSolrQueryProcessor.

        Attachments

          Activity

            People

            • Assignee:
              markj Mark Jordan
              Reporter:
              markj Mark Jordan
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: