We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33404
    • 29 Posts
    No, the base install page, but even with a blank template the error occurs...

    I didn’t see it before, but modx system events logger is full of:

    Error

    Event Id: 1 Source: Search Highlighting - Plugin

    Date: 19-Feb-2008 08:48 PM User:

    syntax error, unexpected T_VARIABLE
    Parse error: syntax error, unexpected T_VARIABLE in /home/pixin/www/manager/includes/document.parser.class.inc.php(745) : eval()’d code on line 51
      • 7231
      • 4,205 Posts
      Did you turn off the highlight plug-in?

      I just tested a fresh install of 0961p2, with all add-ons, and it went through the validator no problem. Are you using a local server? If I try this on a local server it will give a 500 error since my local server is closed to the outside world. With the Web Developer toolkit in FireFox you can choose the Validate Local HTML or the Validate HTML options. The first one (local) will work but the normal one will error 500.
        [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

        Something is happening here, but you don't know what it is.
        Do you, Mr. Jones? - [bob dylan]
        • 33404
        • 29 Posts
        Thanks!
        Disabling the plugin solves it.
        I’m not using a local server, it is in production and opened to outside world...
        I checked the header with Fiddler2 and with web developper toolbar FF plugin, who confirmed both the 500 error (also present in my apache logs).

        Thanks again for you quick and precious help.
          • 20444
          • 1 Posts
          I found the error! In the "Search Highlighting" plugin, there’s a missing semicolon at the end of line 50. It was driving me crazy, since I could see the site, but Google couldn’t spider it!
          • What was the line that had the missing semicolon, so we can make sure it’s not in the forthcoming 0962 distribution?
              Ryan Thrash, MODX Co-Founder
              Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
              • 7231
              • 4,205 Posts
              As he said it is line 50:
                $highlight = strip_tags(urldecode($_REQUEST['highlight']))


              Attached is the fixed plugin.searchhighlight.tpl for the install.

              Edit: added this to official bug report.
              http://modxcms.com/bugs/task/1015
                [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

                Something is happening here, but you don't know what it is.
                Do you, Mr. Jones? - [bob dylan]
              • Thanks. FYI, that’s line 51 of the current SVN trunk and already includes the semicolon:
                  $highlight = strip_tags(urldecode($_REQUEST['highlight']));

                  Ryan Thrash, MODX Co-Founder
                  Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                • This needs to be straightened out in the releases and SVN. Everyone please take a breather and I will step in and resolve this. All these ad hoc releases are confusing everyone and making it very difficult to track progress, especially without the SVN tags for each release.

                  I will be making some significant updates in SVN today and will make sure this is addressed as part of it.
                    • 16085
                    • 203 Posts
                    Just come across this post. I too have had problems with MODx 0.9.6.1p2 trying to validate my RSS feed but keep giving me a HTTP 500. So checking through FF Web Dev tools and locating the Reports => System Events => Search Highlighting
                    syntax error, unexpected T_VARIABLE

                    Parse error: syntax error, unexpected T_VARIABLE in /home/devprop/public_html/modx/manager/includes/document.parser.class.inc.php(745) : eval()’d code on line 51
                    Disabling it or adding the update snippet from this thread has also corrected the issue.
                      • 8883
                      • 59 Posts
                      I had this invisible 500 Error too.
                      But In my case a wrong phx query caused it.
                      I used
                      [+phf:if=`[*TV*]`:is=``:then=`something`:else=`other`+]

                      (the empty is=`` caused it)