• I don’t have a word press installation, I’ve just observed this in live use. Sometimes the google-hilite plugin completely obliterates the text, replacing it with PHP error messages like this one:
    Warning: Unknown modifier ‘/’ in /homepages/36/d91638709/htdocs/scp/wp-content/plugins/google-hilite.php on line 107
    Warning: Unknown modifier ‘\’ in /homepages/36/d91638709/htdocs/scp/wp-content/plugins/google-hilite.php on line 105
    Looking at the source, it is on those lines that the actual highlighting action is occuring. I got those errors by entering “string can phone” into google and hitting “I’m feeling lucky”. I’ve seen very similar messages for search terms that include forward slashes in them. The slashes get used unescaped in the search terms, which get passed to the preg_replace() function. I don’t exactly know what gets put in $term with the lucky search.
    I don’t think the “perl compatible” regular expressions are 100% perl compatable, or else you might be able to run code with a well formed search term.
    I can’t get the textism google hilite to do anything (the wp version says it is based on it), so I don’t know if the bug is new or just passed on.

Viewing 9 replies - 1 through 9 (of 9 total)
  • <bump>
    I am getting this error on some google search strings:
    Warning: Unknown modifier 'r' in /home/public_html/plastic/wp-content/plugins/google-hilite.php on line 107
    The search that produced this was “pictures of trash/rubbish” I expect the “/” and its immediate proximity to the “r” is the problem.

    This patch will fix it.

    Thanks rboren

    AuntiAlias

    (@auntialias)

    @ryan

    Thanks for the note about the patch. I just upgraded to WP 1.5 and what with one thing and another, got that error on line 105 mentioned in this thread. That and google got me to this discussion thread.

    I looked at my copy of google-highlight.php file and it’s version 1.2 of the plugin, whereas the code you linked to was the difference between 1.5 and 1.6.

    I’m off to go find a fresh, clean copy of the latest version. (Just checked, and google-highlight isn’t included with WP 1.5)

    Oh wait a second. I just found this at the plugins site, downloaded the file from the filelink google-highlight/trunk/google-highlight.php, and that’s version 1.2, too. (not 1.5 or 1.6 as previously mentioned in previous link) I did a find differences between that and the 1.2 that I already have, and BBEdit found 6 places where they differ from one another.

    So, should I replace my version 1.2 with the version 1.2 contained in link I just mentioned?

    AuntiAlias

    (@auntialias)

    !bump!

    Moderator James Huff

    (@macmanx)

    Yes, use the v1.2 (rev204) copy.

    AuntiAlias

    (@auntialias)

    Thanks. ::Thwaps communicator button:: On my way!

    Hmm, I seem to be having different problems to the ones mentioned.

    Firstly, I needed to add:
    add_filter('the_excerpt', 'hilite');
    to the end of the script, as I did for other plugins, because it was not being activated on the main search page – just when viewing a single post.

    But the problem I still have is that no search terms are highlighted when I first search for a word. When I repeat the same search, the words are highlighted as expected. Weird!

    Using WordPress 1.5

    Any ideas?

    ahem… *bump*

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘google-hilite bugs’ is closed to new replies.