There are a few issues with the selection of node types and cck fields in the attachments section of the Search by Page settings (admin/settings/search_by_page/general).

  • It's possible to select a CCK field without selecting a node type and save the form - however search_by_page will not index any files if you do this
  • Once you have selected a node type or cck field it is not possible to select none however it is possible to save the settings page with nothing selected in these two fields
  • Shouldn't the list of CCK fields be limited to filefields? This list could get massive on a big site

Comments

jhodgdon’s picture

Thanks for reporting this! I'm numbering these issues for future reference:

1) It's possible to select a CCK field without selecting a node type and save the form - however search_by_page will not index any files if you do this

Good point, will figure out how to make this better.

2) Once you have selected a node type or cck field it is not possible to select none however it is possible to save the settings page with nothing selected in these two fields

Good point, will figure out how to make this better.

3) Shouldn't the list of CCK fields be limited to filefields? This list could get massive on a big site.

The reason I didn't limit to FileField is that it's possible to create fields derived from FileField that are not named FileField, but work the same way and still store attachments. I have created such fields numerous times for clients who needed a "file plus some other stuff" field. But probably there is a way to detect this type of field besides the name (such as that it has an fid (file ID) database column); I'll look into it.

jhodgdon’s picture

Regarding point 2: Once you have selected a node type or cck field it is not possible to select none however it is possible to save the settings page with nothing selected in these two fields

Actually, it is possible. On Windows, you can use the control-key and click an item and you will un-select it. At least in Firefox. The method for doing that is browser-dependent, but it should be possible in any browser.

alexpott’s picture

You're right on point 2... but it's not very transparent... just thinking out loud here but would checkboxes be a better solution than the select lists? The ctrl + click for multiple values isn't so fantastic.

jhodgdon’s picture

Check boxes are generally not recommended in user interfaces for more than 5-7 choices. Given that many sites have many more than 7 content types, a multiple-select box is the right answer, I think. I am revising the help text in that section though, to make everything more clear (hopefully).

jhodgdon’s picture

OK, I've checked in fixes for this issue. Again, thanks for reporting it!

1) I updated the help text on the set-up screen, so it makes it clear you need to select at least one content type if you want anything to be indexed.

2) I updated the help text on the node and CCK field boxes so it tells you how to un-select and multiple-select.

3) I limited the CCK fields shown to those that the module could actually index (i.e. anything that "looks like a FileField", meaning that it has an fid database column). This should keep the noise down.

All of these changes are checked into the 6.x-1.x-dev branch now.

Did I mention that I really appreciate your testing and issue reporting efforts alexpott? :)

jhodgdon’s picture

Status: Active » Needs review
jhodgdon’s picture

Status: Needs review » Fixed

This is now released in version 6.x-1.2 of Search by Page.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.