-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Forms: Set "Disable search indexing" as enabled by default #15255
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
Forms: Set "Disable search indexing" as enabled by default #15255
Conversation
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.
👍
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.
This is great, but @andersonjeccel can we add one of your wonderful help tooltips to explain what this actually does (it prevents the form URL from being indexed in search engines) - can do that in another PR. Thanks!
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## 7.x #15255 +/- ##
=========================================
Coverage 66.64% 66.65%
+ Complexity 35046 35045 -1
=========================================
Files 2300 2299 -1
Lines 141364 141372 +8
=========================================
+ Hits 94210 94226 +16
+ Misses 47154 47146 -8
🚀 New features to boost your workflow:
|
Description
This PR implements the request from issue #15244 to set "Disable search indexing" as enabled by default for new forms while keeping the toggle visible for user control.
Changes Made
Form.php
): SetnoIndex = true
by default in constructor for new formsFormType.php
): Keep the toggle visible but show it as enabled by defaultFormTest.php
): Updated test expectations to match new default behaviorBenefits
Testing Instructions
<meta name="robots" content="noindex">
ddev exec composer test -- app/bundles/FormBundle/Tests/Entity/FormTest.php
Implementation Details
noIndex = true
(search indexing disabled)