Islandora-Labs / islandora_solr_collection_view

This replaces the browse display provided by Islandora collection objects with a View, providing enhanced customization and performance.
http://islandora.ca/
GNU General Public License v3.0
3 stars 4 forks source link

Array to string conversion notice #23

Open mjordan opened 6 years ago

mjordan commented 6 years ago

Using this module, we've been getting the following notice:

array_error_message

I tracked this down to islandora_solr_collection_view_islandora_collectionCModel_islandora_view_object() returning an array. When I changed https://github.com/Islandora-Labs/islandora_solr_collection_view/blob/7.x/islandora_solr_collection_view.module#L80-L82 to return $view;, the error no longer occurs and the module appears to work as intended.

Two strange things:

  1. This notice doesn't appear on a clean Vagrant, only on our server as far as we know.
  2. The API docs for https://github.com/Islandora/islandora/blob/7.x/islandora.api.php#L22 indicate that implementations should return an array (which is what islandora_solr_collection_view_islandora_collectionCModel_islandora_view_object() currently does), yet returning a string (which is what my modified version does) also works. The mysteries of render arrays?
patdunlavey commented 6 years ago

Is this being rendered through a custom template? Could just be that the template should print render($var); rather than just print $var;

mjordan commented 6 years ago

No, I'm not using a custom template, although we are running a custom (local) theme. Other Views work on the site without issue.

MorganDawe commented 6 years ago

Two cents, I have noticed this happening from time to time if a view i am using has a broken or missing handler (field is no longer available in the views cache, for whatever reason). May be unrelated.

mjordan commented 6 years ago

Thanks, I'll check that out.

astrohm commented 6 years ago

I'm seeing the same behavior, did anyone ever track down what's causing the issue?