Closed (fixed)
Project:
Drupal core
Version:
4.7.2
Component:
search.module
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
24 Jul 2006 at 20:04 UTC
Updated:
5 Oct 2006 at 12:00 UTC
Hallo,
I have a problem with the search module. The search displays javascript code from my little extra pages which I call by require_once().
Is that a bug of the search.module?
How can I exclude certain nodes from being indexed or - better - make the module ignoring javascript code?
I searched the forums and the whole drupal site but couldn't find any real help to this. (There is also one similar (and open) request on this issue: http://drupal.org/node/55971)
I would be very thankful for help.
thanks in advance
Comments
Comment #1
magico commentedIt's strange. Javascript is a theme thing, while the search uses the node content to generate it's index.
Where are you putting your javascript code?
Comment #2
hausig commentedHi, thanks a lot for your reply.
I kind of solved the problem.
?) Now, I put the javascript in an extra file xyz.js and call the required functions in a html script by using:First, I put the javascript in one of my own html scripts (in front of a form) directly. (They are called by require_once('xyz') from a Durupal page/node. That caused the search to index the javascript, too. (Actually, the search does not index html but javascript. Is it possible that the search recognizes html code to exclude from indexing but not code between other tags like "
. Now, the problem seems to be solved.
Comment #3
magico commentedAh I now understand. Anyway, the solution you used for last is the best one because we should always put javascript in separated files: for gracefull downgrade to browsers that do not support it and also for better re-use of javascript files (that will be cached by any browser).
I will mark this as fixed, and anyone that wants to use javascript should always use a separated file that will do dynamic attach to HTML document elements.
Comment #4
(not verified) commented