• I’ve recently started to build a site in WP 3.0+ at work, and one of the first hurdles I needed to get over was to be able to build custom widgets that did a bunch of stuff. Luckily building a custom widget is a breeze with the new Widget API; however I have a little odd problem with the widgets I’ve built so far: For some reason WordPress seem to think that they need to be upgraded and list them under available updates. Wp wants to update them all to the same version (1.2.1.20070210b) and looking at the version description it says that the author is Automattic Inc. which I believe is the firm who made the widget plugin before it got integrated into WP itself. So for some reason, when I create a widget like the example in the widget API section I get some sort of reference to the Automattic plugin which prompts me to update my plugin/widget (which’ll break my custom code for all i know).

    Anyone seen this before and know how to solve it? It feels like I’ve made an idiot mistake somewhere but it feels like I’ve checked everywhere.

    Oh and since I couldn’t find any info regarding best practices when it comes to placing my widget code anywhere, I created a plugins/widgets-folder where I put all my widget-code (one file per widget/class). If this is outrageous, and there’s a much smarter way, please let me know. I just thought widgets should live outside the theme folder since they’re not necessarily bundled with one theme in particular.

    All help and hints are appreciated!

    /E

Viewing 5 replies - 1 through 5 (of 5 total)
  • Have you tried setting your plugin version number to something very high such as 9999?

    Thread Starter Converge

    (@converge)

    Have you tried setting your plugin version number to something very high such as 9999?

    Setting them to version 3.0 does remove the update-prompt by the system, and will certainly work for me for now. I guess it’ll do for now, and then I’ll just dig in some more and see if I can find some sort of solution to the disease, rather than treat the symptoms. Thanks for the tip!

    If you built your “custom widget” by copying another and re-working its functionality then the issue is within the header section of the widget primary code file.

    Changing the version number to something excessively high is one method. Giving the “new” widget a unique name will also accomplish this … and is perhaps a more future-proof solution to the issues you are seeing.

    You could “copy&paste” the widget code to https://pastebin.com/ for more help with this …

    Thread Starter Converge

    (@converge)

    Well, actually I wrote most of the code from scratch (though I did peek more than a few times on the example-code on the Widget API-page) and the widget names were quite unique (named after the content they were processing, like “latest-bread”, “baktankar” etc. It’s a site for a bakery ?? ). And the header-info is very much my own.

    But if I have to guess I’d say there’s some sort of idiot mistake on my behalf that triggers these error. I’ll prowl through the code once more and see what I can find, but the apparent problem is solved for the time being at least.

    Thanks again!

    No worries … it was just a suggestion to share the code itself. A fresh set of eyes may have the issue just pop off the screen.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘My custom widget think it needs to be updated to version 1.2.1.20070210b’ is closed to new replies.