We need to implement this hook for any core modules that require PHP features like SimpleXML, cURL, and SOAP. While these are included by default, a lot of hosts limit what's available in PHP by disabling some of these default features.

Comments

cha0s’s picture

Status: Active » Needs review
StatusFileSize
new8.56 KB
new8.55 KB

Patches for both versions follow.

Island Usurper’s picture

Status: Needs review » Needs work

Ubercart 1.x doesn't use SimpleXML, so it's not a requirement for those modules. The libraries they use are distributed in the Ubercart download.

rszrama’s picture

We can just stick w/ the 2.x patch and not worry about it for 1.x.

rszrama’s picture

Status: Needs work » Needs review

I should've marked this back to code needs review... we can ignore the 1.x patch, but please review the 2.x patch for inclusion. My quick overview doesn't turn up anything out of the ordinary. I might add that we should review at least the payment modules for places where they're doing their own requirements checking. I believe I do this in PayPal, Auth.Net, Cyber Source, and maybe more. If we're using this hook, my hunch is we can take out the local checks in those modules.

cha0s’s picture

"I might add that we should review at least the payment modules for places where they're doing their own requirements checking. I believe I do this in PayPal, Auth.Net, Cyber Source, and maybe more. If we're using this hook, my hunch is we can take out the local checks in those modules."

Would you like me to add this into the patch, or should we keep 'em separated?

Island Usurper’s picture

I think we can add it to this patch. Since we're taking the checks out because we're adding this hook in, that seems reasonable.

Island Usurper’s picture

Status: Needs review » Needs work

:)

rszrama’s picture

Ahh, my bad - I was meaning for it to go ahead and go in this patch.

cha0s’s picture

Assigned: Unassigned » cha0s
Status: Needs work » Needs review
StatusFileSize
new11.59 KB

Patch improved to remove any extraneous checks.

cha0s’s picture

Accidentally double posted... ;p

Island Usurper’s picture

Status: Needs review » Needs work

The way it is, it looks like uc_cybersource won't ever install if the server doesn't have cURL support. It sounds plausible to me that someone might have SOAP and DOM, but not cURL, but they wouldn't be able to use even the SOAP interface to CyberSource. You can get around that by checking that $phase == 'runtime', but then you have to put in all of the additional checks back in throughout the module.

Everything else looks good, though.

cha0s’s picture

Status: Needs work » Needs review
StatusFileSize
new11.01 KB

Alright, updated the module. Here's the changelog:

Fixed cybersource's installation behavior (would fail if user only had SOAP and DOM but not cURL), and made those checks at runtime...
An installation check is done to ensure at least one library combo exists.
At installation time, the best candidate for the cybersource method is chosen, defaulting to POST if possible.
The runtime checks for Cybersource were added back in to make the error more user-friendly

aaand, patchie:

Island Usurper’s picture

Status: Needs review » Fixed

Looks good to me.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

ñull’s picture

Component: Code » Documentation
Status: Closed (fixed) » Active

I would say that beside software warning, it would be good to mention these dependencies in the system requirements in the documentation. Some people, before installing a module, actually read the documentation to find out beforehand if the module is suitable for their hosting environment.

Island Usurper’s picture

Issue tags: +Release blocker
cha0s’s picture

Assigned: cha0s » Unassigned
Island Usurper’s picture

Status: Active » Fixed
StatusFileSize
new381 bytes

Added module-specific requirements to the installation page at ubercart.org. The README.txt file needed to be changed to the 2.x version of the docs, so I figured it was the right place for it.

Status: Fixed » Closed (fixed)
Issue tags: -Release blocker

Automatically closed -- issue fixed for 2 weeks with no activity.