I have an integer field with a default max length of 10 chars/digits. I can't use the nice [node:updated-date] (or whatever) token because it breaks this limit.

My scenario is with views bulk operations to update a field to contain the last updated date of the node.

I believe tokens should be responsible to disable field validation when tokens is active on a page? Correct me if I'm wrong... should VBO be responsible for stating which fields should be token enabled?

FYI, I have the latest everything installed (I believe)

Comments

rofsky’s picture

I have the same issue. +1

Dave Reid’s picture

Project: Token » Views Bulk Operations (VBO)
Version: 7.x-1.2 » 7.x-3.x-dev
Component: Code » Core
Priority: Major » Normal

Seems like the actual issue here is with VBO and not token? Token doesn't do anything about any kind of size limits for fields.

dynamicdan’s picture

Project: Views Bulk Operations (VBO) » Token
Version: 7.x-3.x-dev » 7.x-1.2
Component: Core » Code

The problem here is that if tokens are going to be enabled for a field then tokens should somehow also understand the field restrictions and remove them. If the token module wasn't enabled then VBO would have correct and valid validation on it's fields. IMO the token module is responsible for ensuring it will work when displayed to the user.

The other perspective may be that a module wanting to allow integration with tokens should make it easy. I don't think we can expect that all modules should provide custom integration with token. I'm assuming that Token is an extension.

Dave Reid’s picture

Status: Active » Postponed (maintainer needs more info)

But the key here is Token doesn't actually do *anything* with field values. It only handles tokens in field description help text. Nothing what soever in the token module does anything with field values.

dynamicdan’s picture

Status: Postponed (maintainer needs more info) » Active

True..

I am suggesting Token should do something with the field. No point showing Token options if none of the fields allow them.
Eg, all inputs restricted to integer only and so I can't use my [node-field-phone] token because I can only enter numbers.
Token should remove input restrictions and allow me to use any token... Perhaps somewhere on the server side an error could be thrown if after replacement the validation of the value fails.

This will become a growing problem with D8 and mobile support I believe.

Dave Reid’s picture

Status: Active » Postponed (maintainer needs more info)

You are not understanding me. Token does *nothing* to allow tokens to be used in field values, hence it's not responsible for *anything* because *it didn't add anything to begin with*.

Edit: confused fields and tokens.

Dave Reid’s picture

The module *responsible* for allowing tokens to be used in field values should be the one to also allow longer input if desired, which likely is VBO.

Dave Reid’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

Marking as cannnot fix based on #6 and #7.