We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15745
    • 92 Posts
    If you go to this url http://199.245.231.22/ and type in "acetic acid" in the search box, - go to the result that says "Message to the CEO" - Click on that link and scroll down the page. The page gets repeated somehow and the layout is incorrect. The correct page should look like this http://199.245.231.22/message.html. Any idea what would cause this?
    Thanks
      Version: 0.9.6.3
      North Shore Web Design
      • 16278
      • 928 Posts
      The content doesn’t actually repeat, something like a complete copy of the page is inserted into the output in one of the bullet points. This occurs where the original page contains the text "$1M" (suspicious). The duff result doesn’t contain the "$1" (smoking gun). Looks as if the $1 has been taken as "replace with first parenthesized sub-expression" in a regular expression somewhere along the line.
      shocked KP
        • 15745
        • 92 Posts
        Quote from: kp52 at Jul 18, 2009, 05:02 AM

        The content doesn’t actually repeat, something like a complete copy of the page is inserted into the output in one of the bullet points. This occurs where the original page contains the text "$1M" (suspicious). The duff result doesn’t contain the "$1" (smoking gun). Looks as if the $1 has been taken as "replace with first parenthesized sub-expression" in a regular expression somewhere along the line.
        shocked KP
        Do you mean the text $1M on the search results page or the actual ’message from ceo’ page? What does "the duff result" mean? Do you think the script has been compromised? Sorry for my ignorance - I’ve never seen anything like this
          Version: 0.9.6.3
          North Shore Web Design
          • 10487 MODX Staff
          • 1,535 Posts
          Hmm, strange indeed - definitely agree with kp52 that it could be something to do with some kind of regular expression shenanigans.

          First thing to try, if you have the SearchHighlight plugin running then disable that and see if that solves the problem.
            Garry Nutting
            Senior Developer
            MODX, LLC

            Email: [email protected]
            Twitter: @garryn
            Web: modx.com
            • 16278
            • 928 Posts
            Sorry! Great nations divided by common language etc. shocked
            duff (from dictionary.net)
            adjective Brit., Austral., N.Z. (informal) bad, poor, useless, pathetic, inferior, worthless, unsatisfactory, defective, deficient, imperfect, substandard, low-rent (informal), chiefly U.S. poxy (slang) pants (informal) bodger or bodgie Austral. (slang)
            The problem may be due to a bug in the search snippet. In PHP’s preg_replace function, if that is what it uses, you can put sub-expressions into parentheses in the search string, and $1, $2 etc. in the replacement string to refer to the first, second etc. parenthesized sub-expression.

            In the following example, where ".+" means "one or more of any character" "profiles/fred/" in $string is replaced by "profile.php?p=fred", "profiles/mary/" is replaced by "profile.php?p=mary" etc.
            preg_replace('#profiles/(.*)/#', 'profile.php?p=$1',$string);
            It looks as if the $1 in your page’s data is being taken as part of the instructions.
            smiley KP