Plugins Can't Find JS and CSS w/ ?ver= Appended

Hopefully this is a simple mistake like the last one I posted on.

Synopsis: I acquired a project that has Roots 7.0.3 installed and am updating to Sage 8.5.

While doing so, several plugins have started failing to find their style sheets and scripts.

As an example, I’m getting a 404 for:
But I can verify that the file is there (obviously it doesn’t have the version appended in the filename, but it’s there)

In adding it to the manifest.json, I’ve tried concatenating it in with the main.js (which doesn’t seem to have an effect) and pulling it in as it’s own file (which gets it into the dist/scripts folder but obviously doesn’t enqueue it or remove the old enqueue which is 404ing)

My thought is that the crux lies possibly in the assets.php file or somewhere in the lib folder in general, but honestly I’m not sure what I’m looking for. Any thoughts?

I’ve made it one step further. The issue is that as with the example above:


It’s 404-ing because it should be prepended with wp-content, so the following would actually work:


However I’m not sure how to get that prefixed to all calls to plugin assets globally.

Haha, ah man, well, figured it out although I have no idea why it was setup this way. In wp-includes/link-template.php, I changed this on line 3207

function plugins_url( $path = '', $plugin = '' ) {

to this

function plugins_url( $path = 'wp-content/', $plugin = '' ) {

and we’re all good. Seems really strange that that wasn’t already setup correctly and that it was somehow working before the update, but w/e. Next up is getting the main carousel to start working again. I know no one responded, but thanks to anyone who nonetheless dedicated any brain power to thinking this through.

I don’t recommend changing WordPress core files; you’ll have to remember this edit and perform it again each time WordPress is updated. Perhaps there’s a filter that can be applied here rather than editing WP core?

Yeah, a little more digging after I wrote that brought me to the same conclusion so I moved to asking about it on I haven’t been able to find a filter that would do the job as of yet.

plugins_url gives me a reference to it, and near the bottom it makes reference to using apply_filters() but I’m not sure how to implement it.

Maybe it’s related to ?

Could be, finally figured out I could just add
RewriteRule ^plugins/(.*) /wp-content/plugins/$1 [QSA,L]
to .htaccess and it fixed the problem. I did use composer for installing Sage 8.5.0, but for the moment since I’ve got a (at least more than before) legitimate fix, I’ll have to come back to it later when I have more time.