I have Payment form field on User Entities so I can set an amount that individual users owe. I'm using Field Permissions so only admins can change the amount someone owes. An error occurs when a user tries to update their username/password (ex: /user/2/edit page) - the Payment form field is not displayed for them, however it is still trying to get validated in the payment.ui.inc file:

Warning: strlen() expects parameter 1 to be string, array given in payment_form_process_line_item_validate() (line 862 of /home/clients/websites/w_emc/public_html/emc/sites/all/modules/payment/payment/payment.ui.inc).

Let me know if there is a work around I can try. Thanks.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Xano’s picture

Version: 7.x-1.8 » 8.x-2.x-dev
Status: Active » Postponed (maintainer needs more info)

Can you provide step-by-step instructions on how to reproduce this problem on a clean installation of Drupal 7.x-dev and Payment 7.x-1.x-dev?

Doing the same for Drupal 8.x-dev and Payment-8.x-2.x would be helpful, as we'll need to make sure this bug isn't in Payment 8.x-2.x as well, before we can fix it in 7.x-1.x.

Xano’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Closing due to lack of response. Please re-open this issue only if you have information that describes the problem in more detail or helps other people reproduce the bug on their computers.

kruser’s picture

Status: Closed (cannot reproduce) » Active
kruser’s picture

Hi,
Sorry for the delay. Steps to reproduce:

1. Add Payment form field to a USER @ admin/config/people/accounts/fields (I called it balance due)
2. Set the Field permissions, so members can see the payment Due, but not edit it.
3. For each user I set a Payment Due
4. If a member logs in, updates their profile and clicks Save, an error occurs.
(I attached screenshots for reference.)

If I set the field permissions to allow the member to edit the balance due, then there is no error when they save. But we don't want to let members edit their balance obviously, so we are hiding the fields with CSS as a temp fix.

Thanks.

Xano’s picture

Status: Active » Postponed (maintainer needs more info)

Is this for 8.x-2.x or 7.x-1.x? Also, field permissions are not part of core. Please repost the instructions and include the parts that describe how to set the field permissions.

Xano’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Closing due to lack of response.

vlooivlerke’s picture

Title: Payment form field on User Entity with Field Permissions error » Payment form field on User/Entityforms Entity with Field Permissions error
Version: 8.x-2.x-dev » 7.x-1.x-dev
Status: Closed (cannot reproduce) » Active

I can confirm this.

I use entity forms where the user submits a form with a payment field (empty) then admin will edit the entity form and add amount to empty payment form. The submitter of the entity form can then visit the form view and select a payment method and click pay.

This will create a payment.
Now if the user try to edit the entity form he created he will get this error described here.