Giter Site home page Giter Site logo

Comments (10)

YahnisElsts avatar YahnisElsts commented on May 22, 2024

I can't seem to reproduce that on my site. Are you sure it's not a configuration issue of some kind? Here are a few things to check:

  • If you explicitly specify the plugin slug when initialising the update checker, does the slug match the plugin directory name?
  • Is the plugin file name that's passed to the update checker the correct file?
  • Is the plugin installed in mu-plugins? WordPress doesn't support updates for mu-plugins, but it will still show the red 1 bubble when an update is available.

from plugin-update-checker.

YahnisElsts avatar YahnisElsts commented on May 22, 2024

Any news on this?

from plugin-update-checker.

Blindmikey avatar Blindmikey commented on May 22, 2024

I should have time to look further into this next week.

from plugin-update-checker.

YahnisElsts avatar YahnisElsts commented on May 22, 2024

Did you get a chance to look into the update count issue?

from plugin-update-checker.

hallshouse avatar hallshouse commented on May 22, 2024

I'm having this issue as well, but also my sample plugin continues to show an update is available.
In my example, my plugin is version 1.0.1 and it says a version 1.0.1 update is available.

I'm not using a readme.txt file in the plugin folder, instead I'm only using the plugin-slug.json meta-data.

The sample plugin updates correctly and the plugin updated message displays, but when I refresh the browser, I get that an update is available from this version to this same version.

Any idea what the cause of this could be?

from plugin-update-checker.

YahnisElsts avatar YahnisElsts commented on May 22, 2024

The sample plugin updates correctly and the plugin updated message displays, but when I refresh the browser, I get that an update is available from this version to this same version.

That's normal for the example plugin. The 2.0 "update" that it downloads is actually just another copy of version 1.1, so it will keep saying that an update is available. It's deliberately set up that way to make it easier to test update notifications.

I'm not using a readme.txt file in the plugin folder, instead I'm only using the plugin-slug.json meta-data.

That should be fine. The readme.txt will be completely ignored when you're using a JSON file.

In my example, my plugin is version 1.0.1 and it says a version 1.0.1 update is available.

Install Debug Bar and look at the "PUC (your-plugin-slug)" panel in the "Debug" menu. Does everything look right in the "Configuration" and "Status" sections? What's the content of the "Checked version" and "Cached update" fields?

from plugin-update-checker.

hallshouse avatar hallshouse commented on May 22, 2024

Thanks for getting back @YahnisElsts
I have attached a file showing the Debug Bar results.
It all looks fine to me.
update_server_debug_results

from plugin-update-checker.

YahnisElsts avatar YahnisElsts commented on May 22, 2024

I think I see the problem: the version number in the plugin header is "v1.0.2", but the version number in the JSON document is "1.0.2" (no "v" prefix). These numbers are not equal. Internally, the update checker uses the version_compare function to compare version numbers, and I suspect that this function will treat a version number that doesn't start with a digit as invalid.

Solution: remove the "v" prefix from the Version: v1.0.2 header.

from plugin-update-checker.

hallshouse avatar hallshouse commented on May 22, 2024

Yup, that was it. Thanks very much @YahnisElsts

from plugin-update-checker.

YahnisElsts avatar YahnisElsts commented on May 22, 2024

All right, that's good to hear.

Since the original reporter hasn't responded in 5+ months, I'll go ahead and assume they've got it fixed as well, and close the issue.

from plugin-update-checker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.