I have a site which uses Commerce Subscription Products to sell upgraded membership roles. The module functions properly when a subscription is purchased, and I have rules set to grant and revoke roles based on subscription expiration. The only problem arises when a non-subscribing (or expired subscriber) saves their profile.
My error logs flag the following: "Notice: Uninitialized string offset: 0 in entity_metadata_field_property_get() (line 432 of /(site-name)/sites/all/modules/entity/modules/callbacks.inc)". and "Warning: Illegal string offset 'value' in entity_metadata_field_property_get() (line 432 of /(site-name)/sites/all/modules/entity/modules/callbacks.inc)".
If there are any existing user photos, they are deleted as well.
There are no problems whatsoever if a value is present in the field-commerce-sp-validity field (even if that date is expired). Once I run cron and the field is subsequently set to null, the issues appear.
I have seen multiple similar issue threads, but no resolutions which I could identify that work in this case. The symptoms are same as https://drupal.org/node/1760994 which is closed as duplicate of https://drupal.org/node/1554050. The resolution indicated is that applying weight=3 to the "Apply bought subscription time" rule resolves, but this patch is applied and the "Uninitialized string offset: 0 in entity_metadata_field_property_get() (line 432" and above log errors still exist whenever a user without subscription is updated.
For a temporary workaround, I have disabled photos for user profiles and disabled error reporting to keep them from seeing the errors, but since this is a straightforward and readily duplicated problem, it seems there must be a resolution which I have not been able to locate.
Any advice would be greatly appreciated.
Comments
Comment #1
scflmark CreditAttribution: scflmark commentedComment #2
scflmark CreditAttribution: scflmark commentedComment #3
m42 CreditAttribution: m42 commentedI fell into the same issue and I finally found a workaround : redefine a part of the field (the callback in charge of fetching the value) in order to remove the unnecessary array part that makes the field "partly-empty" when it is supposed to be totally empty.