decap-cms icon indicating copy to clipboard operation
decap-cms copied to clipboard

Only date('format') filter in Summary String Transformations work. All others are broken.

Open mimecine opened this issue 1 year ago • 4 comments
trafficstars

Describe the bug

The only filter that seems to work in the summary is the date one. All others are inert.

To Reproduce summary = "{{ title | upper }} / {{ title | lower }} / {{ title | truncate(3) }} / {{ nonexistant | default('Hello') }} / {{mytruth | ternary('Yep','Nope') }} / {{today | date('yyyy') }}" yields Title / Title / Title / / / 2024 Booleans don't display at all whether true or false (might be expected tho)

Expected behavior TITLE / title / Tit / Hello / Yep / 2024

Applicable Versions:

  • Decap CMS version: 4.3.0
  • Git provider: Github
  • OS: MacOS latest
  • Browser version: Chrome latest

Additional context Booleans don't display at all whether true or false (might be expected tho)

mimecine avatar May 30 '24 14:05 mimecine

With further investigation, I realize that it's a matter of spaces, but only if it's written like {{var | filter}} not as {{var | filter }} <- note the space at the end.

The ternary filter is sensitive about spacing before an argument.

Chaining filters doesn't work.

mimecine avatar May 30 '24 15:05 mimecine

Hi, is someone is working on it or should I take it.

Tarun1406 avatar Sep 24 '24 18:09 Tarun1406

@Tarun1406 are you working on this?

martinjagodic avatar Oct 17 '24 08:10 martinjagodic

Sorry I think I can't i got a little busy in office work. Sorry

On Thu, Oct 17, 2024, 2:14 PM Martin Jagodic @.***> wrote:

@Tarun1406 https://github.com/Tarun1406 are you working on this?

— Reply to this email directly, view it on GitHub https://github.com/decaporg/decap-cms/issues/7221#issuecomment-2418929219, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUHKBKBYGCLAZUBKC26F4STZ352FRAVCNFSM6AAAAABIRBTSJOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJYHEZDSMRRHE . You are receiving this because you were mentioned.Message ID: @.***>

Tarun1406 avatar Oct 17 '24 09:10 Tarun1406