Tag condition not respecting default value

オープン
#15,735 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
58/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
laravel, php
領域
backend

調査の方向性

Start by tracing how the collection tag applies field conditions and where blueprint defaults are made available to entries. Reproduce with an unsaved entry whose toggle defaults to true, then compare the condition result before and after saving it. Done when the tag returns entries matching the default value before they are explicitly saved.

索引モデルが issue の本文から書いたものです。

説明

Bug description

I have a bunch of entries and I added a toggle to their blueprint. The default value for the toggle is true.

I use the following code:

{{ collection:my_collection my_toggle:is="true" }}

And none of the entries show up, they have to be explicitly saved with the new blueprint.

How to reproduce
  1. Create entries for some collection.
  2. Add a toggle field to the blueprint with a default of true (or perhaps some other field).
  3. Fetch the entries based on the default value of the field using the collection tag.
  4. See none of the entries show up.
  5. Save entries.
  6. See the entries show up.
Logs

Environment
Environment
Laravel Version: 13.39.0
PHP Version: 8.5.12
Composer Version: 2.10.3
Environment: local
Debug Mode: ENABLED
Maintenance Mode: OFF
Timezone: UTC
Locale: en

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: log
Cache: file
Database: sqlite
Logs: stack / single
Mail: smtp
Queue: sync
Session: file

Storage
public/storage: NOT LINKED

Statamic
Addons: 7
License Key: Set
Sites: 1
Stache Watcher: Enabled (auto)
Static Caching: Disabled
Version: 6.38.0 PRO

Statamic Addons
keyagency/statamic-asset-usage: 1.7.0
rias/statamic-color-swatches: 3.1.1
statamic-rad-pack/mailchimp: 6.2.5
statamic-rad-pack/shopify: 8.0.0
studio1902/statamic-peak-commands: 11.1.1
studio1902/statamic-peak-seo: 11.9.3
studio1902/statamic-peak-tools: 9.2.3
Installation

Starter Kit using via CLI

Additional details

No response

主要言語
PHP
スター
4.9k
フォーク
647
平均マージ
21時間 3分
マージ済み PR(30日)
128

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

statamic/cms のほかの issue

statamic/cms の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。