{"action":"created","issue":{"url":"https://api.github.com/repos/pressbooks/pressbooks/issues/139","labels_url":"https://api.github.com/repos/pressbooks/pressbooks/issues/139/labels{/name}","comments_url":"https://api.github.com/repos/pressbooks/pressbooks/issues/139/comments","events_url":"https://api.github.com/repos/pressbooks/pressbooks/issues/139/events","html_url":"https://github.com/pressbooks/pressbooks/issues/139","id":85188029,"number":139,"title":"database error pressbooks publisher theme","user":{"login":"bdolor","id":2048170,"avatar_url":"https://avatars.githubusercontent.com/u/2048170?v=3","gravatar_id":"","url":"https://api.github.com/users/bdolor","html_url":"https://github.com/bdolor","followers_url":"https://api.github.com/users/bdolor/followers","following_url":"https://api.github.com/users/bdolor/following{/other_user}","gists_url":"https://api.github.com/users/bdolor/gists{/gist_id}","starred_url":"https://api.github.com/users/bdolor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdolor/subscriptions","organizations_url":"https://api.github.com/users/bdolor/orgs","repos_url":"https://api.github.com/users/bdolor/repos","events_url":"https://api.github.com/users/bdolor/events{/privacy}","received_events_url":"https://api.github.com/users/bdolor/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pressbooks/pressbooks/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"greatislander","id":605361,"avatar_url":"https://avatars.githubusercontent.com/u/605361?v=3","gravatar_id":"","url":"https://api.github.com/users/greatislander","html_url":"https://github.com/greatislander","followers_url":"https://api.github.com/users/greatislander/followers","following_url":"https://api.github.com/users/greatislander/following{/other_user}","gists_url":"https://api.github.com/users/greatislander/gists{/gist_id}","starred_url":"https://api.github.com/users/greatislander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greatislander/subscriptions","organizations_url":"https://api.github.com/users/greatislander/orgs","repos_url":"https://api.github.com/users/greatislander/repos","events_url":"https://api.github.com/users/greatislander/events{/privacy}","received_events_url":"https://api.github.com/users/greatislander/received_events","type":"User","site_admin":false},"milestone":null,"comments":5,"created_at":"2015-06-04T17:06:17Z","updated_at":"2015-06-08T20:57:34Z","closed_at":null,"body":"Description: Database errors are showing up in debug.log as queries generated against tables (blog_id) that do not exist. \r\n\r\n![screen shot 2015-06-04 at 9 43 05 am](https://cloud.githubusercontent.com/assets/2048170/7989409/2ad88efc-0a9e-11e5-9c6d-81f3457fd96b.png)\r\n \r\nTo recreate: Network Activate the new 'pressbooks publisher' theme. Go to the root site and activate 'pressbooks publisher' theme. Visit Site. Click on 'My Books'. Watch the console log for queries made against non-existent database tables. \r\n\r\nRelated/Relevant Issues: \r\n- There is a reference to 'pressbooks-publisher-one' [here](https://github.com/pressbooks/pressbooks/blob/dev/includes/pb-catalog.php#L128). This generates an 'internal server error' if you navigate to the my catalogue page and click on any of the cover images. If that `$base_href` value gets updated to 'pressbooks-publisher' it generates a fatal error. \r\n- Definitely unrelated, but relevant, there are numerous references to 'pressbooks-publisher-one' in the [language file](https://github.com/pressbooks/pressbooks/blob/dev/languages/_pressbooks.pot#L61): \r\n- Some other strange behaviour, is that the admin menu has mostly disappeared in the admin interface of the root site.\r\n\r\n![screen shot 2015-06-04 at 10 00 51 am](https://cloud.githubusercontent.com/assets/2048170/7989833/3138aa36-0aa1-11e5-8966-d2a1fe24ab19.png)\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/pressbooks/pressbooks/issues/comments/110136807","html_url":"https://github.com/pressbooks/pressbooks/issues/139#issuecomment-110136807","issue_url":"https://api.github.com/repos/pressbooks/pressbooks/issues/139","id":110136807,"user":{"login":"bdolor","id":2048170,"avatar_url":"https://avatars.githubusercontent.com/u/2048170?v=3","gravatar_id":"","url":"https://api.github.com/users/bdolor","html_url":"https://github.com/bdolor","followers_url":"https://api.github.com/users/bdolor/followers","following_url":"https://api.github.com/users/bdolor/following{/other_user}","gists_url":"https://api.github.com/users/bdolor/gists{/gist_id}","starred_url":"https://api.github.com/users/bdolor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdolor/subscriptions","organizations_url":"https://api.github.com/users/bdolor/orgs","repos_url":"https://api.github.com/users/bdolor/repos","events_url":"https://api.github.com/users/bdolor/events{/privacy}","received_events_url":"https://api.github.com/users/bdolor/received_events","type":"User","site_admin":false},"created_at":"2015-06-08T20:57:34Z","updated_at":"2015-06-08T20:57:34Z","body":"No change. Running the query `SELECT * FROM `wp_pressbooks_catalog` WHERE users_id = 1 AND `deleted` = 0;` directly against the db returns the same: 39 rows. It does tell me that there is/was a disconnect between the event of deleting a book and updating the `wp_pressbooks_catalog` table. Now that I know what to look at, I'll see if I can re-create those conditions, before asking you to spend any more time on it. Thanks @greatislander "}}