-
Notifications
You must be signed in to change notification settings - Fork 21
Issue #3550601 by richardgaunt, fionamorrison23, joshua1234511: The "file_validate_is_image" plugin does not exist #1431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughIntroduces a centralized, dynamically computed list of allowed image extensions and applies it via shared validators (FileExtension and FileIsImage) to Logo and Footer background upload fields within the CivicTheme settings form. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Admin
participant Form as Settings Form
participant Validators as Upload Validators
participant ImageFactory as Image Factory
Admin->>Form: Open CivicTheme settings
Form->>ImageFactory: Get supported image extensions
ImageFactory-->>Form: Extensions list
Form->>Validators: Configure FileExtension + FileIsImage
Admin->>Form: Upload Logo/Footer image
Form->>Validators: Validate file
alt Valid
Validators-->>Form: Pass
Form-->>Admin: Save settings
else Invalid
Validators-->>Form: Fail
Form-->>Admin: Show error
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
web/themes/contrib/civictheme/src/Settings/CivicthemeSettingsFormSectionComponents.php(2 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
web/themes/contrib/civictheme/src/Settings/CivicthemeSettingsFormSectionComponents.php (1)
web/themes/contrib/civictheme/src/Settings/CivicthemeSettingsFormSectionBase.php (3)
form(77-77)toFriendlyFilePath(100-106)getDefaultFileScheme(114-116)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: build-and-push
- GitHub Check: build-and-push
- GitHub Check: commit
🔇 Additional comments (1)
web/themes/contrib/civictheme/src/Settings/CivicthemeSettingsFormSectionComponents.php (1)
88-90: Plugin IDs are correct
The plugin IDs 'FileExtension' and 'FileIsImage' match Drupal's File Validation constraint plugin definitions.
web/themes/contrib/civictheme/src/Settings/CivicthemeSettingsFormSectionComponents.php
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@joshua-salsadigital Thanks Josh tested, uploads are working again and the correct file extensions are being validated.
https://www.drupal.org/project/civictheme/issues/3550601
Checklist before requesting a review
Issue #123456 by drupal_org_username: Issue titleChangedsection about WHY something was done if this was not a normal implementationChanged
Screenshots
Summary by CodeRabbit