False positive Antlers logging
维护者通常 1 天内回复
@JohnathonKoster 已经在做这个了。
开始于 2026年2月19日。
评估
这个 Issue 还没有评估数据。
描述
Bug description
On one site we have 2 fields that consistently produce debug error messages:
[2026-02-18 11:56:45] production.DEBUG: Cannot render an array variable as a string: {{ view_all_link }} {"line":8,"file":"/home/forge/alaskapac.org/resources/views/livewire/centertix-events.antlers.html"}
[2026-02-18 11:56:46] production.DEBUG: Cannot render an array variable as a string: {{ heading }} {"line":7,"file":"/home/forge/alaskapac.org/resources/views/livewire/centertix-events.antlers.html"}
view_all_link is a Link field and heading is a Select field.
I believe the issue comes from this code in NodeProcessor.php:
if ($this->isInterpolationProcessor == false && $this->isLoopable($value) && $node->isClosedBy == null) {
if ($this->shouldReportArrayToStringWarning()) {
$varName = $node->name->getContent();
Log::debug("Cannot render an array variable as a string: {{ {$varName} }}", $this->getErrorLogContext($node));
}
I believe that the Link and Select field return true from isLoopable and therefore an error is logged even though nothing is actually wrong.
How to reproduce
Can't reproduce this locally, sorry.
Logs
[2026-02-18 11:49:08] production.DEBUG: Cannot render an array variable as a string: {{ view_all_link }} {"line":14,"file":"/home/forge/alaskapac.org/resources/views/livewire/centertix-events.antlers.html"}
[2026-02-18 11:54:14] production.DEBUG: Cannot render an array variable as a string: {{ view_all_link }} {"line":14,"file":"/home/forge/alaskapac.org/resources/views/livewire/centertix-events.antlers.html"}
[2026-02-18 11:56:44] production.DEBUG: Cannot render an array variable as a string: {{ view_all_link }} {"line":8,"file":"/home/forge/alaskapac.org/resources/views/livewire/centertix-events.antlers.html"}
[2026-02-18 11:56:45] production.DEBUG: Cannot render an array variable as a string: {{ view_all_link }} {"line":8,"file":"/home/forge/alaskapac.org/resources/views/livewire/centertix-events.antlers.html"}
[2026-02-18 11:56:46] production.DEBUG: Cannot render an array variable as a string: {{ heading }} {"line":7,"file":"/home/forge/alaskapac.org/resources/views/livewire/centertix-events.antlers.html"}
Environment
Environment
Application Name: Alaska PAC
Laravel Version: 11.48.0
PHP Version: 8.3.30
Composer Version: 2.9.3
Environment: local
Debug Mode: ENABLED
URL: alaskapac.test
Maintenance Mode: OFF
Timezone: America/Los_Angeles
Locale: en
Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED
Drivers
Broadcasting: null
Cache: redis
Database: mysql
Logs: stack / daily
Mail: smtp
Queue: redis
Session: file
Livewire
Livewire: v3.7.10
Statamic
Addons: 12
Sites: 2 (AlaskaPAC, CenterTix)
Stache Watcher: Enabled
Static Caching: Disabled
Version: 5.73.9 PRO
Statamic Addons
aryehraber/statamic-captcha: 1.16.0
edalzell/forma: 3.1.2
jacksleight/statamic-bard-mutator: 2.3.1
jacksleight/statamic-distill: 1.1.1
jonassiewertsen/statamic-external-link: 1.9.0
marcorieser/statamic-livewire: 4.5.3
statamic-rad-pack/typesense: 2.4.0
statamic/seo-pro: 6.11.7
transformstudios/events: 5.8.3
transformstudios/front: 3.1.2
transformstudios/review: 5.2.0
transformstudios/simple: 5.41.2
Installation
Fresh statamic/statamic site via CLI
Additional details
No response
- 主要语言
- PHP
- 星标
- 4.9k
- 派生
- 647
- 平均合并
- 1 天 19 小时
- 30 天内合并 PR
- 108
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
statamic/cms 的其他 Issue
-
preferences
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
accessibility
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
antlers
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复
-
caching nocache
难度 3/5 1-2 天 新手友好度 42/100
维护者通常 1 天内回复
相似的 Issue
-
sync-en
难度 1/5 1-3 小时 新手友好度 68/100
维护者通常 4 天内回复
-
Перевод устарел
难度 2/5 半天 新手友好度 62/100
-
feature request
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 1 天内回复
-
home php
难度 2/5 1-3 小时 新手友好度 62/100
vincent-peugnet/wcms#670 ·
-
难度 2/5 1-3 小时 新手友好度 62/100
freescout-help-desk/freescout#5731 · 1 条评论 ·
维护者通常 1 天内回复