Closed (won't fix)
Project:
Webform
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
21 Jun 2011 at 01:12 UTC
Updated:
23 Aug 2014 at 13:31 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
damienmckennaPatches for D6 and D7 to add a new 'webform_search_index' variable which defaults to 1, i.e. all content indexed.
Comment #2
damienmckennaComment #3
damienmckennaUpdated patches that fix a major #facepalm-worthy bug - I wasn't checking the node's build mode so webforms were *always* being enabled/disabled based on the variable.
Comment #4
quicksketchThis sounds like a reasonable option to me. Though "Index webform data" is a poor name in my opinion. That makes it sounds like the data submitted into the webform would be indexed. How about "Index webform forms"? Also we only need the checkbox if search module is enabled right? Also I don't think D6 has $node->build_mode, could you confirm?
Comment #5
damienmckennaPatches for D6 and D7 enclosed.
Comment #6
damienmckennaFor anyone who needs it, a patch for the 6.x-2.x branch to implement this functionality.
Comment #7
quicksketchIn my testing I cleaned up this patch to suit my taste (using #access instead of an IF statement, code comments), but I found that this patch doesn't work in Drupal 7. Drupal 7 does not have the NODE_BUILD_SEARCH_INDEX constant at all, it uses $node->build_mode = 'search_index' instead.
I've updated the patches and committed them as attached to this comment.
Comment #8
damienmckennaThanks quicksketch!
Comment #10
effulgentsia commentedIs the new setting really needed? Webform module already implements webform_field_extra_fields(), so the administrator can remove the webform from the seach index by going to Manage Display for the content type (e.g., the Webform one by default, or one of the others for which webform is enabled), choosing to customize the "search index" view mode, and hiding the webform "extra field". While arguably the "Manage Display" UI has some discoverability problems, at least it's a common pattern, that once learned, can be used to manage display of other things attached to content, and for other purposes than just search index.
Is this description true? Does "Webform nodes" refer to nodes of type "Webform", or nodes of any type for which webforms are enabled? What if using Manage Display, you hide the webform "extra field" from the search index for one webform type, but not another? I don't think this checkbox overrides (or should override) that choice. For these reasons, I think it would make sense to remove this checkbox and just defer to the Manage Display UI.
Comment #11
quicksketchThanks @effulgentsia I think you're right on all counts. The change makes sense in Drupal 6 (I'm guessing that's what it was originally written for), since hook_content_extra_fields() doesn't affect display in Drupal 6.
The latter is true, though for most sites "Webform nodes" and "Webform enabled content types" are the same thing, since most sites just leave Webform as the only Webform-enabled type.
So in short we should do two things:
- Remove the option from Drupal 7
- Leave the option in D6 but clarify its description
(That said, I wish this would have been opened as a separate ticket. I don't like fixing bugs in issues for "feature requests".)
Comment #12
danchadwick commentedRe 6.x: There won't be further feature development in the X.x-3.x branches.
Re 7. Closing for lack of activity on a minor wording ambiguity.