We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25663 MODX Staff
    • 12,272 Posts
    A "corner case" is a phrase that means very specific instances where certain variables merge together to break things. http://en.wikipedia.org/wiki/Corner_cases
      Ryan Thrash, MODX Co-Founder
      Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
      • 31037
      • 358 Posts
      EDIT: Solved, see post below.
      ----------------------
      I have a problem with my test installation of MODx 0.95 beta at http://www.learningmodx.com. I get the following message trying to get to start page.

      « MODx Parse Error »
      MODx encountered the following error while attempting to parse the requested resource:
      « PHP Parse Error »
       
      PHP error debug
        Error: 	array_values(): The argument should be an array	 
        Error type/ Nr.: 	Warning - 2	 
        File: 	/mounted-storage/home16a/sub002/sc18312-RUPF/learningmodx.com/manager/includes/document.parser.class.inc.php(682) : eval()'d code	 
        Line: 	372	 
       


      Sometimes it works fine, sometimes I get the error message. And sometimes I get redirected to the 404-page. I have tried to find what triggers it, but the problem just seems to come and go.

      And also in manager I get the following message all the time:

      Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /mounted-storage/home16a/sub002/sc18312-RUPF/learningmodx.com/manager/actions/document_data.static.php on line 247


      I get about 6 of the same message when viewing a document in manager, just above "This table shows some visitor statistics..."

      Made a clean install on php 4.4.2 and mysql 5.

      I’m a newbie, so probably just me doing something stupied smiley
        • 727
        • 502 Posts
        Could it be a problem with a snippet? If the snippet and/or page is being cached then that can explain why you sometimes get the error and sometimes don’t. Try removing snippets on the problem page one by one. You can do this by changing "[[" to "[" and "]]" to "]" to stop it being recognized.

        Andy
          • 31037
          • 358 Posts
          It does seem to be a cache problem.

          I got the page working for a while, but after doing a "Clear Cache" from the manager, the page stoped working again. When getting the page into cache again (don’t know how I did that tongue) it works until i clear the cache again.

          At least I now know how to trigger the problem.

          I will try to disable the snippets (just log in and menu snippet right now) and then hit "clear cache" to see what happens.

          Thanks for the advice!

          EDIT: Solved!

          Ajayre, you where right! It was a call to Ditto that screwed things up. Now after removing it I can clear cache without problems!

          Thanks!
            • 19554
            • 59 Posts
            Quote from: Briggsy at Sep 11, 2006, 03:11 AM

            I too have this issue while upgrading from 0.9.2.1. After uploading the files I went to the normal URL and received the error as per Milicicd’s post. I then ran the install program and everything was "OK"

            Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/emanz/public_html/manager/includes/document.parser.class.inc.php on line 1112


            I can confirm this too. I deleted everything, uploaded 0.9.2.1 and installed it. Checked, and everything works fine. Then I uploaded 0.9.5b and ran install, chose upgrade and according to installation app, everything went fine. However, same error appeared again.

            However, interesting thing is that some people report upgrade as "smooth". Is this result of some configuration details in overriden installation? Were they upgrading over 0.9.2.1 or some older version?
            Could we open this as "critical bug" in bug tracker?
              • 25663 MODX Staff
              • 12,272 Posts
              Please open as a critical bug indeed.
                Ryan Thrash, MODX Co-Founder
                Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                • 19554
                • 59 Posts
                Okay, here is temporary solution I came up with:

                just override
                manager/includes/document.parser.class.inc.php

                with 0.9.2.1 version of the same file.

                I guess something must be broke, but nothing major - I tried editing, saving and publishing pages and everything work fine. Since I noticed older version of file is somewhat bigger than newer, I guess there are some code refactorings inthere smiley

                P.S. Critical bug opened.

                EDIT: I just discovered that three Weblinks in "Templates" folder are broken.  Does this have to do with this "fix"?

                EDIT: I think I located problem to specific function. Next step of experiment - I took 0.9.5b version of file and just copied over executeParser() function from 0.9.2.1 (and also checkCookie() referenced by older version).
                Again, everything works fine. And yes, seems I was right about refactoring smiley
                  • 17615
                  • 4 Posts
                  Quote from: luckyluk at Sep 11, 2006, 05:27 AM

                  hello,

                  it’s my firts installation of modx



                  Quote from: Briggsy at Sep 11, 2006, 03:44 AM

                  Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/emanz/public_html/manager/includes/document.parser.class.inc.php on line 1112

                  i have the same error
                  i have re-upoad all the files

                  http://assoacier.phpnet.org/rev1392/root/manager/
                  sorry for my bad english, i’m french

                  someone have found a solution for this problem?

                  when i have instal, all the step of install was ok

                  huh
                  my configuration of php is
                  http://assoacier.phpnet.org/rev1392/root/info.php
                    • 22303 MODX Staff
                    • 10,725 Posts

                    Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/emanz/public_html/manager/includes/document.parser.class.inc.php on line 1112


                    Hmmm, anyone experiencing this error with the beta installation, do me a favor, and open the /manager/includes/document.parser.class.inc.php in a reliable text editor, and remove any extra lines or characters at the end of the file, following the closing PHP tag ?>. Save it, make sure your editor isn’t adding back the line(s) or any other characters to the end of the file after saving, upload if necessary, and retest the site.

                    Let me know if that solves it or not...
                      • 4041
                      • 788 Posts
                      Although I haven’t installed this version yet, looking at my file there are no empty spaces at the end of the file... but I ran into this same issue with a version I got from svn about 7 - 10 days ago and removing the WebLogin snippet solved it.

                      I have not had time to do anymore since then as far as tracking the problem, but it had something to do in the Snippetcache.
                        xforum
                        http://frsbuilders.net (under construction) forum for evolution

                      This discussion is closed to further replies. Keep calm and carry on.