Problem/Motivation

I was trying to create a rule condition to load a recurring entity based on a user's uid. Rules want allowing me to do this because apparently the uid property was of type 'undefined'.

Proposed resolution

Change the property type of uid on a recurring entity from 'user' to 'integer'. Other modules (eg commerce) tend to do this and it fixed the problem form me.

Remaining tasks

  • Post patch
  • Review

Comments

yanniboi created an issue. See original summary.

yanniboi’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new571 bytes

patch attached

pcambra’s picture

Status: Needs review » Needs work

True, this is legacy right there. Could we have also an owner property? http://cgit.drupalcode.org/commerce/tree/modules/order/commerce_order.in...

yanniboi’s picture

Issue summary: View changes
Status: Needs work » Needs review
StatusFileSize
new3.26 KB
new68.44 KB

Yup that is a good recommendation. I also added uid to the views data because the username field on the admin view at '/admin/commerce/recurring-entities' was reporting the relationship handler to the user entity as broken.

r-mo’s picture

Status: Needs review » Needs work

Getting broken/missing handler on the user-recurring-entities view with this patch applied and error is also shown when opening the view or clearing the cache

Warning: class_exists() expects parameter 1 to be string, array given in _views_create_handler() (line 34 of /var/www/art001/core/site/sites/all/modules/contrib/views/includes/handlers.inc).

Looks like create handler is getting both views_handler_field_user and views_handler_field_numeric passed in the definition.

opdavies’s picture

Status: Needs work » Needs review
StatusFileSize
new3.04 KB
new320.26 KB
new339.59 KB

Here's a re-roll of the patch from #4, and some screenshots of the resulting view.

There are no broken handlers in the View, nor any error messages when viewing the page.

Before:

After: