cms icon indicating copy to clipboard operation
cms copied to clipboard

CP: Update badge on up to date site

Open marcorieser opened this issue 1 year ago • 24 comments

Bug description

Sometimes the changelog for an addon does not get updated which causes an update badge in cp even if everything is up to date. In my case it's the Translation Manager addon. But found an issue that seems like to underline my case: https://github.com/statamic/cms/issues/6718

Bildschirmfoto_2024-06-07_um_14 11 55

How to reproduce

No idea but installing the Translation Manager addon probably reproduces the issue atm.

Logs

No response

Environment

Environment
Application Name: Wizard Live
Laravel Version: 11.10.0
PHP Version: 8.3.7
Composer Version: 2.7.6
Environment: local
Debug Mode: ENABLED
URL: statamic-wizard-promotions.test
Maintenance Mode: OFF

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: log
Cache: statamic
Database: sqlite
Logs: stack / single
Mail: log
Queue: sync
Session: file

Livewire
Livewire: v3.5.0

Statamic
Addons: 5
Sites: 2 (German, English)
Stache Watcher: Enabled
Static Caching: Disabled
Version: 5.7.2 PRO

Statamic Addons
jonassiewertsen/statamic-livewire: 3.4.0
marcorieser/statamic-vitals: 1.2.0
marcorieser/tailwind-merge-statamic: 1.1.0
ryanmitchell/statamic-translation-manager: 2.0.0
stillat/relationships: 2.2.0

Installation

Fresh statamic/statamic site via CLI

Additional details

No response

marcorieser avatar Jun 07 '24 12:06 marcorieser

Just noticed that the version on statamic.com is outdated for the addon (1.6.0 instead of 2.0.0): https://statamic.com/addons/thoughtco/translation-manager

marcorieser avatar Jun 07 '24 12:06 marcorieser

According to Rob, releasing a new version of the addon fixes the issue. Probably because that re-pings (or something) the version update and Statamic can pick it up.

marcorieser avatar Jun 07 '24 12:06 marcorieser

According to Rob, releasing a new version of the addon fixes the issue. Probably because that re-pings (or something) the version update and Statamic can pick it up.

That's true. Perhaps a resave of the addon on statamic.com might also trigger something. Not sure how stuff works, but perhaps it's an issue on statamic.com and not the CMS.

robdekort avatar Jun 08 '24 09:06 robdekort

We've just deployed a fix to Statamic.com which should hopefully prevent this issue from happening in future.

For addons affected by this issue, the addon developer should be able to trigger a re-sync of the product on Statamic.com by resaving their latest release (just edit and re-save, no actual changes are required).

After that, the product's information should be up-to-date within a minute or two.

duncanmcclean avatar Jun 18 '24 16:06 duncanmcclean

Nice. And that’s good to know. I’ll keep an eye out.

robdekort avatar Jun 18 '24 16:06 robdekort

Notice I'm still seeing this in the latest version. You can see Statamic believes Forma isn't up2date.

Screenshot 2024-07-02 at 09 55 43

robdekort avatar Jul 02 '24 07:07 robdekort

Notice I'm still seeing this in the latest version. You can see Statamic believes Forma isn't up2date.

Screenshot 2024-07-02 at 09 55 43

Has the dev of Forma re-triggered the sync as Duncan mentioned above?

marcorieser avatar Jul 02 '24 07:07 marcorieser

Has the dev of Forma re-triggered the sync as Duncan mentioned above?

I don't know, I'm not @edalzell. But I think the fix doesn't work:

We've just deployed a fix to Statamic.com which should hopefully prevent this issue from happening in future.

robdekort avatar Jul 02 '24 08:07 robdekort

Ah, the latest release from Forma was before the fix. Gotcha.

@edalzell: would you trigger a save on statamic.com like this: "For addons affected by this issue, the addon developer should be able to trigger a re-sync of the product on Statamic.com by resaving their latest release (just edit and re-save, no actual changes are required)."

robdekort avatar Jul 02 '24 08:07 robdekort

@edalzell: would you trigger a save on statamic.com like this: "For addons affected by this issue, the addon developer should be able to trigger a re-sync of the product on Statamic.com by resaving their latest release (just edit and re-save, no actual changes are required)."

Done.

edalzell avatar Jul 02 '24 14:07 edalzell

Thanks Erin.

Unfortunately this issue doesn’t seem solved then.

Screenshot 1 Screenshot 2
IMG_1388 IMG_1389

robdekort avatar Jul 02 '24 15:07 robdekort

I cleared the caches btw.

robdekort avatar Jul 02 '24 15:07 robdekort

Thanks! We'll need to take another look.

duncanmcclean avatar Jul 03 '24 21:07 duncanmcclean

Screenshot 2024-07-06 at 11 38 07 It seems to be getting a bit worse even 😬

robdekort avatar Jul 06 '24 09:07 robdekort

Even weirder, I just updated Statamic Peak SEO to 8.15.3, and the badge increases again. This is not good for my badge OCD ;-). Screenshot 2024-07-06 at 15 22 01

robdekort avatar Jul 06 '24 13:07 robdekort

Just found out if you run statamic new badge-galore studio1902/statamic-peak you can reproduce a fresh straight up lying in your face update badge. It thinks the Tools and Commands addons are out of date.

robdekort avatar Jul 11 '24 12:07 robdekort

This is driving me bonkers so I did something that seem to have helped. For the two troubled addons I did the following to get rid of the badges:

  1. Tagged and released a new version
  2. Ran composer update
  3. Pulled the releases on github
  4. Trashed the tags using git push --delete origin vX.X.X
  5. Trashed the releases on packagist.org
  6. Ran composer update
Screenshot 2024-07-16 at 13 56 14

robdekort avatar Jul 16 '24 11:07 robdekort

Editing a faulty release on github.com seems to trigger something as well. Then updating the page on statamic.com fixed stuff.

robdekort avatar Jul 29 '24 13:07 robdekort

After some troubleshooting, it seems like GitHub isn't sending webhooks when releases are tagged, which is leading Statamic.com to be out-of-date, which subsequently causes the badge in the CP even when you're on the latest version.

I've submitted a support ticket with GitHub. Hopefully they'll have some ideas. 😄

duncanmcclean avatar Aug 06 '24 10:08 duncanmcclean

We've just deployed some changes to Statamic.com, which should (hopefully 🤞) prevent this issue from happening in the future.

For any addons already affected, the addon developer can trigger a sync by re-saving their product on the Marketplace. Then, within a few minutes, the product's information (including releases) should be up-to-date.

duncanmcclean avatar Aug 08 '24 16:08 duncanmcclean

Oh Duncan you wonderful man! I just tested on a few sites and it seems all good now. Might be able to tick this one off.

robdekort avatar Aug 09 '24 10:08 robdekort

Great!

I'm going to close this issue now. If anyone's still seeing the update badge when it shouldn't be showing...

  • If the addon's latest release was tagged before we deployed our fix yesterday, the addon developer will need to re-save their addon on the Marketplace in order to force Statamic.com to sync with GitHub.
  • If the addon's latest release was tagged after we deployed our fix yesterday, it probably means the issue is back 😞. In which case, please leave a comment on this issue and we can take a look.

duncanmcclean avatar Aug 09 '24 10:08 duncanmcclean

If the addon's latest release was tagged after we deployed our fix yesterday, it probably means the issue is back 😞. In which case, please leave a comment on this issue and we can take a look.

Afraid to inform ya that this issue is still a thing.

robdekort avatar Sep 12 '24 07:09 robdekort

Oh no! 😞

We'll need to take another look when we get a chance.

duncanmcclean avatar Sep 12 '24 08:09 duncanmcclean

This is still a thing. I am seeing the problem on Static Site Generator 3.0.2 which is currently the latest update, but does not match the 3.0.1 version that Statamic seems to think is current.

I wonder if Statamic could have some sort of "sanity check" on the versions before it shows the update badge so that it can recognize 3.0.2 > 3.0.1 even if statamic.com does not know 3.0.2 exists? Maybe this could trigger some sort of "caution" symbol in the updates list but not a full-on red badge in the Statamic sidebar (which seems to be what really annoys people)?

efc avatar Oct 23 '24 20:10 efc

This is still a thing. I am seeing the problem on Static Site Generator 3.0.2 which is currently the latest update, but does not match the 3.0.1 version that Statamic seems to think is current.

Yep, we haven't had time to look at this again but it's on our list. I've purged the cache for the SSG addon on statamic.com, so it should hopefully be fixed now.

I wonder if Statamic could have some sort of "sanity check" on the versions before it shows the update badge so that it can recognize 3.0.2 > 3.0.1 even if statamic.com does not know 3.0.2 exists? Maybe this could trigger some sort of "caution" symbol in the updates list but not a full-on red badge in the Statamic sidebar (which seems to be what really annoys people)?

We could certainly look at doing that.

duncanmcclean avatar Oct 24 '24 10:10 duncanmcclean