This warning is raised on the first checkout page, if visitor does not chose a payment method and clicks the "order review" form submit button.

CommentFileSizeAuthor
#6 1250734.patch2.12 KBroderik

Comments

justWolf’s picture

I have the same issue and could't find any reason for that.

WebsiteJo’s picture

My users get the same warning. I think users have to be logged in, to get the warning. If a guest orders something, there is no error.
I noticed this first time after installing ubercart module 6.x-2.6. When I used 6.x-2.4 there was never shown a warning. At least I think so. I can't retry with ubercart 6.x-2.4, because I have no update of my database.
The warning is only shown when the user chooses the 'Review order'-button at the first time. The warning also appears when a payment method is selected.

WebsiteJo’s picture

I've to correct my statement after a new test of my shop.
The warning is shown to all customers now!

Has anyone a solution or a idea to this problem?

(I turned off the error display (at admin/settings/error-reporting) so the shop seems to work well.)

Sohodojo Jim’s picture

This _may_ have to do with more rigorous requirements of PHP5 or just is something that slipped by until of late, but a quick fix for this is to slightly tweak the function signature from:

function uc_pma_method_items($payment_method)

to:

function uc_pma_method_items($payment_method = '')

which is apparently at line 134 in a stock release (although I have modded my copy to my additional requirements).

This small change provides the empty string as the missing parameter when this function is called without it -- as is the case in this module's JavaScript file containing the jQuery .post call with a URL that resolves to this function as the page callback in uc_pma_menu hook.

brunorios1’s picture

same here

roderik’s picture

Status: Active » Needs review
StatusFileSize
new2.12 KB

It looks like uc_pma_method_items() should never be called with an empty argument in the first place. It doesn't return anything useful.

On document.ready() the 'click' event is apparently fired, with an empty value. So the JavaScript should be amended to not make the POST call in that case.

Note:
On document.ready(), there is no reason to do the render_line_items() call.
I'm not a JS/UI guru, I have no idea if somewhere on earth there is a device which is able to 'unset' a radio button, thereby generating a click() event with an empty value sometime after the document is first rendered. So I added an 'else{ }' block with that render_line_items() call anyway.

ryaner-1’s picture

I have the same issue. Does this patch work? Is it safe to go ahead and use it in order to solve the issue?

thanks
Mark

ryaner-1’s picture

I have the same issue. Does this patch work? Is it safe to go ahead and use it in order to solve the issue?

thanks
Mark

chinita7’s picture

I tried #4 and my error no longer appears. Thanks.