We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22540
    • 8 Posts
    Hello,

    I use Modx Revolution 2.1

    I tired to made my site multilingual by following these instructions: http://www.butter.com.hk/blog/posts/2010/08/internationalization-in-modx-revolution.html

    Everything went well after I created Gateway plugin. Then my browser returned an error:

    Parse error: syntax error, unexpected '{' in /home/username/public_html/core/cache/includes/elements/modplugin/6.include.cache.php on line 8


    Does anybody have any idea what is wrong with this? Now I can’t access manager or front end of the site.

    I even tried to delete Gateway plugin from database and the 6.include.cache.php file from the server, but I still get the same error.
      • 32316
      • 387 Posts
      what is wrong - the php parser is seeing a { where it does not expect it, which probably means that you missed something before it - i.e. made a syntax error before the { on line 8 - good thing is that there are only 8 lines to look at (probably that is)

      Once the php parser finds an error it often just quits/fails whatever you want to call it and stops creating any output - hence a blank page - little unusual for it to kill the manager I would think but obviously it is possible.
      Rather than deleting the plugin I would try to edit it in the database (you’ve probably missed a punctuation mark, or added an extra one) and then completely clear the cache by...
      If you have ftp access to the site you should completely get rid of all the cache - you can delete the whole folder and it will recreate itself.

      I often develop snippets with my external editor, save as files and include them, uncached - any errors and I can quickly edit resave and reload - and of course my editor (BBEdit) has lots of nice features that an ’online cms editor’ will probably never have. Once it all working I copy the contents of the file and paste them into the snippet (instead of the include - I actually have a snippet that includes files - useful for developing templates as well - I’m sure I’ve seen a couple of versions on the forums here)
        • 6228
        • 249 Posts
        That has happened to me more times than I would like to admit. For me, I would have to dig into the database and search for the offending code and correct it from the database manager (i.e. PhpMyAdmin).

        I follow the advice of whistlemaker and link all of my plugins and snippets to external files now to avoid problems like that.
          lo9on.com

          MODx Evolution/Revolution | Remote Desktop Training | Development
          • 22540
          • 8 Posts
          Thank you very much! Now it works.

          I did what whistlemaker recommended to do. I edited the plugin code in the database and cleared the cache by deleting the whole cache folder from the server. smiley
            • 32316
            • 387 Posts
            Glad it worked.