Error 500 for pressbooks/assets/src/scripts/dashboards.js

I am using latest WordPress and Pressbooks version and I am seeing the below error message when loading the networkpage:

Error 500: …/wp-content/plugins/pressbooks/assets/src/scripts/dashboards.js

If I check the folders on the server, there is no folder pressbooks/assets/src/scripts only pressbooks/assets/dist/scripts/ with no dashborad.js. I was not able to find out which file is calling src/scripts/dashboards.js.

I installed the Pressbooks Plugin and the themes from the github ZIP files.

We are experiencing exactly the same issue along with very high CPU usage during dashboard loading. Dashboards are loading without required js.

Hi. A further report. I managed to solve our issues (no js on dashboard pages) by downgrading php8.2 to php8.1 (and reading more carefully). Usually dependencies are minimums, but in the case of Pressbooks, the PHP dependency is an exact version.

With respect to dashboard.js, during trouble-shooting at one point I created the pressbooks/assets/src/scripts path, downloaded the dashboards.js file from the pressbooks github and put it in the path. Once I had my dashboard pages loading with correct JS I tested with and without the dashboard.js file on the src folder path. No discernible difference except the the 404 error in browsers tools.

Cheers all

thanks @twelch@t.dumm can you share your diagnostics page? Are you also running PHP 8.2? The institutions.js file was added to Pressbooks in 6.13.0 help with a new ‘dashboard checklist’ we added for new networks, so we’re a little puzzled why this error is occurring for you now rather than, say, 6 months ago?

I did the same as @twelch: I created a folders and placed the missing dshborad.js file there. Afterwards the error was gone. I suspect that the distribution should also inlcude the src/scripts folder or a different dashboard.j should be referenced.

System Information

Book Info

Book ID: 57
Book URL: test 1 – Bücher erstellen leicht gemacht
Book Privacy: Public

Browser

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

WordPress Configuration

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

Pressbooks Configuration

Version: 6.17.1
Book Theme: McLuhan
Book Theme Version: 2.26.1
Root Theme: Aldine
Root Theme Version: 1.19.1

Pressbooks Dependencies

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

Must-Use Plugins

hm-autoloader.php: n/a

Network Active Plugins

ceLTIc LTI Library: 5.0.2
Disable “BIG image” Threshold: 1.0
Enable Media Replace: 4.1.5
H5P: 1.15.7
Hypothesis: 0.7.3
Koko Analytics: 1.3.7
LTI Tool: 3.2.3
Pressbooks: 6.17.1
Pressbooks LTI Tool: 1.1.1
Pressbooks Network Catalog: 1.3.3
Pressbooks Stats: 1.8.0
Two Factor: 0.8.2
WP Mail SMTP Pro: 3.11.1
WPO365 | SAMESITE: 1.3
WP QuickLaTeX: 3.8.6

Book Active Plugins

ceLTIc LTI Library: 5.0.2
Disable “BIG image” Threshold: 1.0
Easy Table of Contents: 2.0.62
Easy Table of Contents PRO: 1.0.21
Enable Media Replace: 4.1.5
H5P: 1.15.7
Hypothesis: 0.7.3
Koko Analytics: 1.3.7
LTI Tool: 3.2.3
Pressbooks: 6.17.1
Pressbooks LTI Tool: 1.1.1
Pressbooks Network Catalog: 1.3.3
Pressbooks Stats: 1.8.0
Two Factor: 0.8.2
WP Mail SMTP Pro: 3.11.1
WPO365 | SAMESITE: 1.3
WP QuickLaTeX: 3.8.6

Inactive Plugins

Secure Copy Content Protection: 21.4.5

Server Configuration

PHP Version: 8.1.27
MySQL Version: 8.0.36
Webserver Info: Apache/2.4.58 (Ubuntu)

PHP Configuration

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

PHP Extensions

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

Thanks – looking into it further. It looks like the original commit didn’t add the file to the webpack build configuration, so the file isn’t being included in the /dist folder as expected. We will try to fix this for our next release.

Update: we just merged a PR that should address this in our next release: fix: add dashboards.js to build list by SteelWagstaff · Pull Request #3608 · pressbooks/pressbooks · GitHub. Thanks for reporting the bug/issue!

thank you for the change/fix!

1 Like