Unable to get Update Manager working with my Alerter plugin

I have trouble or don’t understand how Update Manager works.
Follow the docs:

For testing setup two CP websites:
1. https://plugins.webkust.be (where installed en configured the UM plugin and the plugin Alerter (v0.5.5).

2. https://classicpress.webkust.be were adding also the Alerter plugin (v0.5.5).

Before beginning, both websites has Alerter version 0.5.5 (with the update script)

What i did:

  • Adding the UpdateClient.class.php in plugin’s root

  • Change this lines:
    // EDIT: Make this unique. Example: YourDevName\YourPluginName;

    namespace Webkust\Alerter;

    // EDIT: URL where Update Manager is installed; with trailing slash!

    const UPDATE_SERVER = ‘https://plugins.webkust.be/’;

  • Edit alerter.php: adding this line: require_once(‘UpdateClient.class.php’);

On website 1:
Configure the plugin endpoint https://plugins.webkust.be/?update=plugin_information&plugin=alerter/alerter.php&site_url=https://plugins.webkust.be

For testing, adding the text in the readme.txt ‘Compatible with CP’ adds an upgrade notice, and also change the version in the plugin-head to 0.6.0

But nothing happens on website 2 :confused:

Can someone explain me why it doesn’t work? Or what i’m doing wrong?
Can someone explain how the push triggerd? Is this when change the Version in plugins head php-file?

3 Likes

Hi @ctuxboy,

I split your thread into its own to keep it together as a separate issue. This should get you sorted.

  1. You don’t need Alerter installed on the same site as Update Manager to update it. As long as Alerter has the client file UpdateClient.class.php included in it (in the remote installation), that is enough.

  2. I see in your endpoint, many properties are empty. Edit the Endpoint and click the links highlighted here to get your bearings: Fill out all the fields you can.
    image

  3. Bump the version in your endpoint to push an update, ie, 1.2.3 > 1.2.4 (or whatever).Semantic version numbers are required. You also will need to bump the version number to match in your plugin’s main PHP file (else it will be an endless loop telling you to update).

Give it a go and let me know how you make out.

2 Likes

Thanks for your fast reply, looking in the minimum requirements templates, so adding the Version and Required and now it works :slightly_smiling_face:

Yes, there are many properties empty in the Readme.txt, filling this in the next days.
Happy it works!!!

  1. Okay now i understand.
  2. the fully completed example is very helpful, i will using this for a next project.

Thanks a lot for push me in the right direction :slightly_smiling_face: :slightly_smiling_face:

4 Likes

Sure thing. I created Update Manager, so, there’s maybe a little extra interest for me to get right on top of support. :wink: I’m glad to hear you got it working quickly. I appreciate your using the plugin and marking the solution above, thanks!

4 Likes

One more quick note. I took another look at your endpoint and you’re still missing the Download link. That is one of the required fields, so, while the update will show in the dashboard, it will actually (though gracefully) fail.

Happy coding!

2 Likes

Okay. I trying to test it, but there is a lot of work to do on the readme file.
Adding the downloadlink is my next step :slightly_smiling_face:
I’m happy the trigger/push works!

So if i understand, it is only the readme.txt that is necessary in the update Manager for triggering the updates to the remote websites?

Yes. Well, and the remote plugin you are trying to update must also have the UpdateClient.class.php file included in it. For quick testing, the following are the only required fields to initiate an update:

=== PluginNameHere ===

Version:           1.0.0
Requires:          1.0.0
Download link:     https://site.com/link/to/the/updated/plugin.zip

== Description ==

This text displays in the modal windows; it is required. Write something!

1 Like

Aha, okay now i understand completely.
Your plugin is really good :+1:

4 Likes

I appreciate that, thanks! If you find a minute or two, please feel free to drop a comment about your experience with the plugin. :+1:

PS. I did get your previous comment… :slight_smile:

2 Likes

Oh okay,i do it with pleasure.
One problem, my English is not so good, but try to do it tommorow.

1 Like

@CodePotent sorry for the delay, as promised, post a review :wink:

5 Likes

Thanks for the great feedback and kind words, @ctuxboy! I trimmed it down just a bit and got it added. You can see it live in your dashboard at:

Dashboard > Plugins > Update Manager [View Details] > Reviews

Really appreciate your support, thanks!

PS. That’s one more closer to being able to remove my own review. :smiley:

4 Likes

It was with plesure!
Yes, is better you trimmed my review :grimacing:
I can better explain in my own language, so this was a good solution.
Read it and it’s better now :grinning:

Regards,
Christophe

3 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.