We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32365
    • 42 Posts
    First let me say I love the forum, but I have run into some kind of error. So far it doesn't seem to be doing any harm(I can still register/login with my test accounts which is about as far as I am in the installation/setup process), but at the top of the page I get this php error:


    Parse error: syntax error, unexpected ')' in /home/sccon/public_html/core/model/modx/filters/modoutputfilter.class.php(162) : eval()'d code on line 1

    Parse error: syntax error, unexpected ')' in /home/sccon/public_html/core/model/modx/filters/modoutputfilter.class.php(162) : eval()'d code on line 1

    Parse error: syntax error, unexpected ')' in /home/sccon/public_html/core/model/modx/filters/modoutputfilter.class.php(170) : eval()'d code on line 1

    Parse error: syntax error, unexpected ')' in /home/sccon/public_html/core/model/modx/filters/modoutputfilter.class.php(170) : eval()'d code on line 1

    Parse error: syntax error, unexpected ')' in /home/sccon/public_html/core/model/modx/filters/modoutputfilter.class.php(162) : eval()'d code on line 1

    Parse error: syntax error, unexpected ')' in /home/sccon/public_html/core/model/modx/filters/modoutputfilter.class.php(170) : eval()'d code on line 1

    Again, I am not seeing any noticeable functionality problems caused by this. Anyone know what is causing this?

    Edit: Also, this error only appears after I've logged into the forum account. I've tried logging out of the Modx cpanel before logging into the test account, but that doesn't seem to have an impact on the appearance of this error. [ed. note: Wickian last edited this post 11 years ago.]
      • 3749
      • 24,544 Posts
      One of your PHX-style output modifier tags is incorrect. The odds are there's a single quote where there should be a backtick. If these are piling up rapidly, it's probably in a Template.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 32365
        • 42 Posts
        Hmm alright, so I'll just need to go through the templates associated with users until I find the syntax error then? I'll let you know how that goes when I finish this.
          • 32365
          • 42 Posts
          There aren't any errors in any resources or snippets/chunks that I can see. That just leaves the actual .tpl files then. I haven't found any in the /core/ directory yet unfortunately.

          Edit: I may have narrowed it down to "wrapper.tpl" in the discuss themes folder. It make sense since this file is used in every page of the forum display. [ed. note: Wickian last edited this post 11 years ago.]
            • 32365
            • 42 Posts
            The problem of the code listed here are the hyperlinks. Whenever I removed them, or replaced the URL's with #, the syntax errors disappear, but I can't see any errors myself(I'm no php or modx expert).

            Could the errors be occuring since this is a test account on an inactive forum, and the pages in those URL's don't exist? I'm considering just removing this code entirely.


            [[+discuss.user.no_replies_count:gte=`1`:then=`
            [[+discuss.user.unanswered_questions_count:gte=`1`:then=`
            [[%discuss.help_answer]] <a href="[[+discuss.config.url]]thread/unanswered_questions" title="[[%discuss.view_unanswered]]">[[+discuss.user.unanswered_questions]]</a>
            [[%discuss.participate_discussions]] <a href="[[+discuss.config.url]]thread/no_replies" title="[[%discuss.no_replies_to_discussions]]">[[+discuss.user.no_replies]]</a>.
            `:else=`
            [[%discuss.participate_discussions_solo]] <a href="[[+discuss.config.url]]thread/no_replies" title="[[%discuss.no_replies_to_discussions]]">[[+discuss.user.no_replies]]</a>.
            `]]
            `:else=`
            [[+discuss.user.unanswered_questions_count:gte=`1`:then=`
            [[%discuss.participate_discussions_solo]] <a href="[[+discuss.config.url]]thread/unanswered_questions" title="[[%discuss.view_unanswered]]">[[+discuss.user.new_unanswered_questions]]</a>.
            `:else=`
            [[%discuss.no_unanswered_questions_or_discussions]]
            `]]
            `]]
              • 3749
              • 24,544 Posts
              Wow, that is one monster set of nested Output Modifiers. It may be just too complex for the parser to handle.
                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting
                • 32365
                • 42 Posts
                Well it runs fine when I remove the hyperlinks, it's just those([[+discuss.config.url]]thread/page_url) that are the problem.
                  • 32365
                  • 42 Posts
                  For anyone else who might have this problem, I solved it by swapping the above code for the actual URL to the forums in the hyperlink.
                  • We really need to get rid of that set of output conditionals and in general find a better way to handle the header stuff...
                      Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                      Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.