collectiveaccess / pawtucket2

Pawtucket Improved
GNU General Public License v3.0
85 stars 76 forks source link

Get related objects has started failing in detail view #106

Closed Monica-Wood closed 6 months ago

Monica-Wood commented 6 months ago

Using this snippet:

{{{<ifcount code="ca_objects" min="2">
        <div class="container">
            <h2>Items in Collection</h2>
            <div class="row">
                <div id="browseResultsContainer">
                    <?php print caBusyIndicatorIcon($this->request).' '.addslashes(_t('Loading...')); ?>
                </div><!-- end browseResultsContainer -->
            </div><!-- end row -->
        </div>
            <script type="text/javascript">
                jQuery(document).ready(function() {
                    jQuery("#browseResultsContainer").load("<?php print caNavUrl($this->request, '', 'Search', 'objects', array('search' => 'collection_id:^ca_collections.collection_id'), array('dontURLEncodeParameters' => true)); ?>", function() {
                        jQuery('#browseResultsContainer').jscroll({
                            autoTrigger: true,
                            loadingHtml: '<?php print caBusyIndicatorIcon($this->request).' '.addslashes(_t('Loading...')); ?>',
                            padding: 20,
                            nextSelector: 'a.jscroll-next'
                        });
                    });

                });
            </script>
        </ifcount>}}}

Which was working the last time I looked (couple of weeks ago?). Has started to produce this

Screenshot 2024-05-16 at 4 49 58 PM

Happens in the collections detail as above and entities detail views when trying to get a search result of related objects (the entity view has related objects and collections done the same way and only objects throws the error)

collectiveaccess commented 6 months ago

What do the logs say?

Monica-Wood commented 6 months ago

The logs have nothing to say for themselves. Nginx, PHP and App logs ... zilch.

Monica-Wood commented 6 months ago

I checked with default theme and doing it there. so not my theme settings.

Monica-Wood commented 6 months ago

So just ignore me. I changed the Browse view to be 'items' instead of 'objects'. Still curious why it didn't work on the default one though, some sort of cache seeping through maybe.