CSS load failure, continued

Hello! The issue reported here: Css load content failure seems to still be an issue for us on multiple installs of Pressbooks. We’re running Pressbooks 3.9.10 and Pressbooks Textbook For almost every book on every instance of PB, we’re getting the error loading editor.css

I tried the solution in post 187 around deleting the editor.css, changing the language, and hard-reloading the page but without any luck.

In Chrome’s dev console, I’m seeing a 500 going to:

Any other ideas on what to try?


Hi @brianesham, that component is no longer being imported in the version of Pressbooks Textbook you’re running: https://github.com/BCcampus/pressbooks-textbook/blob/dev/themes-book/opentextbook/assets/styles/components/_structure.scss Can you switch to a different theme and see if that fixes the issue, then switch back?

Hey @ned! It doesn’t look like that helps. I switched to a different theme, went to the editor, and the message was still there. Switching back to the Open Textbooks theme still results in the error as well.

Hi @brianesham, thanks for checking that. Can you post the contents of wp-content/plugins/pressbooks-textbook/themes-book/opentextbook/assets/styles/components/_structure.scss here?

Okay, try this:

  1. Go to: Theme Options → Global Options → Language Support.
  2. Add any language, Save Changes.
  3. See if the problem persists.

Sure! The contents of that file are below. I did try the language thing earlier as well based on the recommendations from the original thread, but without any luck.

// Structure

// Running content is made of three kinds of content:
// -page number
// -separator
// -running content
// First, choose page number position options (choose one!)

//$numbering-position: 'top-outside-corner' !default;
$numbering-position: 'top-outside' !default;
//$numbering-position: 'top-center' !default;
//$numbering-position: 'top-inside' !default;
//$numbering-position: 'outside-top' !default;
//$numbering-position: 'outside-middle' !default;
//$numbering-position: 'outside-bottom' !default;
//$numbering-position: 'bottom-outside-corner' !default;
//$numbering-position: 'bottom-outside' !default;
//$numbering-position: 'bottom-center' !default;
//$numbering-position: 'bottom-inside' !default;

// $first-numbering-position: null !default;
// $first-numbering-position: 'top-center' !default;
$first-numbering-position: 'bottom-center' !default;
// TODO: Handle other positions based on recto-verso

// Next, running content position options (choose one!)

//$running-content-position: 'top-outside-corner' !default;
$running-content-position: 'top-outside' !default;
// $running-content-position: 'top-center' !default;
//$running-content-position: 'top-inside' !default;
//$running-content-position: 'outside-top' !default;
//$running-content-position: 'outside-middle' !default;
//$running-content-position: 'outside-bottom' !default;
//$running-content-position: 'bottom-outside-corner' !default;
//$running-content-position: 'bottom-outisde' !default;
//$running-content-position: 'bottom-center' !default;
//$running-content-position: 'bottom-inside' !default;

// Finally, for the running separator, it either exists or it doesn't,
//so choose between two options (null, or defined content):

$left-running-separator: '\A0\A0\2022\A0\A0' !default;
$right-running-separator: '\A0\A0\2022\A0\A0' !default;
//$left-running-separator: '' !default;
//$right-running-separator: '' !default;

//// Page Numbers
//$front-matter-page-number-font-family: $font-2 !default;
//$front-matter-page-number-font-size: .8em !default;
//$front-matter-page-number-font-style: normal !default;
//$front-matter-page-number-font-weight: normal !default;
//$front-matter-page-number-text-transform: none !default;
//$page-number-font-family: $font-2 !default;
$page-number-font-size: .7em !default;
//$page-number-font-style: normal !default;
//$page-number-font-weight: normal !default;
//$page-number-text-transform: none !default;
//// Running Heads
//$runninghead-padding-top: .4in !default;
//$runninghead-left-font-family: $font-3 !default;
//$runninghead-left-font-size: .7em !default;
//$runninghead-left-font-style: normal !default;
//$runninghead-left-font-weight: normal !default;
//$runninghead-left-text-transform: uppercase !default;
//$runninghead-left-letter-spacing: 1px !default;
//$runninghead-left-word-spacing: 2px !default;
//$runninghead-right-font-family: $font-3 !default;
//$runninghead-right-font-size: .7em !default;
//$runninghead-right-font-style: normal !default;
//$runninghead-right-font-weight: normal !default;
//$runninghead-right-text-transform: uppercase !default;
//$runninghead-right-letter-spacing: 1px !default;
//$runninghead-right-word-spacing: 2px !default;
//// Running Feet
//$runningfoot-separator: '\A0\A0|\A0\A0' !default;
//$runningfoot-padding-bottom: .4in !default;
//$runningfoot-left-font-family: $font-2 !default;
//$runningfoot-left-font-size: .7em !default;
//$runningfoot-left-font-style: normal !default;
//$runningfoot-left-font-weight: normal !default;
//$runningfoot-left-text-transform: uppercase !default;
//$runningfoot-left-letter-spacing: normal !default;
//$runningfoot-left-word-spacing: normal !default;
//$runningfoot-right-font-family: $font-2 !default;
//$runningfoot-right-font-size: .7em !default;
//$runningfoot-right-font-style: normal !default;
//$runningfoot-right-font-weight: normal !default;
//$runningfoot-right-text-transform: uppercase !default;
//$runningfoot-right-letter-spacing: normal !default;
//$runningfoot-right-word-spacing: normal !default;
//// Running Head & Foot Content
//// Strings options are:
//// - book-title
//// - book-subtitle
//// - book-author
//// - book-publisher
//// - book-publisher-city
//// - part-number
//// - part-title
//// - chapter-number
//// - section-title (this corresponds to front matter/chapter/back matter title
//// OR short-chapter-title if present)
//// - chapter-author
//// - chapter-subtitle
//$front-matter-running-content-left: string(book-title) !default;
//$front-matter-running-content-right: string(section-title) !default;
//$introduction-running-content-left: string(book-title) !default;
//$introduction-running-content-right: string(section-title) !default;
//$part-running-content-left: string(book-title) !default;
//$part-running-content-right: string(part-title) !default;
//$chapter-running-content-left: string(book-title) !default;
//$chapter-running-content-right: string(section-title) !default;
//$back-matter-running-content-left: string(book-title) !default;
//$back-matter-running-content-right: string(section-title) !default;
//// Crop Marks (none | crop | cross)
//$page-cropmarks: none !default;
//// Page Size (in | cm)
//$page-width: 5.5in !default;
//$page-height: 8.5in !default;
//// Page Margins (in | cm | % | px | &c)
//$page-margin-left-top: 2cm !default;
//$page-margin-left-right: 2cm !default;
//$page-margin-left-bottom: 2cm !default;
//$page-margin-left-left: 2cm !default;
//$page-margin-right-top: 2cm !default;
//$page-margin-right-right: 2cm !default;
//$page-margin-right-bottom: 2cm !default;
//$page-margin-right-left: 2cm !default;
//// Recto-Verso Openings (right | auto)
//$recto-verso-standard-opening: right !default;
//$recto-verso-first-section-opening: right !default;
//$recto-verso-section-opening: auto !default;
//// Index
//$index-align: left !default;

// Override variables above this line, using the !default flag to allow further overrides.
@import 'variables/structure';

// Add custom SCSS below these imports and includes.
@import 'components/structure/general';
@import 'components/structure/recto-verso';
@import 'components/structure/running-content';
@import 'components/structure/numbering';
@import 'components/structure/content-strings';

Two more questions, @brianesham — can you see if the @import 'components/structure/index' line is present in /wp-content/uploads/sites/<ID>/css/editor.css? If it isn’t, I suspect that the issue is browser caching and that we need to forcibly clear the cache of the editor stylesheet when it is regenerated.

Made a GitHub issue: https://github.com/pressbooks/pressbooks/issues/813