after adding loop to my Payment method rule, on page /admin/commerce/config/payment-methods I have such error:

FacesExtendableException: There is no method getElementName for this instance of the class RulesLoop. in FacesExtendable->__call() (line 134 of /var/www/site.loc/docroot/sites/all/modules/contrib/rules/includes/faces.inc).

Some part of this was fixed in #2102235: No method getElementName for this instance of the class RulesLoop, RulesOr, etc, but now this need to fix and in another place

Comments

andrewsizz’s picture

Status: Active » Needs review
StatusFileSize
new893 bytes

Patch

rszrama’s picture

Issue tags: +sprint

Each payment method rule should really only be enabling a single payment method. I'm not sure what a loop would be doing for you here.

We can still fix the exception, though.

rszrama’s picture

Status: Needs review » Fixed

Got the patch committed. : )

  • rszrama committed 0a809e1 on 7.x-1.x authored by AndrewsizZ
    Issue #2500311 by AndrewsizZ: ERROR There is no method getElementName...

Status: Fixed » Closed (fixed)

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

RAWDESK’s picture

Hi, i've solved a similar issue on payment methods configuration pane by applying this patch, but now i am also receiving this error on /admin/commerce/orders/%order_id/payment

Any idea which module might be causing it this time ?

In attachement the rule i've detached from "checkout completion" event and attached to "set available payment method" event in order to bypass insecure user depersonalization, intially performed by my payment provider's redirect to checkout with anonymous user, and its consequences on global $user written logic :
https://www.drupal.org/node/1895418

The rule undeniably has a loop...

RAWDESK’s picture

StatusFileSize
new64.75 KB

Quickly scanned contrib/commerce folder for similar getElementName symptoms.
Found that commerce_payment.forms.inc at line 113 was responsible for the error in my case.
Fixed it the same way as Ryan did->works

PS. In attached screenshot an equivalent check that already seems to be present in commerce_payment.module :

commerce-payment-ok.JPG

andrewsizz’s picture

Issue summary: View changes
asifnoor’s picture

The patch provided by @rszrama works fine.