We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28159
    • 22 Posts
    PHP 5.2.6
    MySQL 4.1.22
    OS: Windows 2003 Server (IIS 6)
    MODx: 1.0.0
    AjaxSearch: 1.8.3

    So... I’m using AjaxSearch. I have a search form in my template (shows up fine), the search works, the results show up on the "results" page, results show up ugly (not yet CSS’d) but fine.

    Here’s the call being used to get the results:

    [!AjaxSearch? &ajaxSearch=`0` &AS_showForm=`0` &AS_descriptionShow=`0` &AS_breadcrumbsShow=`0`!]


    Problem occurs when I click on the link to the document in the results. That is, I search for "foo", I get the results of a page called "Foo Test", with the title linked to the actual "Foo Test" page.

    When clicking on the title, I get the following URL:

    http://www.g2n.be/modx/index.php?id=3&searched=red&advsearch=allwords&highlight=ajaxSearch_highlight+ajaxSearch_highlight1

    And the following error:

    « MODx Parse Error »
    MODx encountered the following error while attempting to parse the requested resource:
    « PHP Parse Error »

    PHP error debug
    Error: htmlentities() [function.htmlentities]: charset `latin1’ not supported, assuming iso-8859-1
    Error type/ Nr.: Warning - 2
    File: C:\domains\g2n.be\wwwroot\modx\manager\includes\document.parser.class.inc.php(746) : eval()’d code
    Line: 93

    Parser timing
    MySQL: 0.0020 s (5 Requests)
    PHP: 0.0319 s
    Total: 0.0340 s

    ------------
    What is confusing the hell out of me is that I cannot find out where it’s getting the "latin1" from. My MODx character set is utf8. My MySQL is utf8. The database is UTF8. The tables IN the database are all UTF8. I even did a complete backup of my MODx database and ran it through Notepad++ looking for the term "latin1". Nothing. It doesn’t appear in the entire file.

    Further, this problem only appears with highlighting enabled. If I change the code to this:

    [!AjaxSearch? &ajaxSearch=`0` &AS_showForm=`0` &highlightResult=`0` &AS_descriptionShow=`0` &AS_breadcrumbsShow=`0`!]

    It works just fine.

    Thinking, then, this was maybe related to the <body> problem with highlighting, I modified the plugin.searchHighlight.tpl as suggested in this thread. No luck - same error.

    Any suggestions?

    ================

    [SOLVED]

    My bad. It was indeed the <body> highlighting problem, but I had modified the code in the server rather than in the administrative backend under the Elements > Manage Elements > Plugins section.