Browse Results: Fixing maximum number of objects per page
Pawtucket2 version: 1.7.9; Providence version: 1.7.13
Problems:
1] While browsing, all my objects are shown in one page, scrolling down too far to the bottom of the page. This is despite the following configuration in pawtucket2/themes/my_theme/conf/browse.conf
# --- default number of results per page/ajax load defaultHitsPerBlock = 36
2] While browsing without login into any user account, the loading icon continuously keeps rotating at the bottom of the page [see Image-01]. Kindly note that I am keeping the media representations of several objects under restricted public access
condition. However, other than the media representations, the textual descriptions of all objects are intended to be accessible to all viewers without requiring to login. This 2nd problem is experienced only when the page is viewed without login into any user account.
What I tried:
I tried by removing the following lines from the file pawtucket2/themes/my_theme/views/Browse/browse_results_html.php
<script type="text/javascript"> jQuery(document).ready(function() { jQuery('#browseResultsContainer').jscroll({ autoTrigger: true, loadingHtml: "<?php print caBusyIndicatorIcon($this->request).' '.addslashes(_t('Loading...')); ?>", padding: 800, nextSelector: 'a.jscroll-next' }); <?php if($vn_row_id){ ?> window.setTimeout(function() { $("window,body,html").scrollTop( $("#row<?php print $vn_row_id; ?>").offset().top); }, 0); <?php } if(is_array($va_add_to_set_link_info) && sizeof($va_add_to_set_link_info)){ ?> jQuery('#setsSelectMultiple').on('submit', function(e){ objIDs = []; jQuery('#setsSelectMultiple input:checkbox:checked').each(function() { objIDs.push($(this).val()); }); objIDsAsString = objIDs.join(';'); caMediaPanel.showPanel('<?php print caNavUrl($this->request, '', $va_add_to_set_link_info['controller'], 'addItemForm', array("saveSelectedResults" => 1)); ?>/object_ids/' + objIDsAsString); e.preventDefault(); return false; }); <?php } ?> }); </script>
Results:
Removing the above script does show my intended 36 items per page. But this happens only when I login as administrator or other user. When accessed without any login, only the 1st 36 items are shown correctly on the 1st page. For the subsequent pages, following error appears on clicking Next 36
link [see Image_2]:
Errors occurred when trying to access /pawtucket2/index.php/Browse/objects/s/36/key/ecc7411b22d8481e480b6140ebe83778/view/images/sort/_advanced/0:
View does not exist