In rules and entity tokens the text property is broken, like
[node:message-ref:text]

Googlefood: Also we get a warning trace like

Warning: call_user_func() expects parameter 1 to be a valid callback, no array or string given in EntityValueWrapper->value() (line 259 of .../sites/all/modules/entity/includes/entity.wrapper.inc). 
Backtrace:
call_user_func(1, 'Some message text') entity.wrapper.inc:259
EntityValueWrapper->value(Array) entity_token.tokens.inc:329
_entity_token_get_token(Object, Array) entity_token.tokens.inc:184
entity_token_tokens('message', Array, Array, Array) 
call_user_func_array('entity_token_tokens', Array) module.inc:934
module_invoke_all('tokens', 'message', Array, Array, Array) token.inc:178
token_generate('message', Array, Array, Array) entity_token.tokens.inc:208
entity_token_tokens('message', Array, Array, Array) 
call_user_func_array('entity_token_tokens', Array) module.inc:934
module_invoke_all('tokens', 'message', Array, Array, Array) token.inc:178
token_generate('message', Array, Array, Array) token.inc:87
token_replace('Angenommen: [message:field-moderation-request:text]', Array, Array) message.message.inc:198
Message->getText(NULL, Array) message_handler_field_message_render.inc:81
message_handler_field_message_render->render(Object) views_handler_field.inc:1041
CommentFileSizeAuthor
text-sanitized.patch535 bytesnicola85
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nicola85 created an issue. See original summary.

geek-merlin’s picture

Version: 7.x-1.10 » 7.x-1.x-dev
geek-merlin’s picture

Title: Use 'sanitized' instead of 'sanitize' » Text property broken
Priority: Normal » Major
Issue summary: View changes

Added description and raised prio to major as this makes a central thing of this module unusable.

geek-merlin’s picture

Status: Active » Patch (to be ported)

Above patch fixes this.

geek-merlin’s picture

Status: Patch (to be ported) » Reviewed & tested by the community
torgosPizza’s picture

Any chance of this patch getting committed?

geek-merlin’s picture

@torgosPizza: does it work for you too?

jacob.embree’s picture

The patch is correct. See https://cgit.drupalcode.org/entity/tree/entity.api.php for sanitize and sanitized.

jacob.embree’s picture

The GitHub issue for this is https://github.com/Gizra/message/pull/155.

bluegeek9’s picture

Status: Reviewed & tested by the community » Closed (outdated)