Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Books not being added to catalog #202

Closed
SteelWagstaff opened this issue Dec 4, 2019 · 4 comments
Closed

Books not being added to catalog #202

SteelWagstaff opened this issue Dec 4, 2019 · 4 comments
Assignees
Labels
bug Something isn't working network catalog

Comments

@SteelWagstaff
Copy link
Member

SteelWagstaff commented Dec 4, 2019

Description

A network manager has attempted to add a public book on his network to the site's root catalog, but the book does not appear in the catalog list. No books created on or after August 9, 2019 can be successfully added to the catalog on that particular network.

Steps to Reproduce

  1. Visit https://ohiostate.pressbooks.pub/wp/wp-admin/network/sites.php?page=pb_network_analytics_booklist as a super admin and find 'Writing Fabulous Features'
  2. Toggle the 'In Catalog' checkmark off and on -- make sure the checkmark is green and the book is set to be included in the catalog. Confirm by looking at https://ohiostate.pressbooks.pub/wp/wp-admin/network/sites.php?orderby=lastupdated&order=desc and the Pressbooks Publisher in Catalog value at https://ohiostate.pressbooks.pub/wp/wp-admin/network/site-settings.php?id=209.
  3. Visit the published catalog for Ohio State at https://ohiostate.pressbooks.pub/catalog/page/3/ and look for 'Writing Fabulous Features'. It's not there!

Expected behavior:
The book would be added to the root network's catalog when the 'add to catalog' box is checked for the book.

Actual behavior:
The book was not added to the root network's catalog when the 'add to catalog' box was checked.

More information:
If you sort the books by creation date and attempt to add various books to the catalog, any book created on August 7, 2019 or before will be successfully added to the catalog (like SWK 5805: Theories and Biological Basis of Substance Misuse). However, no books created on August 9, 2019 or after can be added to the catalog (for example: Insects & Human Affairs: Pests, Plagues, Pollinators and Poisons). On other networks, this date is different, but the effect is the same. On Wisconsin's network, for example, books created on or before January 31, 2018 (Teaching Assistantships: Designing for Inclusivity) can be added, but books created on or after February 1, 2018 (Materials for Swahili Learners) cannot. On Michigan's network (which uses Pressbooks Publisher theme instead of Aldine, books created on or before June 16, 2017 can be added, but those created after June 23, 2017 cannot).

@SteelWagstaff SteelWagstaff changed the title Book not being added to catalog Books not being added to catalog Dec 4, 2019
@SteelWagstaff SteelWagstaff added bug Something isn't working network catalog labels Dec 4, 2019
@SteelWagstaff
Copy link
Member Author

SteelWagstaff commented Dec 4, 2019

Perhaps this issue is related to the total number of books on a given network rather than the date itself. Michigan's network has 175+ books, OSU's 180+, and Wisconsin's 420+. Perhaps books registered after a certain number of sites on a given network has been reached can't be added to catalog for some reason? On Michigan's the problem begins with book id 120. On Ohio State's network, the problem begins with book id 206 and on Wisconsin's it begins with book id 207

@dac514 dac514 self-assigned this Dec 10, 2019
@dac514 dac514 moved this from To do to In progress in Sprint Dec 2 - 20 Dec 10, 2019
@dac514
Copy link
Contributor

dac514 commented Dec 10, 2019

Looks like get_sites defaults to a maximum number of 100. (of public books)

dac514 added a commit that referenced this issue Dec 10, 2019
Set number to to something absurdly high

Use meta_key and meta_value to narrow results even further
@dac514 dac514 moved this from In progress to Ready for Testing in Sprint Dec 2 - 20 Dec 10, 2019
@dac514
Copy link
Contributor

dac514 commented Dec 10, 2019

Bug happens when there are more than 100 public books.

@dac514 dac514 assigned mcgratay and unassigned dac514 Dec 10, 2019
@mcgratay
Copy link

Can't say I tried for 1,000,001 but this issue seems resolved 👍

@mcgratay mcgratay moved this from Ready for Testing to Done in Sprint Dec 2 - 20 Dec 11, 2019
@dac514 dac514 closed this as completed Dec 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working network catalog
Projects
No open projects
Development

No branches or pull requests

3 participants