Problem with eventsmanagerpro activation

I did send an email to Marcus where I did copy the part that James wrote above into it. And also I invited him to have a look at this thread to get all infos.
Let’s see what his respons will be.
I’ll keep you informed.

6 Likes

Hi Everyone! First post in the CP community :wink:

Thanks for looking into this. I’ll check with @baterista about this because we do actually supply the site URL and use it if the User-Agent header isn’t there…

4 Likes

Also, just noticed the thread by @ozfiddler regarding being an officla ‘CP-Compatible’ plugin. That’d be interesting to consider for sure. Happy to post in a new thread, but just needed to know two basic questions:

  1. What’s the minimum WP version you require for this to work on? Generally, we don’t use the latest stuff they add (because we don’t need it) but things like Gutenberg is something we’re working on but can work alongside the classic editor too.

  2. Is there a seperate CP repo to work with here?

Any of the CP devs/heads are welcome to get in touch.

Cheers,
Marcus

4 Likes

Hi Marcus and welcome to ClassicPress :slight_smile:

As mentioned above, I took quite a long look at @baterista’s site and only managed to get it working by adding the User-Agent header. This would obviously suggest that the site URL wasn’t get through for some reason.

I wonder if the easiest thing would be for you to set up your own ClassicPress dev site, as you understand what should and should not be happening at both ends? You can download CP from here and install it in the same way as WordPress.

Alternatively, would it be possible for you to provide us with a trial license of EMP so we can do our own, more in-depth testing?

Thanks

2 Likes

Hi Tim,

Yes, that did strike me as odd that both methods failed. Is there a User-Agent getting sent at all with ClassicPress?

Elmar has mentioned he has a demo going with the issue, so that might be the fastest way to check it out, otherwise, I’m also happy to take a look myself when time permits and also see CP in action whilst I’m at it.

I am, however, happy to provide you with a trial license regardless if you’d like one, let me know if need be.

2 Likes

With the following code added to a MU plugin or functions.php:

'WordPress/' . get_bloginfo( 'version' ) . '; ' . get_bloginfo( 'url' );

ClassicPress should be sending something like:

WordPress/4.9.12; https://www.example.com

and this certainly worked for Elmar’s site.

It’d be good if you could test it as you’ll be able to see what headers and/or POST data are being received but if you could let me have a trial license, then I’m happy to continue playing from this end. Let me know if you need a specific domain for the license.

1 Like

Yes, but I think we don’t need a custom snippet to make it work. We also send the site url in our POST call to the site, so it should fall back on that with no header (or a non-matching header).

The header is used first because in earlier versions we didn’t send via post, but I’m pretty sure Elmar is on a latest version. I just need to figure out what post info is being sent when on CP, maybe something’s wrong with the URL passed on, maybe it’s even a bug on our side:

$args = array(
	'action' => $action,
	'v' => static::$current_versions,
	'key' => static::get_license()->key,
	'site' => get_home_url(),
	'ms' => is_multisite(),
);
...
$request = wp_remote_post( $url, array( 'body' => $args ) );

Can you email me so I can set you up with a trial account? You can register a site via the plugin.

2 Likes

Thats right! All plugins are up2date.

2 Likes

I’ll DM you.

1 Like

Just confirming, yes there is. Here is an example value:

WordPress/4.9.12; https://www.classicpress.net/?wp_compatible=true&ver=1.1.1

That’s why it isn’t working, in ClassicPress there is a User-Agent header, but it’s always pointing to www.classicpress.net. So I think you’ll want to use the site URL that you supply instead. Or, if you want an option that is less of a change from what you’re already doing, you could use some logic like the following:

  • if User-Agent header is present and contains a www.classicpress.net URL, do not use it.
  • if User-Agent header is present and contains a URL that is not www.classicpress.net you can use it.
  • otherwise, use the URL you supplied.

Regarding being an “official CP-compatible plugin”:

ClassicPress is based on WP 4.9 so that would be the only version requirement. If your plugin works on the WP 4.9 releases then it should work on ClassicPress also, except for very rare exceptions like the User-Agent thing we discovered here.

I assume you mean a plugin repo. We’re launching a plugin directory with our in-development v2 release (not a repo, because plugins will be hosted by the authors on GitHub).

For now we would just be adding you to the list at Plugins Confirmed Working on ClassicPress v1 but it sounds like you will be well-positioned for our v2 release and beyond.

If you have any other questions we’ll be here…

3 Likes

There’s not really an “official” list, but we do maintain a wiki here: "Must Have" Plugins List

This has the current best options for the most-needed broad plugin types (including those developers who have made a firm commitment). I have added yours with a blue tick, but will change it to a green tick when we get this issue resolved. It would be great to get fully-featured events manager on board. Thanks for your interest.

3 Likes

@james, awesome, thanks for the reply!

@ozfiddler I’ll email you the details.

2 Likes

Hi Everyone, happy to announce that the issue should now be resolved!

Events Manager + Pro + ClassicPress seems to be working fine now. I’ve edited the wiki list accordingly.

4 Likes