DP-45938-Restrict-“Map”-Field-on-Organization-Pages-to-Location-Content-Types-Only - #3452
Open
jarielrrz wants to merge 8 commits into
Hidden character warning
The head ref may contain hidden characters: "feature/DP-45938-Restrict-\u201cMap\u201d-Field-on-Organization-Pages-to-Location-Content-Types-Only"
Conversation
…Organization-Pages-to-Location-Content-Types-Only
dstorozhuk
requested changes
Jul 19, 2026
dstorozhuk
requested changes
Jul 19, 2026
dstorozhuk
left a comment
Collaborator
There was a problem hiding this comment.
Follow-up on the tests (see also the #[Hook] suggestion above).
Comment on lines
+66
to
+73
| /** | ||
| * Assert the service page Layout Paragraphs path rejects non-locations. | ||
| * | ||
| * Service pages edit the Map field through the Layout Paragraphs component | ||
| * form, whose #validate handler calls validateLayoutParagraphForm(). This | ||
| * exercises that path directly with both invalid and valid references. | ||
| */ | ||
| public function testServicePageLayoutParagraphsPathRejectsNonLocationReference(): void { |
Collaborator
There was a problem hiding this comment.
This test doesn't actually exercise the service-page path it's named after — it hand-builds a FormState and calls the validator service directly, so it keeps passing even if the case 'org_locations': wiring in mass_validation_form_layout_paragraphs_component_form_alter() is deleted or the LP component form's value structure changes. The only wiring it verifies is the services.yml registration.
Options:
- Upgrade it to a real LP component-form test — there's a ready-made template in this module:
tests/src/ExistingSiteJavascript/CollectionSearchValidationLayoutParagraphsTest.php(drives the LP modal on a service_page, submits an invalid value, asserts the error in the dialog). - Or rename it (e.g.
testValidatorServiceRejectsNonLocationReference) so it doesn't read as end-to-end coverage. - If the
#[Hook]/#validate_referenceapproach is adopted instead, this test can simply be dropped — the org_page browser test above already proves the widget-level validation fires.
…Organization-Pages-to-Location-Content-Types-Only
…Organization-Pages-to-Location-Content-Types-Only
dstorozhuk
approved these changes
Aug 3, 2026
…Organization-Pages-to-Location-Content-Types-Only
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Restrict Map fields on Organization and Service pages to Location content.