TopShelfCraft / Wordsmith

A plugin for Craft CMS to help you manage and manipulate text.
Other
30 stars 20 forks source link

Unknown argument "words" for filter "hacksaw(unit, limit, allowed_tags, append) #2

Closed michaelrog closed 6 years ago

michaelrog commented 6 years ago

Originally posted by @shantamg:


I had been using the hacksaw plugin with Craft 2 and was doing this:

hacksaw(words='30')

After upgrading to Craft 3 and installing Wordsmith, Craft raises raises an unknown argument error. It's an easy fix, just need to change it to

hacksaw(unit='words', limit='30')

but I thought I'd mention it because this a case where Wordsmith is not backwards compatible with hacksaw.

michaelrog commented 6 years ago

Thanks for catching this! We should definitely add some param normalization there for backwards compatibility.

shantamg commented 6 years ago

Well, one thing I just realized when trying to help solve the issue is that the version of Hacksaw that I am using is 1.1.2, which I just realized is a different repo from the latest version of hacksaw.

That's pretty confusing because I never got a notice in the craft updates so I was unaware.

From what I can tell, Hacksaw 2.x syntax changed to be more like what is supported here so perhaps this is moot.

I would just say that others in my situation (installed craft_hacksaw before it stopped being maintained) may not know there is a new version.

Perhaps @ryanshrum is interested in this?