CKEditor custom classes not showing up?

Ran into this when building a new theme from scratch on 9.3.2. The classes weren’t coming through when I intercepted CkeditorEditor.php and printed out the $pt->getThemeEditorClasses() call output. Empty array. In fact, doing just about anything (syntax errors, renaming/deletion) to my page_theme.php wasn’t causing any issues so it was pretty obvious the file wasn’t being picked up at all.

Finally found a cause in the database: SELECT * FROM PageThemes; revealed my new theme had its pThemeHasCustomClass set to 0 while on every other theme it was 1. Sure enough, an UPDATE PageThemes SET pThemeHasCustomClass = 1 WHERE pThemeHandle = 'mytheme'; fixed the issue.

Just thought I’d post as I spent a couple of hours looking and didn’t find anything on this.

2 Likes