This project is read-only.

Error in tokenizer replace method after upgrading to 1.x branch

Topics: Customizing Orchard, Troubleshooting
Jun 22, 2013 at 5:15 AM
Hi ,

I was working on orchard 1.6.1 but yesterday I updated the repository and synced to 1.x branch. Now I have started getting following exception when i use any filters in projections which uses any tokens.

"The best overloaded method match for 'Orchard.Tokens.ITokenizer.Replace(string, object, Orchard.Tokens.ReplaceOptions)' has some invalid arguments"

I have checked in debugger that correct values are being passed.
Filter code
var ids = (string)_tokenizer.Replace(context.State.ContentIds, null, new ReplaceOptions { Encoding = ReplaceOptions.NoEncode });
I am using content filter based on Ids available in module.

Please help.
Jun 22, 2013 at 4:39 PM
Hmm, so you are using the very latest 1.x? Because yesterday I tested the exact same filter and there was no issue, though with an about 1 month old 1.x version. Also note that I later learned that values in the Projector filter context are tokenized automatically, i.e. there is no explicit tokenization required: I removed that from the latest source of Helpful Libraries.
Jun 23, 2013 at 2:17 AM
Thanks, Piedone.

Removing the _tokenizer.Replace code from filter worked as you said there is no explicit tokenization required.