afragen / git-updater

This WP plugin will update GitHub, Bitbucket, GitLab, and Gitea hosted plugins and themes

Home Page:https://git-updater.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

404 for JS file - points at theme rather than plugin

praggmatica opened this issue · comments

commented

Hi! I've updated to the latest version (11.1.8), and my wp-admin console and error logs are being bogged down by the following link throwing a 404 error:

https://example.com/wp-content/themes/example/vendor/afragen/wp-dismiss-notice/js/dismiss-notice.js?ver=6.0.3

I searched for it in my files, and found that the "afragen" reference is in this plugin. Looks like it's not pointing at the right path (going for the theme folder rather than the plugins folder).

Can you fix this? Thanks!

Sure looks like that's coming from the theme and not this plugin.

Can you let me know the theme?

The code should be looking https://github.com/afragen/git-updater/blob/develop/vendor/afragen/wp-dismiss-notice/wp-dismiss-notice.php#L37-L57 to determine the correct URL.

I've not seen an issue with this in Git Updater. Is it possible the afragen/wp-dependency-installer is being used elsewhere?

Can you share a list of active plugins and theme?

Also, that code has a transient set for a week.

commented

We have a custom from scratch lightweight theme, and we do not use the afragen package anywhere else.

And yes, it does look like it's coming from the theme, but I confirmed that once I disabled the Git Updater plugin, the reference was gone. Again, it looks like there's a spot where you might be trying to call for the plugin's file directory location and maybe instead are pulling the theme's directory.

Is there any way you could let me know what the variables in the above link code produce?

commented

Can you clarify? Do you mean this link? https://example.com/wp-content/themes/example/vendor/afragen/wp-dismiss-notice/js/dismiss-notice.js?ver=6.0.3

If so, example.com is my website's primary domain, and "example" after "themes" is the active theme in use for the website at that primary domain. Everything else is the way it came up.

Specifically, what URL does this code produce.

$plugin_js_url    = plugins_url( 'js/dismiss-notice.js', __FILE__, 'wp-dismiss-notice' );

What happens when you go to the URL in your browser?

You will need to add something like var_export( $plugin_js_url, true ); after that line and look in your page source to see the result. Or you could use error_log( var_export( $plugin_js_url, true ) ); and look in your debug.log

Hi all,
I just performed a clean install (even Windows) and I'm using mamp pro for theme dev. I also just got this error while trying out this plugin. My exact error log is:

ps://24degrees/wp-content/themes/artem/vendor/afragen/wp-dismiss-notice/js/dismiss-notice.js?ver=6.2 net::ERR_ABORTED 404 (Not Found)

And I don't know if this is related but I haven't seen a "theme needs update" message yet although I already updated the style.css version form 0.1.0 to 0.1.1. But maybe the plugin works in a different way, I'm still learning.

Oh I forgot: default Wordpress installation, clean, no Multisite yet. List of plugins: Akismet Anti-Sppam, Debug This, Git Updater, Hello dolly, Instant Images and Query Monitor.
Hope this helps.

Is this still happening in Git Updater v12.2.1?

Hello afragen,

I checked and unfortunately the answer is yes: Version 12.2.1 | By Andy Fragen

But to be honest: inm my testenv in MAMP Pro, the error is gone now, I have no idea what I did or what happened. So the plugin is still active but the error is gone. I will install the plugin on my live multisite server now and let you know what happened.

commented

Hi -

I originally opened this issue back in 2022. I've tested the latest version on my website that was having a problem, and I no longer see the problem with the theme and plugins present.

Looks like the person who commented on this also is seeing it gone.

I'll close this out, my issue is resolved. Thanks.