pressbooks / pressbooks-book

McLuhan is the default book theme for Pressbooks.
https://pressbooks.org
GNU General Public License v3.0
20 stars 16 forks source link

With the new "Display CTA" setting in the network settings, the webbook shows a javascript error in the Firefox console if "Display CTA =0". #1125

Closed thomasdumm closed 1 year ago

thomasdumm commented 1 year ago

With the new CTA setting in the network settings, the webbook shows a javascript error in the Firefox console if "Display CTA =0". No Javascript error is shown if "Display CTA = 1"

jQuery.Deferred exception: ctaCloseButton is null init@webpack-internal:///./assets/src/scripts/routes/common.js:222:5 fire@webpack-internal:///./assets/src/scripts/util/Router.js:50:34 loadEvents@webpack-internal:///./assets/src/scripts/util/Router.js:69:12 @webpack-internal:///./assets/src/scripts/book.js:24:17 e@https://pressbooks.delivros.ch/13172bu501/wp-includes/js/jquery/jquery.min.js?ver=3.6.0:2:30038 Deferred/then/l/</t<@https://pressbooks.delivros.ch/13172bu501/wp-includes/js/jquery/jquery.min.js?ver=3.6.0:2:30340 setTimeout handlerDeferred/then/l/<@https://pressbooks.delivros.ch/13172bu501/wp-includes/js/jquery/jquery.min.js?ver=3.6.0:2:30549 c@https://pressbooks.delivros.ch/13172bu501/wp-includes/js/jquery/jquery.min.js?ver=3.6.0:2:28327 fireWith@https://pressbooks.delivros.ch/13172bu501/wp-includes/js/jquery/jquery.min.js?ver=3.6.0:2:29072 fire@https://pressbooks.delivros.ch/13172bu501/wp-includes/js/jquery/jquery.min.js?ver=3.6.0:2:29108 c@https://pressbooks.delivros.ch/13172bu501/wp-includes/js/jquery/jquery.min.js?ver=3.6.0:2:28327 fireWith@https://pressbooks.delivros.ch/13172bu501/wp-includes/js/jquery/jquery.min.js?ver=3.6.0:2:29072 ready@https://pressbooks.delivros.ch/13172bu501/wp-includes/js/jquery/jquery.min.js?ver=3.6.0:2:32045 B@https://pressbooks.delivros.ch/13172bu501/wp-includes/js/jquery/jquery.min.js?ver=3.6.0:2:31824 EventListener.handleEvent@https://pressbooks.delivros.ch/13172bu501/wp-includes/js/jquery/jquery.min.js?ver=3.6.0:2:32193 @https://pressbooks.delivros.ch/13172bu501/wp-includes/js/jquery/jquery.min.js?ver=3.6.0:2:220 @https://pressbooks.delivros.ch/13172bu501/wp-includes/js/jquery/jquery.min.js?ver=3.6.0:2:225 undefined jquery.min.js:2:31593

System Info:

System Information

Root Blog Info

Root Blog ID: 1 Root Blog URL: https://pressbooks.delivros.ch/

Browser

Platform: Windows Browser Name: Firefox Browser Version: 105.0 User Agent String: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0

WordPress Configuration

Network URL: https://pressbooks.delivros.ch/ Network Type: Subdirectory Version: 6.0.2 Language: en_US WP_ENV: development WP_DEBUG: Enabled Memory Limit: 64M

Pressbooks Configuration

Version: 6.1.0 Root Theme: Aldine Root Theme Version: 1.16.0

Pressbooks Dependencies

Epubcheck: Installed xmllint: Installed PrinceXML: Installed Saxon-HE: Installed

Must-Use Plugins

hm-autoloader.php: n/a

Network Active Plugins

Advanced WPLink: 1.1.0 Broken Link Checker: 1.11.18 ceLTIc LTI Library: 4.8.0 Enable Media Replace: 4.0.0 Hypothesis: 0.6.0 Login IP & Country Restriction: 6.3.0 LTI Tool: 3.1.0 Pressbooks: 6.1.0 Pressbooks LTI Tool: 1.0.2 Pressbooks Stats: 1.6.5 Two Factor: 0.7.2 When Last Login: 1.2.1 WP Mail SMTP Pro: 3.5.2 WPO365 | SAMESITE: 1.3 WP QuickLaTeX: 3.8.6

Root Blog Active Plugins

Advanced WPLink: 1.1.0 Broken Link Checker: 1.11.18 ceLTIc LTI Library: 4.8.0 Enable Media Replace: 4.0.0 Hypothesis: 0.6.0 Login IP & Country Restriction: 6.3.0 LTI Tool: 3.1.0 Pressbooks: 6.1.0 Pressbooks LTI Tool: 1.0.2 Pressbooks Stats: 1.6.5 Two Factor: 0.7.2 When Last Login: 1.2.1 WP Mail SMTP Pro: 3.5.2 WPO365 | SAMESITE: 1.3 WP QuickLaTeX: 3.8.6

Inactive Plugins

H5P: 1.15.4 Pressbooks Table Classes: 1.0.0 Simple History: 3.3.0 TaxoPress Pro: 3.6.4

Server Configuration

PHP Version: 7.4.30 MySQL Version: 5.7.38 Webserver Info: Apache/2.4.41 (Ubuntu)

PHP Configuration

Memory Limit: 256M Upload Max Size: 750M Post Max Size: 750M Upload Max Filesize: 750M Time Limit: 259200 Max Input Vars: 1000 URL-aware fopen: On (1) Display Errors: On (1)

PHP Extensions

OPcache: Zend XDebug: Disabled cURL: Supported cURL Version: 7.68.0 imagick: Not Installed xsl: Installed

SteelWagstaff commented 1 year ago

We need to add a check in https://github.com/pressbooks/pressbooks-book/blob/a2f43dc1c50cc4ff028e50551bdbad33d6322c92/assets/src/scripts/routes/common.js#L247

thomasdumm commented 1 year ago

I still see the error message after updating to:

System Information

Root Blog Info

Root Blog ID: 1 Root Blog URL: https://pressbooks.delivros.ch/

Browser

Platform: Windows Browser Name: Firefox Browser Version: 106.0 User Agent String: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:106.0) Gecko/20100101 Firefox/106.0

WordPress Configuration

Network URL: https://pressbooks.delivros.ch/ Network Type: Subdirectory Version: 6.0.3 Language: en_US WP_ENV: development WP_DEBUG: Enabled Memory Limit: 64M

Pressbooks Configuration

Version: 6.3.0 Root Theme: Aldine Root Theme Version: 1.17.0

Pressbooks Dependencies

Epubcheck: Installed xmllint: Installed PrinceXML: Installed Saxon-HE: Installed

Must-Use Plugins

hm-autoloader.php: n/a

Network Active Plugins

Advanced WPLink: 1.1.0 Broken Link Checker: 1.11.19 ceLTIc LTI Library: 4.9.0 Enable Media Replace: 4.0.0 Flite Addon for WP: 1.0 Hypothesis: 0.6.0 Login IP & Country Restriction: 6.3.0 LTI Tool: 3.1.0 Pressbooks: 6.3.0 Pressbooks LTI Tool: 1.0.2 Pressbooks Stats: 1.6.5 Two Factor: 0.7.3 When Last Login: 1.2.1 WP Mail SMTP Pro: 3.6.1 WPO365 | SAMESITE: 1.3 WP QuickLaTeX: 3.8.6

Root Blog Active Plugins

Advanced WPLink: 1.1.0 Broken Link Checker: 1.11.19 ceLTIc LTI Library: 4.9.0 Enable Media Replace: 4.0.0 Flite Addon for WP: 1.0 Hypothesis: 0.6.0 Login IP & Country Restriction: 6.3.0 LTI Tool: 3.1.0 Pressbooks: 6.3.0 Pressbooks LTI Tool: 1.0.2 Pressbooks Stats: 1.6.5 Two Factor: 0.7.3 When Last Login: 1.2.1 WP Mail SMTP Pro: 3.6.1 WPO365 | SAMESITE: 1.3 WP QuickLaTeX: 3.8.6

Inactive Plugins

Co-Authors Plus: 3.5.3 H5P: 1.15.4 Import and export users and customers: 1.21.1 Pressbooks Table Classes: 1.0.0 Simple History: 3.3.1 TaxoPress Pro: 3.6.4

Server Configuration

PHP Version: 7.4.30 MySQL Version: 5.7.38 Webserver Info: Apache/2.4.41 (Ubuntu)

PHP Configuration

Memory Limit: 256M Upload Max Size: 750M Post Max Size: 750M Upload Max Filesize: 750M Time Limit: 259200 Max Input Vars: 1000 URL-aware fopen: On (1) Display Errors: On (1)

PHP Extensions

OPcache: Zend XDebug: Disabled cURL: Supported cURL Version: 7.68.0 imagick: Not Installed xsl: Installed