7026 pointsLike some sort of WPMU DEV God"Mindblowingly helpful memberLifetime member
Aaron
Lead Developer
—
14th October 2011 (7 months ago)
Hey guys, finally started a new thread for this. We're really close to release here, next week for sure. We've finally sorted the multidb bug that caused compatibility problems!
In RC4 we have:
Fixed recurring payment being counted IPN bug
Add filter to check coupon
Properly trigger plugin activation hook for first signup to Pro
7026 pointsLike some sort of WPMU DEV GodMindblowingly helpful memberLifetime member
Lead Developer
—
14th October 2011 (7 months ago)
#
Hey guys, finally started a new thread for this. We're really close to release here, next week for sure. We've finally sorted the multidb bug that caused compatibility problems!
In RC4 we have:
Fixed recurring payment being counted IPN bug
Add filter to check coupon
Properly trigger plugin activation hook for first signup to Pro
7026 pointsLike some sort of WPMU DEV GodMindblowingly helpful memberLifetime member
Lead Developer
—
14th October 2011 (7 months ago)
#
KFUK-KFUM, I looked closely at your code and did alot of reading on screenreaders and it both wouldn't work and would'nt help those using screenreaders from what I could tell. It's going to take a lot more rewriting so put it off for now.
If i'm off my rocker and you've actually tested full checkouts with it as well as screenreader functionality then by all means send my your latest code and i'll see what I can do.
I tested am using screen reader (Jaws 12 in case you were wondering) in addition to Chrome, some can use Safari and Chrome using the keyboard and can thusly navigate the form with the changes I provided. As it is now, well let's just call it 0% workable, with my code it works.
Edit: You can also use my code with iOS screen reader tech, without it you can not.
You are free to provide actual counterpoints if you like but if all you want to do is not use my code then say so straight away and my customer will be happy with whatever choice you make.
If you like I can provide screen recordings (from Safari, Chrome and iOS) as I am at home for the weekend. It will have to wait till tuesday for something like Jaws.
I'm afraid the Premium plugins are still not autoactivated on first signup to Pro... :-(
Actually, I haven't seen any change in the code for that. Unless I'm missing something...
Hey Aaron, take some rest, you deserve it, that's what I'm gonna do right now.
The thing is, a label element can have focus, it is also semantically a form element, so a screen reader can understand that there are #no levels x 3 alternatives among the radio buttons which are also form elements that also share the same name attribute.
I know it can be improved further with aria and tab index, but this rather quick solution is a foundation that is acceptable for actual persons that can not navigate using standard size text and/or have to do without mouse. Without it there is no way at all for them to use the form.
I used: diff -uB pro-sites.php pro-sites-updated.php > pro-sites-diff.diff to generate the diff files. Please tell me if you want them in another format and I will be happy to do so.
Eric.. if you dont have prosites installed or supporter installed right now just put it in your plugins folder like any other plugin and activate it in your network admin screen.... if you have a previous version of prosites remove them first then put the new version in
Here you go, a 1 min 15 sec movie of me navigating the Pro Sites selection screen using VoiceOver Accessibility on iOS on my iPhone 3GS.
I apologise for the lousy audio quality, also notice that it uses swedish pronunciation/articulation with the female voice (that is because I have defined the document lang as Swedish) but I hope the point comes across anyway: http://vimeo.com/30576588
1. When Limit Publishing pages & posts, the message you get is the same: "To enable wirting Posts...." even when attempting to add a Page.
2. I don't understand why Network Activated plugins are not added to the list Pro Plugins? For example, why can't I make Contact Form-7 Pro plugin?
3. How is the Manual Gateway supposed to work? It shows a Manual button that turns red when clicked, but nothing happens. Am I supposed to configure it somehow?
4. I wish the Pro levels were not numbered. I set up one level so it looks like there may be an error cause there is no #2.
Did not try coupons, but I like the idea. The Paypal Express gateway seems fine.
Larry
2. I don't understand why Network Activated plugins are not added to the list Pro Plugins? For example, why can't I make Contact Form-7 Pro plugin?
If the plugin is network activated it's available to all sites automatically, no matter what level they are.
What would you do with the plugins that are already available for all in the Pro plugin list?
If you DON'T network activate it, you can make Contact Form-7 or any other plugin a Pro plugin.
Otherwise it's simply available for all.
In the calc_upgrade function the query pulls in a period column but it looks like this was changed to term in the table.
The revised function
function calc_upgrade($blog_id, $new_amt, $new_level, $new_period) {
global $wpdb;
$old = $wpdb->get_row("SELECT expire, level, term, amount FROM {$wpdb->base_prefix}pro_sites WHERE blog_ID = '$blog_id'");
if (!$old)
return false;
//if level is not being raised not an upgrade
if ($new_level <= $old->level)
return false;
//some complicated math calculating the prorated amt left and applying it to the price of new plan
$diff = $old->expire - time();
$duration = $old->term * 30.4166 * 24 * 60 * 60; //number of seconds in the period
$left = $duration - ($duration - $diff);
if ($left <= 0 || empty($old->amount) || $old->amount <= 0)
return false;
$prorate_amt = $old->amount * ($left / $duration);
$new_duration = $new_period * 30.4166 * 24 * 60 * 60; //number of seconds in the period
$first_payment = ($prorate_amt / ($new_amt / $new_duration)) + time(); //return timestamp of first payment date
$first_payment = intval(round($first_payment));
return ($first_payment > time()) ? $first_payment : false;
}
I have to say that's a much cleaner solution that trying to take an additional payment at upgrade.
webezy, http://www.stickytrade.com/join-free/pro-upgrade/?bid=4 works, so I think pro sites need to acknowledge whether or not subdomains are installed or not. The code responsible is at about line 561 (function checkout_url…). I don't have time to check closer until later this evening.
Thanks, I'll be glad if you can check it out. The link in the admin menu bar 'Pro Upgrade' shows joesblog.stickytrade/wp-admin/admin.php?page=psts-checkout when you mouse over. When you click it goes to http://joesblog.stickytrade.com/join-free/pro-upgrade/?bid=4 - page not found
I tried adding the Pro Sites option to the signup page, but nothing happened.
I have the TOS plugin and some extended profile info collected on the registration page
Larry
7026 pointsLike some sort of WPMU DEV GodMindblowingly helpful memberLifetime member
Lead Developer
—
17th October 2011 (7 months ago)
#
I'm afraid the Premium plugins are still not autoactivated on first signup to Pro... :-(
Actually, I haven't seen any change in the code for that. Unless I'm missing something...
The change was in the extend() function which wasn't firing the psts_upgrade hook. I think I see why my change isn't working, the $old_expire var was getting polluted. Will fix.
1. When Limit Publishing pages & posts, the message you get is the same: "To enable wirting Posts...." even when attempting to add a Page.
Good catch, with differentiate.
3. How is the Manual Gateway supposed to work? It shows a Manual button that turns red when clicked, but nothing happens. Am I supposed to configure it somehow?
Right now it simply lets you put a custom message/instructions/button code on the checkout page depending on your needs. Then it's up to you to manually extend. I may put a notes form there that can be submitted to the site admin if you think that would be more useful.
4. I wish the Pro levels were not numbered. I set up one level so it looks like there may be an error cause there is no #2.
Good point, will look at removing that for 1 level setups. EDIT: I can't find anywhere that level numbers are shown to public users.
The only think I can think is that you changed the main site in sites table, or you have a plugin that's wiping out the global. You could try putting this in the checkout_url() function just to debug:
7026 pointsLike some sort of WPMU DEV GodMindblowingly helpful memberLifetime member
Lead Developer
—
17th October 2011 (7 months ago)
#
I tried adding the Pro Sites option to the signup page, but nothing happened.
Are you sure you have blog signups enabled and you are looking at the blog page? Note that they won't see the checkout page until first login after activating.
To answer your question, no I have not changed main site after installing pro-site. It's interesting that you can't reproduce it. Do you think it could be a server setup issue?
I do get a print out when I click on Premium Plugins link see attachment. Shouldn't the pro upgrade page load in the admin window? It seems to be redirected to a new page.
I'm baffled. I really need this fixed soon as I want to take on subscribers.
Text Changes:
Under the Setting Option and then under "Additional Tags" it says "Allow additional tags only on Supporter blogs" you may want to change this to ProSites
Also under Settings and "Domain mapping Configuration", it says "Supporters Only:" which again you may want to change to ProSites to avoid confusion
today was finally the day I've had the time to start using the plugin with paypal. Unfortunately no matter what I used sandbox ore active website, I got an error message from paypal saying something like "We can not process the request at present. Return to Elbnetz.com, and select a different option."
(See screenshot 1 in german).
What I noticed is that there are a strange characters between the amount and the €-sign on paypal site (screenshot 2).
I'm testing with an amount of 0,01 €. Just to let you know in case this is to low for paypal.
@Thorsten:
Have you used recurring subscriptions with your German PayPal account before?
I've had serious problems with customers having German PayPal accounts, and somewhere on PayPals developer site x.com I once read that recurring subscriptions via Express Checkout simply won't work with German PayPal accounts. Website Payments Standard subscriptions does work, though.
(Another reason for this behavior, not specific for German accounts or Express Checkout, is that it usually won't work unless an "instant funding source" - usually a debit- or Credit Card - is tied to the customers account.)
That's correct, it should take you to http://www.stickytrade.com/join-free/pro-upgrade/ (with an invisible redirect in there, required to add a frontend link to a WP admin menu). Your debug code output is proving that switch_to_blog() (a core wp function) is not working on your site in this context. It's not a pro sites bug. The only possible reason I can think of that could cause this is a poorly coded plugin, so my advice is if at all possible disable all other plugins (mu or otherwise) and see if that solves it. Then it would be a matter of tracking down which is the culprit.
7026 pointsLike some sort of WPMU DEV GodMindblowingly helpful memberLifetime member
Lead Developer
—
19th October 2011 (7 months ago)
#
Thorston, there are a number of things to look at. First off raise your price, it very well could be too small a price (.01 - (.30 + 2.9% transaction fee)) does not really work math wise.
Also make sure your paypal account is actually denominated in Euros, errors like this can appear if currecy in settings doesn't match.
Also as has been said PayPal does some strange things regarding Germany. For the most part recurring subscriptions via Express Checkout simply won't work with German PayPal accounts. We run into this all the time for people signing up here for a DEV membership. German buyers cannot use their paypal account, they have to use a CC directly with PayPal Pro. Not sure if having an "instant funding source" in their paypal account will change that.
I get the currency symbol error on IIS and I narrowed it down to some php functions not being defaulted to UTF-8. I resolved by setting the additional arguments in the html_entity_decode() entries in gateway-paypal-express-pro.php
html_entity_decode($desc, ENT_COMPAT, "UTF-8")
@Aaron
I don't know if there would be any side effects to adding this but it would resolve the encoding problems on some PHP setups.
Thanks for your replies. I contacted paypal technical support (via email as it is already too late to call today) to get a clear statement if subscriptions are possible in Germany.
The documentation I found is ambiguous.
@Aron I increased the amounts with no results.
@bitingedge do I understand correctly that I add the code to the gateway-paypal-express-pro.php file?
Yes make the changes to the gateway-paypal-express-pro.php if you're comfortable with editing the files (save a copy of the original first in case you need to revert).
There are a few entries in the PayPal API methods section starting at around line 1650. You would look for html_entity_decode($desc) and replace it with html_entity_decode($desc, ENT_COMPAT, "UTF-8")
Thank you everyone for all your help testing over the last few months. If you've already been testing you can just autoupdate. If you are upgrading for the first time from Supporter then follow the upgrade instructions: http://premium.wpmudev.org/project/pro-sites/installation/
Premium plugins are still not automatically activated on first checkout. What did you do exactly? Would you like me to share what I think should be done?
7026 pointsLike some sort of WPMU DEV GodMindblowingly helpful memberLifetime member
Lead Developer
—
19th October 2011 (7 months ago)
#
asimetric, i've tested thoroughly and cannot recreate your issue in 3.0. Calling extend() for brand new (no row in pro_sites table) or existing blogs works fine for me both up or down any number of levels.
In 'premium-plugins.php' on line 144, the plugin activation is checked on the main site, not on the target blog (the 'switch_to_blog' action is called afterwards). In my case, which I guess is not yours, the expected Premium plugin is activated on the main site so the required condition is false.
Or do like in the 'new_blog' function where the 'switch_to_blog' function is called at a higher level.
One more thing: in both 'auto_activate' and 'new_blog' functions, if the plugins are meant to be silently activated, then the forth argument of the 'activate_plugins' function is missing (value true).
The only possible reason I can think of that could cause this is a poorly coded plugin, so my advice is if at all possible disable all other plugins (mu or otherwise) and see if that solves it. Then it would be a matter of tracking down which is the culprit.
Hi Aaron,
I deactivated all my plugins except for buddypress and I still have the same problem. My site is hosted on wpengine. Is there anybody else on wpengine that's using pro-sites plugin?
Apparently switch_to_blog() is deprecated in latest ver wp and is also unreliable when used with caching. In my situation wpengine uses a caching plugin so this is probably why I'm having problems.
Which brings me to the question...is there not some other more reliable function you can use to achieve the same result?
My service is also hosted by WP Engine (recommended by WPMU DEV!) but I'm still integrating Pro-Sites so I haven't deployed it yet and I haven't experienced such trouble with it (yet?).
As per the 'switch_to_blog' function, it is not deprecated at all. What the article says is it comes from the former WPMU product, but like all other multisite functions, it's definitely part of WP3 now. It might be changed in the future, but it's largely used by core WP itself so it will take a while.
But from my experience, it's important to know what this function does and above all what it does not. It doesn't litterally switch to another blog but only prepares the execution environment to do some generic operations on that blog. Essentially: temporarily adjust the DB prefix and the user's capabilities to get/update/delete options, metadata, posts or even plugins and themes. For permalink operations, forget it, it's not built for this. I tried a couple of months ago and I finally just gave up and did something else.
Anyway, I'll take a deep look at Pro-Sites on WP Engine's environments when I'm ready to deploy. It's another topic, but I've already experienced nightmares with W3 Total Cache plugin while updating options and metadata that had just been created from the front-end (setting custom language and role on site creation with BuddyPress for example). I had to implement very dirty hacks after several hours of pulling out my hair, believe me, and I'm afraid I'd still have other bad surprises in the future. But it's a good hosting platform, so...
What about the bug I found and reported yesterday about the Premium plugins activation? Is it something you'll fix ASAP or will it wait for a future release? Suprisingly, it's also related to using the 'switch_to_blog' function...
My tax calculation related topic is here: http://premium.wpmudev.org/forums/topic/pro-sites-doesnt-allow-charging-taxes. I certainly should have tested it before, but as the title says, Pro-Sites doesn't allow charging taxes, which is a big big issue for any making-money business. Please read the topic and let's have a chat about it here or there.
1063 pointsLike some sort of WPMU DEV GodMindblowingly helpful memberLifetime member
Lifetime Member
—
21st October 2011 (7 months ago)
#
@ Aaron,
I had previously published a feature request here.
Under Network--> Sites--> Edit Site--> Settings,
when adding some extra plugins or checking specific ones that override the Premium Settings for a site it would be very helpful to have an extra field next to the plugins' name showing their minimum Pro Site level, picked up from the Premium Plugins screen:
Akismet Anyone
Hello Dolly None
Lightbox Pro1
MarketPress Pro2 and so on...
The same applies for the Pro Themes as well.
What does everyone else thinks?
Any +1 on the subject?
I thought of giving you a reminder since that thread is closed.
Responses (73)
Member — 14th October 2011 (7 months ago) #
The accessibility enhancements I submitted a few versions ago has been lost, do you need the code again?
Lifetime Member — 14th October 2011 (7 months ago) #
Hiya Aaron,
Will the stable version support 2co gateway?
Also I'm wondering is the language problem fixed?
Thanks.
Lead Developer — 14th October 2011 (7 months ago) #
KFUK-KFUM, I looked closely at your code and did alot of reading on screenreaders and it both wouldn't work and would'nt help those using screenreaders from what I could tell. It's going to take a lot more rewriting so put it off for now.
If i'm off my rocker and you've actually tested full checkouts with it as well as screenreader functionality then by all means send my your latest code and i'll see what I can do.
Lead Developer — 14th October 2011 (7 months ago) #
Mustafa, replied about your language issue on the thread. Also there will be no more gateways released for a while.
Member — 14th October 2011 (7 months ago) #
I tested am using screen reader (Jaws 12 in case you were wondering) in addition to Chrome, some can use Safari and Chrome using the keyboard and can thusly navigate the form with the changes I provided. As it is now, well let's just call it 0% workable, with my code it works.
Edit: You can also use my code with iOS screen reader tech, without it you can not.
You are free to provide actual counterpoints if you like but if all you want to do is not use my code then say so straight away and my customer will be happy with whatever choice you make.
Lead Developer — 14th October 2011 (7 months ago) #
I'll use it if it works as I said! Can you link to it?
Member — 14th October 2011 (7 months ago) #
If you like I can provide screen recordings (from Safari, Chrome and iOS) as I am at home for the weekend. It will have to wait till tuesday for something like Jaws.
Lead Developer — 14th October 2011 (7 months ago) #
Can you just attach your modified RC4 pro sites.php file or a diff of it?
Member — 14th October 2011 (7 months ago) #
I cant see auto update.
Is this a delete the folder and install from zip ?
Cheers
Johnny
Member — 14th October 2011 (7 months ago) #
Hi Aaron.
I'm afraid the Premium plugins are still not autoactivated on first signup to Pro... :-(
Actually, I haven't seen any change in the code for that. Unless I'm missing something...
Hey Aaron, take some rest, you deserve it, that's what I'm gonna do right now.
Thanks.
Member — 15th October 2011 (7 months ago) #
The thing is, a label element can have focus, it is also semantically a form element, so a screen reader can understand that there are #no levels x 3 alternatives among the radio buttons which are also form elements that also share the same name attribute.
I know it can be improved further with aria and tab index, but this rather quick solution is a foundation that is acceptable for actual persons that can not navigate using standard size text and/or have to do without mouse. Without it there is no way at all for them to use the form.
I also attach some minor fixes (mainly to fix line height and such) for the Levels settings pages:
I used:
diff -uB pro-sites.php pro-sites-updated.php > pro-sites-diff.diffto generate the diff files. Please tell me if you want them in another format and I will be happy to do so.And last, add this to the CSS file:
Lifetime Member — 15th October 2011 (7 months ago) #
Am just jumping into this. Can you provide quick install instructions for this beta? I have no supporter installed right now.
Member — 15th October 2011 (7 months ago) #
Eric.. if you dont have prosites installed or supporter installed right now just put it in your plugins folder like any other plugin and activate it in your network admin screen.... if you have a previous version of prosites remove them first then put the new version in
Member — 15th October 2011 (7 months ago) #
Here you go, a 1 min 15 sec movie of me navigating the Pro Sites selection screen using VoiceOver Accessibility on iOS on my iPhone 3GS.
I apologise for the lousy audio quality, also notice that it uses swedish pronunciation/articulation with the female voice (that is because I have defined the document lang as Swedish) but I hope the point comes across anyway: http://vimeo.com/30576588
Member — 15th October 2011 (7 months ago) #
Hi,
1. When Limit Publishing pages & posts, the message you get is the same: "To enable wirting Posts...." even when attempting to add a Page.
2. I don't understand why Network Activated plugins are not added to the list Pro Plugins? For example, why can't I make Contact Form-7 Pro plugin?
3. How is the Manual Gateway supposed to work? It shows a Manual button that turns red when clicked, but nothing happens. Am I supposed to configure it somehow?
4. I wish the Pro levels were not numbered. I set up one level so it looks like there may be an error cause there is no #2.
Did not try coupons, but I like the idea. The Paypal Express gateway seems fine.
Larry
Member — 15th October 2011 (7 months ago) #
If the plugin is network activated it's available to all sites automatically, no matter what level they are.
What would you do with the plugins that are already available for all in the Pro plugin list?
If you DON'T network activate it, you can make Contact Form-7 or any other plugin a Pro plugin.
Otherwise it's simply available for all.
Member — 15th October 2011 (7 months ago) #
Hi Aaron
In the calc_upgrade function the query pulls in a period column but it looks like this was changed to term in the table.
The revised function
I have to say that's a much cleaner solution that trying to take an additional payment at upgrade.
Mick
Member — 16th October 2011 (7 months ago) #
Hi,
I have install RC 4 and I'm still having trouble with the upgrade checkout process.
I have setup bogus user blog called joesblog.stickytrade.com
In the user dash when I click on Pro Upgrade in menu the link url is http://joesblog.stickytrade.com/join-free/pro-upgrade/?bid=4 which does not work.
Does anybody know a fix?
Member — 16th October 2011 (7 months ago) #
webezy,
http://www.stickytrade.com/join-free/pro-upgrade/?bid=4 works, so I think pro sites need to acknowledge whether or not subdomains are installed or not. The code responsible is at about line 561 (function checkout_url…). I don't have time to check closer until later this evening.
Member — 16th October 2011 (7 months ago) #
KFUK-KFUM,
Thanks, I'll be glad if you can check it out. The link in the admin menu bar 'Pro Upgrade' shows joesblog.stickytrade/wp-admin/admin.php?page=psts-checkout when you mouse over. When you click it goes to http://joesblog.stickytrade.com/join-free/pro-upgrade/?bid=4 - page not found
Not sure why thit is....?????
Member — 17th October 2011 (7 months ago) #
I can't reproduce it, have you perhaps changed main site after installing Pro Sites?
But I found another bug in the code while looking at webezy's problem. Line 3043 has invalid HTML code:
The above stands the risk of never being executed since the language attribute does not exist in HTML and tags should be lower case. It should be:
echo "<script type='text/javascript'>window.location='".$this->checkout_url($blog_id)."';</script>";Member — 17th October 2011 (7 months ago) #
@Aaron,
When I manually upgrade the Pro level of a blog, the issue is the same with the Premium plugins: they're not automatically activated.
Thanks.
Member — 17th October 2011 (7 months ago) #
Hi,
I tried adding the Pro Sites option to the signup page, but nothing happened.
I have the TOS plugin and some extended profile info collected on the registration page
Larry
Lead Developer — 17th October 2011 (7 months ago) #
The change was in the extend() function which wasn't firing the psts_upgrade hook. I think I see why my change isn't working, the $old_expire var was getting polluted. Will fix.
Good catch, with differentiate.
Right now it simply lets you put a custom message/instructions/button code on the checkout page depending on your needs. Then it's up to you to manually extend. I may put a notes form there that can be submitted to the site admin if you think that would be more useful.
Good point, will look at removing that for 1 level setups. EDIT: I can't find anywhere that level numbers are shown to public users.
Lead Developer — 17th October 2011 (7 months ago) #
That's strange. It figures out the main site id from the $current_site->blog_id global, I can't recreate.
The only think I can think is that you changed the main site in sites table, or you have a plugin that's wiping out the global. You could try putting this in the checkout_url() function just to debug:
We'll see what prints.
Lead Developer — 17th October 2011 (7 months ago) #
Are you sure you have blog signups enabled and you are looking at the blog page? Note that they won't see the checkout page until first login after activating.
Member — 17th October 2011 (7 months ago) #
FFUK-KFUM,
To answer your question, no I have not changed main site after installing pro-site. It's interesting that you can't reproduce it. Do you think it could be a server setup issue?
Ok I just saw Aarons response, will check it out.
Member — 17th October 2011 (7 months ago) #
Hi Aaron
The RefundTransaction function has a hard coded currency value and calls a non-existing function. Fix below:
Mick
Member — 17th October 2011 (7 months ago) #
Hi Aaron,
I tried what you suggested and still get same problem. I also tried
"$current_site = get_current_site();" and that did not work.
I have not changed anything in main sites table which I understand is wp_site or wp_blogs of which I have attach screenshots.
If you would like login access give me an email I can send to.
Lead Developer — 17th October 2011 (7 months ago) #
Thanks Mick, points coming your way for that!
Lead Developer — 17th October 2011 (7 months ago) #
webezy, what I need is the array that get printed by that debug code.
Member — 17th October 2011 (7 months ago) #
Aaron,
Should it print to the browser? Any ideas on good debugging plugin for wp?
Member — 18th October 2011 (7 months ago) #
Ok gave define( 'WP_DEBUG', true ); a go. I can't get anything to print relating to that error.
Member — 18th October 2011 (7 months ago) #
I do get a print out when I click on Premium Plugins link see attachment. Shouldn't the pro upgrade page load in the admin window? It seems to be redirected to a new page.
I'm baffled. I really need this fixed soon as I want to take on subscribers.
Member — 18th October 2011 (7 months ago) #
I just noticed the output for your debug code in the dash.
Here it is...
object(stdClass)#9 (6) { ["id"]=> string(1) "1" ["domain"]=> string(19) "www.stickytrade.com" ["path"]=> string(1) "/" ["blog_id"]=> string(1) "1" ["site_name"]=> string(11) "Stickytrade" ["cookie_domain"]=> string(15) "stickytrade.com" }
Seems to be referencing the wrong blog. It should be joesblog.stickytrade.com...Hmmm
Member — 18th October 2011 (7 months ago) #
Hiya
Is RC4 auto-updateable to the final release?
Any outstanding jobs for RC4?
Many thanks,
Johnny
Lead Developer — 18th October 2011 (7 months ago) #
Ok webezy, looks like the blog_id is right. Somehow the switch_to_blog is not holding. Can you try changing the code to this?
And we'll see if it really switched the blog.
Johnny, yes it's autoupdatable.
Member — 18th October 2011 (7 months ago) #
Text Changes:
Under the Setting Option and then under "Additional Tags" it says "Allow additional tags only on Supporter blogs" you may want to change this to ProSites
Also under Settings and "Domain mapping Configuration", it says "Supporters Only:" which again you may want to change to ProSites to avoid confusion
Member — 19th October 2011 (7 months ago) #
Hi Aaron,
Here's the output...
object(stdClass)#21 (12) { ["blog_id"]=> string(1) "4" ["site_id"]=> string(1) "1" ["domain"]=> string(24) "joesblog.stickytrade.com" ["path"]=> string(1) "/" ["registered"]=> string(19) "2011-10-16 02:51:04" ["last_updated"]=> string(19) "2011-10-16 02:51:05" ["public"]=> string(1) "1" ["archived"]=> string(1) "0" ["mature"]=> string(1) "0" ["spam"]=> string(1) "0" ["deleted"]=> string(1) "0" ["lang_id"]=> string(1) "0" }
Aaron, I not understanding something here. Should the upgrade page be loading in the admin panel or should the link redirect to http://www.stickytrade.com/join-free/pro-upgrade/ ?
Member — 19th October 2011 (7 months ago) #
Hi Aaron,
I can get it to work using my hack...
function checkout_url($blog_id = false) {
global $current_site;
$page_id = $this->get_setting('checkout_page');
switch_to_blog($current_site->blog_id);
//my hack start #########################
$uuurl = get_permalink($page_id);
$uurl= substr($uuurl, -38);
$url= "http://www.".$uurl;
//my hack end ###########################
restore_current_blog();
Is there anyway to load checkout page in admin panel?
Member — 19th October 2011 (7 months ago) #
Hi Aron,
today was finally the day I've had the time to start using the plugin with paypal. Unfortunately no matter what I used sandbox ore active website, I got an error message from paypal saying something like "We can not process the request at present. Return to Elbnetz.com, and select a different option."
(See screenshot 1 in german).
What I noticed is that there are a strange characters between the amount and the €-sign on paypal site (screenshot 2).
I'm testing with an amount of 0,01 €. Just to let you know in case this is to low for paypal.
BTW: Im using paypal in Germany/Euros.
Bests
Thorsten
Member — 19th October 2011 (7 months ago) #
@Thorsten:
Have you used recurring subscriptions with your German PayPal account before?
I've had serious problems with customers having German PayPal accounts, and somewhere on PayPals developer site x.com I once read that recurring subscriptions via Express Checkout simply won't work with German PayPal accounts. Website Payments Standard subscriptions does work, though.
(Another reason for this behavior, not specific for German accounts or Express Checkout, is that it usually won't work unless an "instant funding source" - usually a debit- or Credit Card - is tied to the customers account.)
Member — 19th October 2011 (7 months ago) #
https://www.x.com/developers/paypal/forums/permissions-service-api/recurring-profiles-using-express-checkout-dont-work
https://www.x.com/developers/paypal/forums/germany/swiss-paypal-account
Member — 19th October 2011 (7 months ago) #
@poohnix Thanks of that information an the links. The conversation there is one year old. I will get in touch with paypal tomorrow.
That would be a tough one...
Lead Developer — 19th October 2011 (7 months ago) #
That's correct, it should take you to http://www.stickytrade.com/join-free/pro-upgrade/ (with an invisible redirect in there, required to add a frontend link to a WP admin menu). Your debug code output is proving that switch_to_blog() (a core wp function) is not working on your site in this context. It's not a pro sites bug. The only possible reason I can think of that could cause this is a poorly coded plugin, so my advice is if at all possible disable all other plugins (mu or otherwise) and see if that solves it. Then it would be a matter of tracking down which is the culprit.
Lead Developer — 19th October 2011 (7 months ago) #
Thorston, there are a number of things to look at. First off raise your price, it very well could be too small a price (.01 - (.30 + 2.9% transaction fee)) does not really work math wise.
Also make sure your paypal account is actually denominated in Euros, errors like this can appear if currecy in settings doesn't match.
Also as has been said PayPal does some strange things regarding Germany. For the most part recurring subscriptions via Express Checkout simply won't work with German PayPal accounts. We run into this all the time for people signing up here for a DEV membership. German buyers cannot use their paypal account, they have to use a CC directly with PayPal Pro. Not sure if having an "instant funding source" in their paypal account will change that.
Member — 19th October 2011 (7 months ago) #
@Thorsten
I get the currency symbol error on IIS and I narrowed it down to some php functions not being defaulted to UTF-8. I resolved by setting the additional arguments in the html_entity_decode() entries in gateway-paypal-express-pro.php
html_entity_decode($desc, ENT_COMPAT, "UTF-8")@Aaron
I don't know if there would be any side effects to adding this but it would resolve the encoding problems on some PHP setups.
Mick
Member — 19th October 2011 (7 months ago) #
Thanks for your replies. I contacted paypal technical support (via email as it is already too late to call today) to get a clear statement if subscriptions are possible in Germany.
The documentation I found is ambiguous.
@Aron I increased the amounts with no results.
@bitingedge do I understand correctly that I add the code to the gateway-paypal-express-pro.php file?
Cheers
Member — 19th October 2011 (7 months ago) #
@Thorsten
Yes make the changes to the gateway-paypal-express-pro.php if you're comfortable with editing the files (save a copy of the original first in case you need to revert).
There are a few entries in the PayPal API methods section starting at around line 1650. You would look for html_entity_decode($desc) and replace it with html_entity_decode($desc, ENT_COMPAT, "UTF-8")
Wouldn't hurt to give it a try.
Mick
Lead Developer — 19th October 2011 (7 months ago) #
Thanks bitingedge.
Lead Developer — 19th October 2011 (7 months ago) #
Ok guys, we've officially launched 3.0! Yay!
http://premium.wpmudev.org/project/pro-sites
Thank you everyone for all your help testing over the last few months. If you've already been testing you can just autoupdate. If you are upgrading for the first time from Supporter then follow the upgrade instructions: http://premium.wpmudev.org/project/pro-sites/installation/
Member — 19th October 2011 (7 months ago) #
Congratulations!
(WPMUDEV update page lists my installed version as 3.0 RC 4 and lists the latest version as 3 but the autoupdate mechanism is not available).
Lifetime Member — 19th October 2011 (7 months ago) #
Congratulations from me too Aaron. :)
As well as to the whole community that contributed so much with all the feedback and the code provided
Long awaited. Thank you
Lead Developer — 19th October 2011 (7 months ago) #
Whoops, looks like PHP is not interpreting the rc as less than 3.0. You'll have to manually update then.
Member — 19th October 2011 (7 months ago) #
@Aaron,
Premium plugins are still not automatically activated on first checkout. What did you do exactly? Would you like me to share what I think should be done?
Thanks.
Member — 19th October 2011 (7 months ago) #
Some bugs for the next release:
Line 1815 in pro-sites.php, change invalid HTML from
<script language="javascript" type="text/javascript">to:
<script type="text/javascript">Apply this attached accessibility enhancement and then add this to the CSS:
Lead Developer — 19th October 2011 (7 months ago) #
asimetric, i've tested thoroughly and cannot recreate your issue in 3.0. Calling extend() for brand new (no row in pro_sites table) or existing blogs works fine for me both up or down any number of levels.
Member — 19th October 2011 (7 months ago) #
@Aaron,
I've found the bug...
In 'premium-plugins.php' on line 144, the plugin activation is checked on the main site, not on the target blog (the 'switch_to_blog' action is called afterwards). In my case, which I guess is not yours, the expected Premium plugin is activated on the main site so the required condition is false.
So line 144 should rather be:
if ( $data['auto'] && is_numeric($data['level']) && $data['level'] > $old_level && $data['level'] <= $new_level )As per line 150, the 'activate_plugin' function deals with already activated plugins so it can remain the same.
Thanks.
Member — 19th October 2011 (7 months ago) #
Or do like in the 'new_blog' function where the 'switch_to_blog' function is called at a higher level.
One more thing: in both 'auto_activate' and 'new_blog' functions, if the plugins are meant to be silently activated, then the forth argument of the 'activate_plugins' function is missing (value true).
Thanks.
Member — 20th October 2011 (7 months ago) #
Hi Aaron,
I deactivated all my plugins except for buddypress and I still have the same problem. My site is hosted on wpengine. Is there anybody else on wpengine that's using pro-sites plugin?
I'm desperate for a solution.
Member — 20th October 2011 (7 months ago) #
Hi Aaron,
I've been doing some research and came across this http://wordpress.stackexchange.com/questions/4642/why-would-switch-to-blog-stop-working
Apparently switch_to_blog() is deprecated in latest ver wp and is also unreliable when used with caching. In my situation wpengine uses a caching plugin so this is probably why I'm having problems.
Which brings me to the question...is there not some other more reliable function you can use to achieve the same result?
Member — 20th October 2011 (7 months ago) #
@webezy,
My service is also hosted by WP Engine (recommended by WPMU DEV!) but I'm still integrating Pro-Sites so I haven't deployed it yet and I haven't experienced such trouble with it (yet?).
As per the 'switch_to_blog' function, it is not deprecated at all. What the article says is it comes from the former WPMU product, but like all other multisite functions, it's definitely part of WP3 now. It might be changed in the future, but it's largely used by core WP itself so it will take a while.
But from my experience, it's important to know what this function does and above all what it does not. It doesn't litterally switch to another blog but only prepares the execution environment to do some generic operations on that blog. Essentially: temporarily adjust the DB prefix and the user's capabilities to get/update/delete options, metadata, posts or even plugins and themes. For permalink operations, forget it, it's not built for this. I tried a couple of months ago and I finally just gave up and did something else.
Anyway, I'll take a deep look at Pro-Sites on WP Engine's environments when I'm ready to deploy. It's another topic, but I've already experienced nightmares with W3 Total Cache plugin while updating options and metadata that had just been created from the front-end (setting custom language and role on site creation with BuddyPress for example). I had to implement very dirty hacks after several hours of pulling out my hair, believe me, and I'm afraid I'd still have other bad surprises in the future. But it's a good hosting platform, so...
Thanks.
Lead Developer — 20th October 2011 (7 months ago) #
http://core.trac.wordpress.org/ticket/14992 definitely seems to be the issue. Basically a conflict with WP Engine's object caching plugin.
For now you could just hardcode the checkout_url() function to return http://www.stickytrade.com/join-free/pro-upgrade/ always.
So
to
$url = 'http://www.stickytrade.com/join-free/pro-upgrade/';I'll look for a hack to get the proper permalink in your rare case for the next version.
Member — 20th October 2011 (7 months ago) #
Hi Aaron.
What about the bug I found and reported yesterday about the Premium plugins activation? Is it something you'll fix ASAP or will it wait for a future release? Suprisingly, it's also related to using the 'switch_to_blog' function...
Thanks.
Member — 20th October 2011 (7 months ago) #
Member — 20th October 2011 (7 months ago) #
I think you just have to press the button in the pro settings to enable the user seeing the front end, after I did that everything worked fine!
Take a look at the pic with this file....
Lead Developer — 20th October 2011 (7 months ago) #
Yes.
Member — 20th October 2011 (7 months ago) #
Thanks Aaron.
Also, I have a question about tax setup and calculation with PayPal. Shall I open a new topic?
Thanks.
Lead Developer — 20th October 2011 (7 months ago) #
Ya. Releasing 3.0.1 right now.
Member — 20th October 2011 (7 months ago) #
Thanks!
Member — 21st October 2011 (7 months ago) #
Upgraded. Thanks.
My tax calculation related topic is here: http://premium.wpmudev.org/forums/topic/pro-sites-doesnt-allow-charging-taxes. I certainly should have tested it before, but as the title says, Pro-Sites doesn't allow charging taxes, which is a big big issue for any making-money business. Please read the topic and let's have a chat about it here or there.
Thanks.
Lifetime Member — 21st October 2011 (7 months ago) #
@ Aaron,
I had previously published a feature request here.
I thought of giving you a reminder since that thread is closed.
Member — 24th October 2011 (7 months ago) #
Hi.
Is this topic still alive or should we use other ones from now on regarding features questions/issues?
Anyway, here is one about PayPal Express Checkout execution steps: http://premium.wpmudev.org/forums/topic/paypal-express-checkout-process-missing-step
Thanks.
Become a member