With the payment module you get a view with all payments made. Including a relation from payment to the user who made the payment.

Now I need a view with all users and the payments they made. That is the other way around. The purpose is to check which user did not make a certain payment.

When creating a view of users, there is no possibility to create a relationship with payment entities. Why is that? Is there another way to get a view of users without payments?

CommentFileSizeAuthor
#1 payment_2340631_1.patch619 bytesXano
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Xano’s picture

Category: Support request » Feature request
Status: Active » Needs review
FileSize
619 bytes

This should work.

ecvandenberg’s picture

Many thanks for your almost instant reply and patch! I did not review the code because I'm not a programmer. I applied the patch and was indeed able to make a relation from a Users view to Payments. I have the following remarks:

  • When the relation to Payments is made I can add Payment fields to my view.
  • Some fields give an error because the do not have any help information. (But this is not related to this issue. It applies to the payment module in general)
  • When I use the Payment ID field, it would be nice when it is possible to link the field to it's content. At this moment I have to rewrite the result with a token. Also works but is not so nice.
  • When I use the Payment Description field I get the following error when saving:
    • An AJAX HTTP error occurred.
      HTTP Result Code: 500
      Debugging information follows.
      Path: /admin/structure/views/view/my-view-name/preview/page_1/ajax
      StatusText: Service unavailable (with message)
      ResponseText:
  • I tried this Payment Description field but actually I wanted the Payment Line item description. Although I did not ask for it, a relation to the payment line items would also be nice :-)
Xano’s picture

When the relation to Payments is made I can add Payment fields to my view.

Good!

Some fields give an error because the do not have any help information. (But this is not related to this issue. It applies to the payment module in general)

It's indeed a more fundamental problem; Views requires help/description, but that is bad UX. It must be fixed there instead.

When I use the Payment ID field, it would be nice when it is possible to link the field to it's content. At this moment I have to rewrite the result with a token. Also works but is not so nice.

Content?

When I use the Payment Description field I get the following error when saving:

An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /admin/structure/views/view/my-view-name/preview/page_1/ajax
StatusText: Service unavailable (with message)
ResponseText:

We'll need more information before that can be fixed. Please provide the corresponding server-side log entries.

I tried this Payment Description field but actually I wanted the Payment Line item description. Although I did not ask for it, a relation to the payment line items would also be nice :-)

That is already possible.

ecvandenberg’s picture

Linking a field to it's content, in this case means, linking it to it's payment. That would also be convenient for the default Payment view.

The error only occurs when trying to add a description field. Both the Payment description field and the Payment line item description field. In the log files I find:
Recoverable fatal error: Argument 2 passed to t() must be an array, boolean given, called in .../sites/all/modules/payment/payment/views/PaymentViewsHandlerFieldTranslatableString.inc on line 36 and defined in t() (line 1466 of .../includes/bootstrap.inc).

Indeed, a relation to payment line items is already possible.

Xano’s picture

Version: 7.x-1.11 » 7.x-1.x-dev
Status: Needs review » Fixed

Linking a field to it's content, in this case means, linking it to it's payment. That would also be convenient for the default Payment view.

I still don't understand what you mean by this. Please open a new issue and describe the requested feature in more detail.

The error only occurs when trying to add a description field. Both the Payment description field and the Payment line item description field. In the log files I find:
Recoverable fatal error: Argument 2 passed to t() must be an array, boolean given, called in .../sites/all/modules/payment/payment/views/PaymentViewsHandlerFieldTranslatableString.inc on line 36 and defined in t() (line 1466 of .../includes/bootstrap.inc).

That is helpful! Could you open a new issue for this bug?

  • Xano committed 592ad9b on 7.x-1.x
    Issue #2340631 by Xano: Added Views relation from users to payments.
    

Status: Fixed » Closed (fixed)

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