{"action":"opened","issue":{"url":"https://api.github.com/repos/pressbooks/pressbooks/issues/1487","repository_url":"https://api.github.com/repos/pressbooks/pressbooks","labels_url":"https://api.github.com/repos/pressbooks/pressbooks/issues/1487/labels{/name}","comments_url":"https://api.github.com/repos/pressbooks/pressbooks/issues/1487/comments","events_url":"https://api.github.com/repos/pressbooks/pressbooks/issues/1487/events","html_url":"https://github.com/pressbooks/pressbooks/issues/1487","id":386255111,"node_id":"MDU6SXNzdWUzODYyNTUxMTE=","number":1487,"title":"\\Pressbooks\\Styles::updateWebBookStyleSheet() does not handle locked themes properly","user":{"login":"greatislander","id":605361,"node_id":"MDQ6VXNlcjYwNTM2MQ==","avatar_url":"https://avatars0.githubusercontent.com/u/605361?v=4","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},"labels":[{"id":34519218,"node_id":"MDU6TGFiZWwzNDUxOTIxOA==","url":"https://api.github.com/repos/pressbooks/pressbooks/labels/bug","name":"bug","color":"b60205","default":true}],"state":"open","locked":false,"assignee":{"login":"connerbw","id":812192,"node_id":"MDQ6VXNlcjgxMjE5Mg==","avatar_url":"https://avatars1.githubusercontent.com/u/812192?v=4","gravatar_id":"","url":"https://api.github.com/users/connerbw","html_url":"https://github.com/connerbw","followers_url":"https://api.github.com/users/connerbw/followers","following_url":"https://api.github.com/users/connerbw/following{/other_user}","gists_url":"https://api.github.com/users/connerbw/gists{/gist_id}","starred_url":"https://api.github.com/users/connerbw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/connerbw/subscriptions","organizations_url":"https://api.github.com/users/connerbw/orgs","repos_url":"https://api.github.com/users/connerbw/repos","events_url":"https://api.github.com/users/connerbw/events{/privacy}","received_events_url":"https://api.github.com/users/connerbw/received_events","type":"User","site_admin":false},"assignees":[{"login":"connerbw","id":812192,"node_id":"MDQ6VXNlcjgxMjE5Mg==","avatar_url":"https://avatars1.githubusercontent.com/u/812192?v=4","gravatar_id":"","url":"https://api.github.com/users/connerbw","html_url":"https://github.com/connerbw","followers_url":"https://api.github.com/users/connerbw/followers","following_url":"https://api.github.com/users/connerbw/following{/other_user}","gists_url":"https://api.github.com/users/connerbw/gists{/gist_id}","starred_url":"https://api.github.com/users/connerbw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/connerbw/subscriptions","organizations_url":"https://api.github.com/users/connerbw/orgs","repos_url":"https://api.github.com/users/connerbw/repos","events_url":"https://api.github.com/users/connerbw/events{/privacy}","received_events_url":"https://api.github.com/users/connerbw/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/pressbooks/pressbooks/milestones/64","html_url":"https://github.com/pressbooks/pressbooks/milestone/64","labels_url":"https://api.github.com/repos/pressbooks/pressbooks/milestones/64/labels","id":3856114,"node_id":"MDk6TWlsZXN0b25lMzg1NjExNA==","number":64,"title":"5.6.3","description":"","creator":{"login":"greatislander","id":605361,"node_id":"MDQ6VXNlcjYwNTM2MQ==","avatar_url":"https://avatars0.githubusercontent.com/u/605361?v=4","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},"open_issues":7,"closed_issues":0,"state":"open","created_at":"2018-11-28T20:14:03Z","updated_at":"2018-11-30T16:20:01Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2018-11-30T16:20:01Z","updated_at":"2018-11-30T16:20:01Z","closed_at":null,"author_association":"MEMBER","body":"### Prerequisites\r\n\r\n* [x] Can you reproduce the behavior you wish to address with [all other plugins deactivated](http://codex.wordpress.org/Multisite_Network_Administration#Plugins)?\r\n* [x] Are you running the [latest version of Pressbooks](http://github.com/pressbooks/pressbooks/releases/latest/) and the [latest version of WordPress](http://codex.wordpress.org/Upgrading_WordPress)?\r\n* [x] Are you experiencing this issue with one of our built-in root or book themes?\r\n* [x] Did you [perform a cursory search](https://github.com/issues?q=+is%3Aissue+repo%3Apressbooks%2Fpressbooks) to see if your bug or enhancement is already listed?\r\n\r\n### Description\r\n\r\nIf a theme is locked, `\\Pressbooks\\Styles::updateWebBookStyleSheet()` does not load SCSS from the lock directory, but rather from the stylesheet directory:\r\n\r\n```php\r\nif ( $this->isCurrentThemeCompatible( 1 ) ) {\r\n\t$scss = \\Pressbooks\\Utility\\get_contents( realpath( $theme->get_stylesheet_directory() . '/style.scss' ) );\r\n} elseif ( $this->isCurrentThemeCompatible( 2 ) || CustomCss::isCustomCss() ) {\r\n\t$scss = \\Pressbooks\\Utility\\get_contents( realpath( $theme->get_stylesheet_directory() . '/assets/styles/web/style.scss' ) );\r\n}\r\n```\r\n\r\n(See [here](https://github.com/pressbooks/pressbooks/blob/dev/inc/class-styles.php#L550-L554).)\r\n\r\nThis can cause the webbook stylesheet to be regenerated with incorrect CSS.\r\n\r\n### Steps to Reproduce\r\n\r\n1. Lock a theme at an older version.\r\n2. Delete the compiled webbook stylesheet at `/uploads/sites/<ID>/pressbooks/css/style.css`.\r\n3. Visit the book and inspect the regenerated stylesheet.\r\n\r\n**Expected behavior:** The stylesheet is regenerated from the source at `/uploads/sites/<ID>/pressbooks/lock/`.\r\n\r\n**Actual behavior:** It is regenerated from the source at `/themes/<THEME>/`.\r\n\r\n### System Information\r\n\r\nPressbooks: 5.6.x"}}
{"actor":{"display_login":"greatislander"}}