We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11190
    • 109 Posts
    Hello, all. We upgraded to 1.0 today (congratulations and thanks to the developers!). All seems to be working well on our site (www.spiritualoutreach.com) except the ajaxsearch in the right margin. We have two issues. The one I’ll ask about on this thread is an error when we click on the search results.

    We are not using the ajax features but simply posting the results in the main content section. However, whenever anyone clicks on the returned result links, they receive:

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

    PHP error debug
    Error: preg_replace() [function.preg-replace]: Compilation failed: lookbehind assertion is not fixed length at offset 11
    Error type/ Nr.: Warning - 2
    File: /var/websites/sowcom/www/html/manager/includes/document.parser.class.inc.php(746) : eval()’d code
    Line: 120

    Parser timing
    MySQL: 0.0144 s (33 Requests)
    PHP: 0.1555 s
    Total: 0.1699 s

    What is wrong and how do we fix it? Thanks - John
      http://www.spiritualoutreach.com
      Making Christianity intelligible to secular society
      • 5811
      • 1,717 Posts
      Look at http://modxcms.com/forums/index.php/topic,37519.msg226347.html#msg226347

      For the moment I haven’t proposed a fix for this issue.
        • 11190
        • 109 Posts
        Ouch! Looks like installing pcre from source is the solution. CentOS 5.3 is our platform. Oh well. Thanks very much - John
          http://www.spiritualoutreach.com
          Making Christianity intelligible to secular society
          • 23571
          • 223 Posts
          Thanks for posting this info, have run into the same issue on multiple sites. Could have taken a lot of time to pinpoint the issue/solution otherwise.
            • 23571
            • 223 Posts
            Okay, have upgraded to pcre 7.9-1 and the error described above has resolved, but when making a search and then clicking on a link on the results page the following page is rendered with an extra ">" after the body tag so that it is <body>>.

            Specs:
            MODx 1.0
            AjaxSearch 1.8.3a
            Centos 5.3
            PHP 5.1.6
            MySql 5.0.45

            Shell Search Call:
            [!AjaxSearch? &ajaxSearch=`0` &AS_landing=`17` &AS_showForm=`1` &AS_showResults=`0`!]

            Results Page Search Call:
            [!AjaxSearch? &ajaxSearch=`0` &AS_showForm=`0`!]


            Any ideas?
              • 5811
              • 1,717 Posts
                • 23571
                • 223 Posts
                Thanks, that did it.
                  • 29163
                  • 18 Posts
                  tabor.carlton Reply #8, 17 years ago
                  Can someone please exlain to me ’PCRE’ - I’m getting the same issue (although preg_replace() is not mentioned in my error)

                  Compilation failed: lookbehind assertion is not fixed length at offset 11


                  Search results pulling up fine, but clicking on a link yields the error from above.

                  I think that installing componenets of the OS and configuring are a bit out of my depth, but i need to find some answers on this. Thanks.

                  Update: SOLUTION FOUND! (thanks coroico for the link)

                  There is an error in the search highlighting plugin.

                  Inside the modx manager, click on

                  Elements > manage elements > plugins > Search Highlighting plugin

                  On line 123 (if you copy to your line-numbered text editor, right near the bottom of the code)

                  Replace: $output = implode("<body>", $body);

                  With: $output = implode("<body", $body);


                  Hope that helps someone else



                    Tabor Carlton // Interactive Art Director
                    http://www.taborcarlton.com
                    http://www.alternative-media.net