Possible bug in group fieldtype validation
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start by comparing the submitted request with the entry blueprint, especially the two nested groups that each define a required link field. Reproduce the save with both links set to the same value and inspect how group field validation handles those repeated keys. Done means both submitted values are preserved and the required validation message is not shown incorrectly.
索引モデルが issue の本文から書いたものです。
説明
Bug description
When trying to save my entry, an invalid missing field message is shown. I am using an entry containing a group "hero" with 2 field groups named: hero_card_left and hero_card_right. Which both hold call to action properties. In this case upon saving this group with 2 of the same value for link. The value is left empty when submitting the form and thus the required message is shown.
Using the same value 'test.nl' for Link
Portion of the request send to form handler. The first link value is set to null even though I set it to test.nl.
How to reproduce
- Create an Entry
- Add a field group
- Add 2 groups (left or right) inside that group with the same keys
- Use the same value for in this case 'Link'
Logs
Full request send to form handler:
{"title":"Home","hero":{"title":"WIJ ZIJN ER VOOR JOU","text":[{"type":"paragraph","attrs":{"textAlign":"left"},"content":[{"type":"text","text":"Heb je vragen of wil je gewoon iets leuks doen? Bij JOU allerlei activiteiten. Doe je mee?"}]}],"image":[],"call_to_action_1":{"label":"Onze diensten","link":"/wat-wij-doen","icon":null},"call_to_action_2":{"label":"Neem contact op","link":"/contact","icon":null},"hero_card_left":{"title":"ANTWOORD OP JOU VRAGEN","text":[{"type":"paragraph","attrs":{"textAlign":"left"},"content":[{"type":"text","text":"Heb je vragen of zit je ergens mee? Onze jongerenwerkers helpen je graag."}]}],"link":null,"image":[]},"hero_card_right":{"title":"EXPOSED?!","text":[{"type":"paragraph","attrs":{"textAlign":"left"},"content":[{"type":"text","text":"Spannende berichten of foto's naar elkaar sturen kan ontzettende leuk en spannend zijn, maar wat als het mis gaat?"}]}],"link":"test.nl","image":[]}},"content":[],"internal_name":null,"slug":"home","parent":[],"seo":{"enabled":true,"title":{"source":"inherit","value":null},"description":{"source":"inherit","value":null},"site_name":{"source":"inherit","value":null},"site_name_position":{"source":"inherit","value":null},"site_name_separator":{"source":"inherit","value":null},"canonical_url":{"source":"inherit","value":null},"robots":{"source":"inherit","value":[]},"image":{"source":"inherit","value":null},"twitter_handle":{"source":"inherit","value":null},"sitemap":{"source":"inherit","value":null},"priority":{"source":"inherit","value":null},"change_frequency":{"source":"inherit","value":null}},"published":true,"id":"4700982b-5705-4ff1-a364-b19da7f0872c","_blueprint":"homepage_jou","_localized":["title","hero","updated_at"]}
Full entry blueprint:
title: 'Homepagina (JOU)'
tabs:
main:
display: Main
sections:
-
fields:
-
handle: title
field:
type: text
required: true
localizable: true
validate:
- required
-
handle: hero
field:
type: group
display: Hero
localizable: true
fields:
-
handle: title
field:
type: text
display: Titel
localizable: true
validate:
- required
-
handle: text
field:
save_html: true
remove_empty_nodes: false
type: bard
display: Text
localizable: true
validate:
- required
-
handle: image
field:
max_files: 1
container: uploads
type: assets
display: Afbeelding
localizable: true
-
handle: call_to_action_1
field: call_to_action_fieldset.call_to_action_optional
config:
display: 'Call to action 1'
-
handle: call_to_action_2
field: call_to_action_fieldset.call_to_action_optional
config:
display: 'Call to action 2'
-
handle: hero_card_left
field:
type: group
display: 'Hero card (links)'
localizable: true
fields:
-
handle: title
field:
type: text
display: Titel
localizable: true
validate:
- required
-
handle: text
field:
save_html: true
remove_empty_nodes: false
type: bard
display: Tekst
localizable: true
validate:
- required
-
handle: link
field:
type: link
display: Link
localizable: true
validate:
- required
-
handle: image
field:
max_files: 1
container: uploads
type: assets
display: Afbeelding
localizable: true
-
handle: hero_card_right
field:
type: group
display: 'Hero card (rechts)'
localizable: true
fields:
-
handle: title
field:
type: text
display: Titel
localizable: true
validate:
- required
-
handle: text
field:
save_html: true
remove_empty_nodes: false
type: bard
display: Tekst
localizable: true
validate:
- required
-
handle: link
field:
type: link
display: Link
localizable: true
validate:
- required
-
handle: image
field:
max_files: 1
container: uploads
type: assets
display: Afbeelding
localizable: true
-
handle: content
field:
type: replicator
display: Inhoud
localizable: true
sets:
fieldsets:
display: Fieldsets
sets:
call_to_action_section:
display: 'Call to action sectie'
fields:
-
handle: call_to_action_section
field: sections.call_to_action_section
text_section:
display: 'Tekst sectie'
fields:
-
handle: text_section
field: sections.text_section
text_and_image_section:
display: 'Tekst en afbeelding sectie'
fields:
-
handle: text_and_image_section
field: sections.text_and_image_section
video_section:
display: 'Video sectie'
fields:
-
handle: video_section
field: sections.video_section
faq_section:
display: 'FAQ sectie'
fields:
-
handle: faq_section
field: sections.faq_section
location_section:
display: 'Locatie sectie'
fields:
-
handle: location_section
field: sections.location_section
slider_section:
display: 'Slider sectie'
fields:
-
handle: slider_section
field: slider_section.slider_section
-
handle: internal_name
field: internal_name.internal_name
config:
localizable: true
visibility: read_only
sidebar:
display: Sidebar
sections:
-
fields:
-
handle: slug
field:
type: slug
localizable: true
validate: 'max:200'
-
handle: parent
field:
type: entries
collections:
- pages
max_items: 1
listable: false
localizable: true
query_scopes:
- only_root_scope
create: false
SEO:
display: SEO
sections:
-
fields:
-
handle: seo
field:
type: seo_pro
listable: false
display: SEO
localizable: true
Environment
Environment
Application Name: Stichting PK
Laravel Version: 12.20.0
PHP Version: 8.4.6
Composer Version: 2.8.8
Environment: dev
Debug Mode: ENABLED
URL: stichting-pk-backend.e-container.nl
Maintenance Mode: OFF
Timezone: UTC
Locale: nl
Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED
Drivers
Broadcasting: log
Cache: file
Database: mariadb
Logs: stack / single
Mail: smtp
Queue: sync
Session: file
Storage
public/storage: NOT LINKED
Sentry
Enabled: MISSING DSN
Environment: dev
Laravel SDK Version: 4.15.1
PHP SDK Version: 4.14.2
Release: NOT SET
Sample Rate Errors: 100%
Sample Rate Performance Monitoring: NOT SET
Sample Rate Profiling: NOT SET
Send Default PII: DISABLED
Statamic
Addons: 3
Sites: 5 (Stichting PK, U Centraal, Jou Utrecht, Mantelzorg Utrecht, Geld en recht)
Stache Watcher: Disabled (auto)
Static Caching: Disabled
Version: 5.60.0 PRO
Statamic Addons
statamic-rad-pack/runway: 8.5.2
statamic/eloquent-driver: 4.29.1
statamic/seo-pro: 6.7.0
Statamic Eloquent Driver
Asset Containers: file
Assets: eloquent
Blueprints: file
Collection Trees: eloquent
Collections: file
Entries: eloquent
Forms: file
Global Sets: eloquent
Global Variables: eloquent
Navigation Trees: eloquent
Navigations: file
Revisions: eloquent
Sites: file
Taxonomies: file
Terms: file
Tokens: eloquent
Installation
Fresh statamic/statamic site via CLI
Additional details
No response
- 主要言語
- PHP
- スター
- 4.9k
- フォーク
- 647
- 平均マージ
- 1日 9時間
- マージ済み PR(30日)
- 102
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
statamic/cms のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
assets
難易度 2/5 1〜3時間 初心者へのやさしさ 65/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 日以内に返信
似ている issue
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100
smarty-php/smarty#1215 ·
-
sync-en
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
sync-en
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 4 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
ProfessionalWiki/NeoWiki#1637 ·
メンテナーはふだん 1 日以内に返信