View Issue Details

IDProjectCategoryView StatusLast Update
0017708phplist applicationMessage Send Processpublic06-07-15 17:04
Reporterduncanc 
PrioritynormalSeverityminorReproducibilitysometimes
Status resolvedResolutionfixed 
Product Version3.0.12 
Target Version3.0.XFixed in Version3.2.0 
Summary0017708: Attribute placeholder not replaced when subscriber does not have a value for the attribute.
DescriptionA problem reported in the new user forum about a user attribute placeholder not being replaced when the subscriber does not have a value for that attribute
https://discuss.phplist.org/t/personalisation-how-to-remove-name-if-contacts-names-are-blank-in-list/265

I thought in that case the placeholder was replaced by an empty string but that is not the case.

Looking at function getUserAttributeValues(), that returns only the user attributes for which the subscriber has a record in user_user_attribute, but excludes any attributes for which the subscriber does not have a record.
I'm not sure that is the right thing to do. It would be more useful to return all user attributes. If a subscriber does not have a value for any attribute then either an empty string or perhaps null could be returned.

This behaviour might be a side-effect of this earlier Mantis report https://mantis.phplist.org/view.php?id=16671
TagsNo tags attached.

Activities

michiel

26-05-15 16:00

manager   ~0056164


Yes, that should be fixed. In the meantime it can be avoided by using a fallback value:

eg Dear [NAME%%Friend]

michiel

02-07-15 20:37

manager   ~0056270

https://github.com/phpList/phplist3/commit/b6ed79eb393752b4e22ac618111cb671532e56f7