Hi,
Firstly let me say thanks for the great work going in to this module and I look forward to getting it to work correctly for me - I have several use cases in mind for it and will try and contribute more documentation for the project
I have been working on a recently update stable Barracuda/Octopus installation of Aegir and have installed ubercart and the dev release of uc_hosting on the Octopus Aegir Instance called platforms.mydomain.com
I create a product , I give it the "Create a site and adjust quotas accordingly" feature and log out from the site and visit the product node as an anonymous user. I add it to my cart, am presented with the create site screen for my chosen platform and profile. I fill out the required fields and submit the form, am taken to the review order and then onto the checkout page which I fill out and submit. I am choosing to pay by cheque while debugging and have my product set to be $0.01 which automatically completes the order once it is submitted.
I receive this feedback after completing the checkout process
Unable to send e-mail. Please contact the site administrator if the problem persists.
Task install was added to the queue. Next queue run is 00:38:12+0000, server time is 00:38:11+0000.
Your site, newsite.mydomain.com, has been created. You can view it here.
Despite the message about the mail not being sent I receive the confirmation e-mail message with my order invoice and also one with my aegir site login details. I login with the details onscreen (or from the onetime login in the e-mail) and I can't see the site that I just requested in the checkout process.
The e-mail I did not receive is the one that tells me my newsite.mydomain.com is ready and gives me the initial onetime login link for the newly provisioned site.
I log back in as the administrator and I can see the site just initiated and paid for has been provisioned and verified. If I go to the "Manage Clients" (the users) page I can see the user that just bought the site is listed but has no role set. If I do a filter for clients on the content list page I see that the although the user has been added the associated aegir client node has not been added. Sure enough if I check the site that has been provisioned, I see the associated client field is empty so there is no correlation being made between the new site and the new user.
I tried to add a Role feature to give the new user the "Aegir Client" role which worked but did not make a difference in solving the missing client node issue.
I wonder if its my misunderstanding of this last point in the documentation
4.) Now all you need is a drupal platform that any user can create platforms on and you are ready to go. (node/add/platform)
I gave "authenticated user" the permissions to create platforms but this did not help. I am wondering though why a user using the "create a site" product feature would need to create platforms?
Any advice and suggestions would be greatly welcomed
Thanks
Gregg
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | client permissions.JPG | 38.11 KB | alfthecat |
| #12 | rule for redirect.JPG | 27.24 KB | alfthecat |
Comments
Comment #1
sfyn commentedOK, thanks for the great and detailed issue report.
With regards to this error message "Unable to send e-mail. Please contact the site administrator if the problem persists" - that is an ubercart core issue, please see #455888: Unable to send e-mail. Please contact the site administrator if the problem persists.
The rest looks like a bug has snuck into the client creation process, I will try and reproduce. Can you please confirm that you are using the dev snapshot, as reported?
In the meantime, if you would try downgrading to the 1.0 release, I would be interested to learn if you have the same problems.
Comment #2
iaminawe commentedI am using the dev snapshot and upgraded to the dev after I found the same issue with the stable release
Thanks for your attention to this and for pointing out the e-mail send issue.
I will try and downgrade again this weekend and will report my results here.
Thanks
Gregg
Comment #3
sfyn commentedI cannot reproduce with either the 1.0 or dev snapshot.
Can you provide detailed information about your payment gateway? Also, can you find out what version of aegir you are running?
Here are my attempted steps to reproduce:
1. Install Ubercart and uc_hosting, enable everything
2. Create a site product as per instructions
3. Enable the test payment gateway
4. Buy the product as an anon user and create the site
5. Login and verify the site has been created, the client as well, and that the new user has access to the client
Can you let me know if I have missed/skipped a step here?
Comment #4
sfyn commented@omega8cc tells me Barracuda runs Aegir 6.x HEAD, so that's probably not the problem.
Comment #5
iaminawe commentedThanks for looking at that Sfyn
So I have just set up a fresh server, installed the latest stable Barracuda build - did not install Octopus this time to clarify that the 2 different aegir installations are not conflicting with UC Hosting.
I followed your exact steps above and still encountered an issue with creating clients automatically once an order placed by an anonymous user goes through the checkout. There are some differences in the issues I encountered when using octopus.
So now when an order is processed, a new client is created but the client name is not filled out but the actual user does seem to be associate. After this if another anonymous user places an order the new site provisioned is set to the previous client with the blank client name.
I wanted to ask if when a new site is provisioned by a client who has just paid for the site, should the client receive the "your site is ready" e-mail with the one time login link?
I also would appreciate if you could clarify point number 4 in the documentation about the platform permissions? Is this still required if only using the "create a site "product feature?
I am going to try to do another clean build of Aegir from the .deb distribution to see if the issue lies with how Barracuda/Octupus works as opposed to how vanilla Aegir works.
Comment #6
iaminawe commentedOK I have set up another fresh vanilla copy of Aegir 1.1 using the deb install and I am seeing the same issue with the client being created but the client name being left blank after an order has been processed.
The client node is there and is associated with the correct user but the title is left blank which I believe causes the issue of future signups being assigned to this first client as well as preventing the creation of any more clients after this first blank one.
I am using uc_hosting dev version, ubercart 6.x-2.4, Aegir 1.1
Any further guidance would be appreciated.
It may be worth adding these steps to the documentation too
Make sure the "access content" permission is set for anonymous users
Thanks
Comment #7
sfyn commentedOK, this makes things a lot clearer, thanks for all your testing.
The client is created from data entered at checkout time - can you send me the values you are inputting into your billing address at that time? I am pretty sure I know what is going on now.
I noticed the access content issue too - good catch, will do.
On platform access control, you only need to do this if you intend to use Aegir's platform access control features (Currently a source of some controversy, see #967888: meta: refactor site form) - I will rework and clarify this section of the documentation as well.
> I wanted to ask if when a new site is provisioned by a client who has just paid for the site,
> should the client receive the "your site is ready" e-mail with the one time login link?
Yes they should. But I noticed that my admin email received the email instead, and am digging around trying to determine how that happened.
BTW, while I am throwing possibly related aegir issues at you, it seems likely to me that some of this is related to changes I made to the module to address #1103960: Patch for the new client nodes in aegir and #962330: refactor and clarify the fields in the client content type.
Comment #8
iaminawe commentedI sent some details via PM to you
I thought I would try another fresh setup as I saw an update announcement for Barracuda/Octopus
I have just set up another new linode with HEAD versions of Aegir, Barracuda & Octopus & dev version of UC hosting and can confirm same issue with aegir client not being created.
Let me know if I can provide any further details
Thanks
Gregg
Comment #9
sfyn commentedOK, the bug is caused because you are not providing a company name.
At some point, I evidently decided it was a good idea to rely exclusively on the company name to create the client. Should be a fairly simple fix, and if I have npt gotten to it yet it is mostly because I have a limited mandate these days from Koumbit to work on this.
Should have a point release out to deal with this in the next week or so.
Comment #10
iaminawe commentedI can confirm on 2 different aegir installations that adding the company name does not resolve this issue for me
I still get blank client name and no aegir client role being applied
Thanks
Comment #11
sfyn commentedok. I am completely at a loss. I will investigate further and see what I can turn up.
Comment #12
alfthecat commentedOk, I am not sure if the following applies, or can give clarity for this specific issue. But perhaps documentation will benefit from this.
I had some trouble setting everything up just right and I got similar errors as described in this issue. After spending a fruitful Saturday I got everything to work.
Here's what I did
User Registration Settings(admin/user/settings)
I left this to the setting: Only site administrators can create new user accounts
Client settings (admin/hosting/client)
I set this to automatically create user accounts for new clients
Ubercart Payment
This was something I missed before. A Payment option must be enabled and your sites must cost more than $0,- for site install to work.. You can use the Test gateway and enable creditcards, but I chose to download uc_coupons and enable the Payment Pack. From that pack I enabled the payment option 'other'. I created a coupon to provide a 100% discount. Another reason for me to include uc_coupons is to offer a free trial coupon code that users can use once and gets emailed to them on registration.
Checkout settings
The actual trick is in the steps below, but it is important to disable anonymous checkout and such. So ubercart does not create users in any way!
I also made the company name a required field for 'customer information'
The Trick
Now for some unfamiliar reasoning: The Aegir client setting creates a user for any new client. Not the other way around! So instead of offering anonymous users to register, I invite (and grant them permission to) create a client (just linked to /node/add/client)
What happens now is that a visitor fills out some company info at node/add/client. After saving, Aegir creates the user credentials (with the email address as username)! So the anonymous gets the one time registration email (specified at the client settings page (/admin/hosting/client) to login. Only now is the user actually created and properly linked to his/ her client and with the proper role!
The final trick: Permissions
After completion of a site order, I got the access denied message after clicking on the 'view' link in the status message. The required permission is administer clients. If the aegir client role does not have this permission the link won't work. Off course, anonymous users need the permission to create a client for this setup to work. I have attached a screenshot of my permissions.
One extra trick
Because I didn't want to grant anonymous users the permission to administer clients, I also got the access denied page after an anonymous user creates a client as part of this signup process. I have tackled this as follows:
1 - downloaded/ enabled Actions, Trigger, Rules and path_redirect modules
2 - Created a rule to redirect anonymous users to a different URL after they save a Client node. This page details the next steps for registering (e.g. Almost done, check your email to complete registration / login etc, etc. See my Rule for redirect screenshot.
Comment #13
iaminawe commentedThank you so much for this, I will run through it in detail tomorrow and confirm it works.
Comment #14
iaminawe commentedThanks for this additional documentation as well as the tips about the free trial period using uc_coupon and the rules setup to avoid the access denied issue. All very helpful stuff.
I think my problem was related to have a $0 product as well as allowing Ubercart to create the user during the checkout process.
When I tested it the way you described it with adding the client first and then adding the products when logged in, the reference was correctly maintained and the client received the correct e-mail when a new site was provisioned. So that all works fine - thank you.
It is not an ideal workflow though requiring an account to be created before a site can be purchased. Ideally it should work with Ubercarts user grant system so that it can be handled in one smooth process where a user account/client node should be created on anonymous checkout and assigned to the generated client node. Not sure if this is possible.
Another alternative I guess would be to handle it like the hosting signup form where the client fields and site setup fields appear in one form which when submitted generates the client and site and associates them. I am not quite sure how ubercart integration would look in this instance.
Anyway just a few thoughts - thanks to both of you for helping me understand this better.
Comment #15
alfthecat commented@imainawe
Happy to hear it all works now! I agree that anonymous checkout would be a nice workflow. I think the problem lies with the way Aegir uses clients that in turn can have several users assigned to it. The signup form is a lot smoother but it lacks a lot too imo. It doesn't really allow for a 'commercial' approach, for it lists all the platforms and profiles. With ubercart integration users can really order a specific site without being bothered with platform and profile selections.
Comment #16
ergonlogicI've tested this rather thoroughly, and sfyn appears correct in #11. The problem(s) stem from leaving the "company" field blank. After a client with a blank name is created, all subsequent sites are assigned to that client (and the associated user). Even orders with a value in the "company" field suffer from this problem.
As a work-around, deleting the client with the blank name works.
As a fix, I suppose building an alternate client name, if the "company" field is left blank seems like a good idea. Another option could be to make that field mandatory with a form_alter().
Also note a couple other bug reports that have come out of this thread: #1236516: Link to view site after order completion points to client instead & #1236490: "View client" permission broken.
Finally, enabling the "Login users when new customer accounts are created at checkout" option at admin/store/settings/checkout/edit/basic, along with my patch in #1236516: Link to view site after order completion points to client instead, make for a pretty smooth order & checkout process.
Comment #17
alfthecat commented@ergonlogic
The weird thing is that I checked that first, I even made the company name a required input but I still got users without clients assigned to them. But I didn't test that specifically so there may have been another setting that conflicted.
I'll have another go in the future and check out the patch you mentioned. Nonetheless, imo, the AUI module is really awesome and a truly essential contrib to Aegir.
Comment #18
ergonlogicFix committed (http://drupalcode.org/project/uc_hosting.git/commit/e088318) to my dev branch (ergonlogic).
Note that #1236558: anonymous checkout with existing client name breaks site creation remains.
Comment #19
sfyn commented@ergonlogic I tested this out and it works for me. Will merge your fix in and roll a new point release shortly.
@AlfTheCat Would you mind making a documentation patch with this data? http://community.aegirproject.org/node/516 - you just have to create a login on community.aegirproject.org ;-)
Everyone: You all rock!
Comment #20
sfyn commentedErgonlogic's work has been merged into head. However, re #14:
You are quite right. I need to check this out because I recall I used to let ubercart do this for us somehow. I exploited the already created user by ubercart to create the client. AlfTheCat's workaround is neat, but I think there oughta be a better way of dealing with this situation.
Congrats btw, you are all in the git log for all eternity.
Comment #21
iaminawe commentedReally great work guys - thanks for all of your contributions
It works really nicely now and does support the anonymous checkout /log in user in ubercart functionality so the workflow is nice and smooth and the client and site are created properly in one process.
The only thing I noticed is that the new provisioned client sites dont seem to have sent out e-mails to the associated clients. They get the order e-mail, the login e-mail (if enabled) but no one time login link mail.
Thanks to you all
Comment #22
ergonlogicThis is exactly what it does.
Comment #23
alfthecat commentedExciting to see this whirlwind of rapid progress and succes :) Dying to try it out over the next few days.
@sfyn I'd be very happy to contribute to the docs! Can I simply edit the the page on http://community.aegirproject.org/node/516?
Comment #24
sfyn commented@AlfTheCat yes of course you can edit the page. You will need to create a login on that site, of course.
Comment #25
ergonlogic@iaminawe: please file a seperate bug report, if there isn't one already