pressbooks / pressbooks-network-catalog

A Pressbooks plugin which provides an improved catalog for the Pressbooks Aldine theme
2 stars 1 forks source link

Feature request: Only show filters of books in catalog #160

Closed beckej13820 closed 1 year ago

beckej13820 commented 1 year ago

We just installed the new catalog page and one of the things that we noticed immediately are that the catalog was pulling in all values for the filter, regardless of whether there were public books in that category:

For example, looking at the "Institution" category, it is pulling from all of our books SUNY Oneonta, SUNY Oswego, SUNY Fredonia, and University at Buffalo:

Screenshot 2023-01-23 at 5 13 09 PM

However, this includes institutions that do not have books in the public catalog. They may have books on our network, but either are not released yet for wider consumption OR we have excluded them from our network page. For example, we plan to only put our original books on our network page, not remixes or copies. But with the current settings, Iowa State Press shows up on our list of Publishers (despite not being in our catalog).

Screenshot 2023-01-23 at 5 19 12 PM
beckej13820 commented 1 year ago

I'm a little confused about this, because it is identical to #136 and it says it should be fixed in the current version 1.2. I'm including my network diagnostics page to show that I am using Pressbooks Network Catalog 1.2.0 and still seeing this error.

System Information

Root Blog Info

Root Blog ID: 1 Root Blog URL: https://pressbooks.sunycreate.cloud/

Browser

Platform: OS X Browser Name: Safari Browser Version: 16.1 User Agent String: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Safari/605.1.15

WordPress Configuration

Network URL: https://pressbooks.sunycreate.cloud/ Network Type: Subdomain Version: 6.1.1 Language: en_US WP_ENV: Not set WP_DEBUG: Enabled Memory Limit: 64M

Pressbooks Configuration

Version: 6.6.0 Root Theme: Aldine Root Theme Version: 1.18.1

Pressbooks Dependencies

Epubcheck: Installed xmllint: Installed PrinceXML: Installed Saxon-HE: Installed

Must-Use Plugins

hm-autoloader.php: n/a

Network Active Plugins

Git Updater: 12.0.3 Koko Analytics: 1.0.37 Limit Login Attempts Reloaded: 2.25.11 Pressbooks: 6.6.0 Pressbooks Network Catalog: 1.2.0 Unconfirmed: 1.3.5

Root Blog Active Plugins

Git Updater: 12.0.3 Koko Analytics: 1.0.37 Limit Login Attempts Reloaded: 2.25.11 Pressbooks: 6.6.0 Pressbooks Network Catalog: 1.2.0 Unconfirmed: 1.3.5

Inactive Plugins

Candela Citation: 0.2.4 H5P: 1.15.6 Hypothesis: 0.6.0 Pressbooks Shortcode Handler: 0.1 Pressbooks Stats: 1.6.4 TablePress: 2.0.4 WordPress Importer: 0.8 WP QuickLaTeX: 3.8.6

Server Configuration

PHP Version: 8.0.25 MySQL Version: 5.7.30 Webserver Info: Apache

PHP Configuration

Memory Limit: 256M Upload Max Size: 150M Post Max Size: 150M Upload Max Filesize: 150M Time Limit: 60 Max Input Vars: 1000 URL-aware fopen: On (1) Display Errors: N/A

PHP Extensions

OPcache: Disabled XDebug: Disabled cURL: Supported cURL Version: 7.86.0 imagick: Installed xsl: Installed

SteelWagstaff commented 1 year ago

Hi @beckej13820 this is odd. The fix for this was included in Pressbooks 6.5.0 and Pressbooks Network Catalog 1.2.0. There's something in Pressbooks core called a 'data collector' that is scheduled via a cron job and should collect and centralize this information into your network's wp_blogmeta table. See: https://github.com/pressbooks/pressbooks/blob/dev/inc/datacollector/class-book.php. This is a fairly 'old' feature in core Pressbooks -- this PR from Dac in 2019 explains the concept and how its designed to work: https://github.com/pressbooks/pressbooks/pull/1800

Can you check to see if you have something that's scheduling and running that cron? The reason why I ask is that it's working as intended on all the networks we host and we haven't had reports from anyone else in the open source user world ...

beckej13820 commented 1 year ago

Hi Steel,

The fact that this job runs on a schedule may have been the problem. I submitted this issue immediately after updating, and while it was true then, the issue has gone away since then.