Update Manager 1.0.0 RC2

The Update Manager plugin allows you to painlessly push updates to your ClassicPress plugin users! Serve updates from GitHub, your own site, or somewhere in the cloud. 100% integrated with the ClassicPress update process; super-slim and performant. Incredibly easy! Learn more :arrow_upper_right:

Update Manager 1.0.0 RC2

A few minor issues were reported with RC1, all of which have been addressed. I’ve also added functionality to assist with GDPR, added new filters, and added housekeeping code. There were also a few design improvements, text changes, and the online documentation has been thoroughly updated. I feel confident that this release will end up being the stable release, probably made official in early-to-mid-January. See the changelog.

!! IMPORTANT UPGRADE NOTICE !!

The UpdateClient.class.php file (also known as the Update Client file) has been substantially changed. If you used RC1 for updating a production plugin, the next time you push an update for that plugin, be sure to include the updated file in the package. Don’t forget to edit the 2 lines inside! If your Update Manager items seem to be missing, just deactivate and reactivate the Update Manager plugin and they will be resynced; this is a one-time thing.

Download

Download Update Manager 1.0.0 RC2 for manual installation or check your dashboard for updates.

Give it a quick review?

If the Update Manager plugin saves you time, energy, frustration, whatever… if it’s useful to you, your business, or your workflow, please consider dropping a quick review here or via direct message. It will be posted on the Update Manager’s page and also included in the inline modal windows (as seen below). And…thanks @zulfgani for providing the first review!

image

Thank You

A big thanks to all who have been using RC1, offering advice, asking questions, reporting experiences, helping one another, and thumbs-upping the thing – especially through the busy holiday season. Looking at you @ozfiddler, @zulfgani, @wadestriebel, @james, @klein, @1stepforward, @omukiguy, @anon95694377, and @Aussie…and the rest (the forum would only let me tag 10 people in a post!) And…extra special thanks to @Simone for all of that plus going the extra mile with repeated testing and GitHub involvement. :+1:

Happy holidays!

12 Likes

Looking forward to testing this.

1 Like

John, am I right in thinking you have changed:

	// The directory where banners and icons are stored.
	$body['image_url'] = untrailingslashit(WP_PLUGIN_URL).'/'.dirname($this->config['id']).'/images';

to

	// Set path and URL to this plugin's own images directory.
	$image_path = untrailingslashit(WP_PLUGIN_DIR).'/'.$plugin.'/images';
	$image_url  = untrailingslashit(WP_PLUGIN_URL).'/'.$plugin.'/images';

It’s just that I edit this line to put images under assets folder and want to make sure this is the correct place to do it.

1 Like

The initial plugin update failed. I optimized the database and tried again and it worked. Not sure what happened there.

Added and configured the Update Client file to cp-brute-force-login-protection and ran an update check on one of my sites. The update showed as available and was installed.

Sometimes the “View Details” link was missing after the update on some sites, and sometimes it wasn’t. Deleting the old version and re-installing it before updating again seemed to help. Again, not sure why. Gremlins.

But, yes the RC2 version seems to be working for me. Just a couple of strange hiccups. Well done.

@ozfiddler Both my banner and icon images showed okay for the update.

@ozfiddler, not exactly…

The following line was removed as it was unused.

$body['image_url'] = untrailingslashit(WP_PLUGIN_URL).'/'.dirname($this->config['id']).'/images';

The following lines are present in both versions. If you want to change the images directory, these are the 2 lines where it happens, though I’d be remiss if I didn’t remind you about not editing core plugin files. :wink:

$image_path = untrailingslashit(WP_PLUGIN_DIR).'/'.$plugin.'/images';
$image_url  = untrailingslashit(WP_PLUGIN_URL).'/'.$plugin.'/images';

As a more future-proof solution, please consider opening an issue for this; I’m happy to implement a filter to accommodate.

@Aussie,

Glad to hear it went through on the subsequent try. I don’t think optimization should have any effect. Did your error log show anything?

Great!

See the !! IMPORTANT UPGRADE NOTICE !! in my original post for the solution. For any sites that are missing the “View Details” link, you’ll need to update those plugins with the new Update Client file (either by pushing an update with the new file included, or directly overwriting it via FTP).

:+1:

I wasn’t particularly worried about any of the issues I encountered. I was trying to do ten things at once (as usual) and just plodded along.

I’m not sure if it had anything to do with it, but I had not updated my readme.txt file to “tested up to 1.1.2”. Once I did that, I think the View Details was showing.

1 Like

Only 10 things at once?! What, are you on vacation?! :laughing:

Seriously, though… glad to hear RC2 was an easier experience than RC1.Thanks for the feedback!

1 Like

Looking forward to trying this with a new CP plugin I’m developing, as soon as Xmas family time is done :slight_smile:

1 Like

OK, thanks. I didn’t think this counted as core files as it goes into my plugin. So it’s not going to be affected by your update process, is it?

One other problem. I have tried updating both manually and by the update process. Both time it wipes my current endpoint records and leaves a clean slate. Do I need to re-enter these?

1 Like

When we talk about not editing core files, we are usually referring to ClassicPress core. Aside of the security implications of editing core files, another reason we don’t do it is because if we update, then all those changes are wiped out. That same principle applies to plugins and themes – when you update them, all the files are wiped out and you lose any of your core edits. In this case, yes, that file does go into your own plugin, however, if I change that file and you then have to subsequently update your plugins as a result, it’s just one extra thing to have to remember. :slight_smile: Updating the Update Manager plugin itself won’t wipe out the edits you’ve made in the remotely deployed Update Client file.

This is the result of the CPT change. If you deactivate and reactivate the Update Manager plugin, your records will be resynced. This is just a one time thing for a few edge cases.

:+1:

Trying it out now. I am still getting that issue we discussed before - says compatibility unknown.

1 Like

It seems like the only culprit could be the Tested value in your endpoint editor. It should be 4.9.13 (the current version of WP) or, if you don’t want to switch it each time WP does a point release, you can use 4.9.99. Does this do the trick?

If not, hover the item and find the “View Endpoint” link… copy that URL to me in a DM and I’ll take a look at your endpoint.

image

Tested? Is it not requires?

SC Email Log

Version: 1.0.2
Requires: 4.9.99

1 Like

Nope. You’re essentially saying that your plugin requires WP 4.9.99 (which is far greater than the actual 4.9.13.) For the Requires value, use the actual version of ClassicPress that your plugin requires…likely 1.0.0, I’m guessing. For the Tested value, use (et al) 4.9.99. Here’s a snip from my Update Manager endpoint as an example…

Version:           1.0.0-rc2
Requires PHP:      5.6
Requires:          1.0.0
Tested:            4.9.99

I will better document this.

Yep, that fixes it. I should have been using tested. I must say I was a little confused about that “requires”. It would be good to make it clearer what is required. My natural instinct is to put:
Requires: A Cold Beer

2 Likes

:boom: …and… :beers:

I agree, those fields could be named more descriptively. I used those values as they are what are used in a typical WordPress plugin’s readme.txt file. My goal was to make the editor a simple copy-and-paste for those who had already gone through the exercise of creating a readme.txt file. Thanks for pointing out the friction point. :+1:

…and thanks for filing that issue regarding image locations.

2 Likes

Thank @anon71687268, great work!
It works as a charme and with few minor tweak it is working very well with the statistic part I’m working on!
Simone.

Edit: Loved all the filters you added!

3 Likes

Great to hear… and it’s super cool that you’ve already started building an extension for it! Thanks for the extra effort!

3 Likes

@anon71687268 any plans on adding theme support in the near future?

1 Like