Issue: Variable interpolation is not working in array/list for placeholder
Mikescops opened this issue · comments
Describe the bug
When using a default placeholder that is an array, the variables are not interpolated inside.
To Reproduce
Create a new field in your contenttype with the following:
{
"title": "aliases",
"name": "aliases",
"type": "list",
"default": [
"post/{{slug}}"
],
"hidden": true
}
You should get the following:
---
title: test-title
slug: test-title
aliases:
- post/{{slug}}
---
Expected behavior
The slug variable should be rendered properly.
---
title: test-title
slug: test-title
aliases:
- post/test-title
---
Note that using "default": "post/{{slug}}"
properly renders "default": "post/test-title"
so the problem is related to how array are managed.
Thanks, @Mikescops; this is indeed not yet supported, but let us make it happen! 💪
@Mikescops was added and is testable in the latest beta version.
@Mikescops was added and is testable in the latest beta version.
sounds like it broke the normal string interpolation 😓
![image](https://private-user-images.githubusercontent.com/4266283/304157494-f01b4c2e-b622-4585-a228-bca2739692e6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjIxMDUzOTMsIm5iZiI6MTcyMjEwNTA5MywicGF0aCI6Ii80MjY2MjgzLzMwNDE1NzQ5NC1mMDFiNGMyZS1iNjIyLTQ1ODUtYTIyOC1iY2EyNzM5NjkyZTYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcyNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MjdUMTgzMTMzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NTViYzdlNzg3YmJkMDM0YWE3MWU3NDA2NThlZmNjNGQ3NTgzMzQ1ZDNjMDAzYmIzMjdiMWQwZGY2N2EwNTRhMiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.fDUmEiqNk4lCYxTgd35TimTOkBta4l6jmznLJl_fhoE)
![image](https://private-user-images.githubusercontent.com/4266283/304157656-112c5ded-d793-4d37-9534-65a54c3b7e5c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjIxMDUzOTMsIm5iZiI6MTcyMjEwNTA5MywicGF0aCI6Ii80MjY2MjgzLzMwNDE1NzY1Ni0xMTJjNWRlZC1kNzkzLTRkMzctOTUzNC02NWE1NGMzYjdlNWMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcyNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MjdUMTgzMTMzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ODNmYmMwN2IwNWRiNGVhM2E1M2QwMWZjYTQyMTkxN2Y4MGVhNWQxNjc4ZWQyNTFjMWE4NDQ2ODFjZGY2Nzk4MiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.KbvMUva-9SEqvlGCaCBLWEOmzvHA6UfM3X--zf39Q10)
That is correct 🤦♂️, should be better with the new fix