New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Notice: The theme metadata is missing the required "details_url" key (when checking for plugin updates) #82
Comments
That sounds like a bug. Could you tell me more about your setup? Specifically, what is the full path to the file where the update checker is initialized, what do the If you don't want to post that information on a public site, you can contact me via email: whiteshadow@w-shadow.com |
…n or a theme. In theory, that should never happen, but the bug reported in #82 shows that it does.
That's no problem at all. In fact, the data you see above is just slightly "shrunk", but it's almost correct.
Folder If it may help, the PUC 3.2 works fine with this setup. |
Technically, it's possible to place a plugin anywhere outside the WordPress directory and then create a symlink inside /wp-content/plugins that points to the plugin directory. If the plugin developer then passes the real, symlink-resolved path to the PUC factory, PUC will assume it can't be a plugin because it's not inside the expected directory. Semi-fixed by checking if the input file contains a valid plugin header. However, I would still recommend against using symlinks in this manner because it's likely to cause odd bugs elsewhere. For example, __FILE__ resolves symlinks but plugin_basename() doesn't. This means that the basename that WP sees and the basename you generate in your own code might not match.
Ah, I see. I've patched the factory class to look for valid plugin headers in addition to checking if the file is inside Personally, I think using symlinks in that way is a recipe for trouble, but I guess it can be convenient. |
Could you please confirm if the patch worked so that the issue can be closed? |
I didn't have the time to test it yet. I will let you know if it's all good as soon as I have the chance to give it a go. Thanks. |
I am also seeing this issue when I try to have both a theme that uses the Update Checker as well as a Plugin that uses the update checker, it references the wrong location (using the other file path). Does this library allow for multiple separate plugins/themes to utilize the checker without interference? |
Yes, you can have multiple plugins and/or themes using this library at the same time. You just need to make sure that they're all configured correctly. That means each plugin and theme needs a unique metadata URL and the path to the main plugin/theme file must be correct. |
I believe that has been done correctly, I even went so far as to remove the declaration for FILE and replace with a direct path based on get_template_directory() and MY_PLUGIN_DIR, but the Theme still references the directory of the Plugin for Update Checker dependencies (it's using the library there instead of the one in the theme). It seems to parse the plugin directory regardless of it being a theme. Am I supposed to use the older Theme Library for Themes instead of this library? |
Could you perhaps post the update checker initialisation code? If you don't want to make it public, you can email me at
That's normal and shouldn't cause any problems by itself. As you know, it's not possible to have two classes or functions with the exact same name. So if you have multiple identical copies of the library, only one of them will be loaded.
That's not recommended. The older library is no longer being maintained. I'm not sure if it's fully compatible with the latest version of WordPress. |
Oh good golly. It seems I had my JSON file updated in the incorrect location (the WP environment json was updated, but not theme json at the API that it was receiving the package from). I apologize sir, and I appreciate your quick and thorough responses. |
All right, no problem. It looks like the person who originally opened this issue has either resolved or abandoned it, so I'm just going to close it now. |
I had the PUC client running fine, with version 3.x, with this simple code:
I updated the PUC to version 4, and changed the code as follows:
Now the updates don't work anymore, and I get the following notice (with backtrace):
The trace shows that the
Puc_v4_Theme_UpdateChecker
gets loaded, but the updates are for a plugin, not a theme. I guess that's the reason why update notifications don't work anymore. How should I fix that?The text was updated successfully, but these errors were encountered: