Cannot save webhook when URL contains Twig tags
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 68/100
Hướng nghiên cứu
Start in the Control Panel at Webhooks > New Webhook and reproduce the save failure with the Twig-templated URL shown in the issue. Trace the URL validation used by the webhook form and add or update regression coverage for templated URLs; done means creating and editing the webhook succeeds without an “Invalid URL” error.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
When creating or editing a webhook in the Control Panel with a Twig-templated URL, saving the form fails with the validation error "Invalid URL".
Steps to reproduce
- In the Craft Control Panel, go to Webhooks > New Webhook (or edit an existing one).
- Set
Sender Classtocraft\elements\EntryandEvent NametoafterSave. - Set the URL to:
{{ siteUrl }}purge/{{ event.sender.uri }} - Click Save.
Expected Result
The webhook is saved successfully.
Actual Result
Form saving fails with the error:
Invalid URL.
Additional info
- Craft version: 5.x
- PHP version: 8.2+
- Database driver & version: MySQL 8.0.46
- Plugins & versions: 3.3.0
- Ngôn ngữ chính
- PHP
- Star
- 84
- Fork
- 12
- Merge trung bình
- 1 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 5
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của craftcms/webhooks
-
bug repo:webhooks
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 56/100
-
bug repo:webhooks
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
-
bug repo:webhooks
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
-
bug repo:webhooks
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
-
bug repo:webhooks
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Tất cả issue của craftcms/webhooks
Issue tương tự
-
Document lexicon.default.userconfig and lexicon.default.userconfig.enforced in config.sample.phpĐang mởenhancement feature: settings good first issue
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
nextcloud/integration_openai#480 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
a11y
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
omeka/plugin-Contribution#84 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
recca0120/vscode-phpunit#620 ·
Maintainer thường phản hồi trong vòng 1 ngày