We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2901
    • 277 Posts
    Hi Folks

    I have a nasty problem with wayfinder 2.3.3 in two revo installations. Wayfinder disappears sometimes, after clearing cache it is back on the site. I have the same error message in both installations

    [2012-01-26 20:09:02] (ERROR @ /.../httpdocs/core/components/wayfinder/wayfinder.class.php : 116) PHP warning: ksort() expects parameter 1 to be array, integer given
    [2012-01-26 20:09:02] (ERROR @/ .../httpdocs/core/components/wayfinder/wayfinder.class.php : 185) PHP warning: Invalid argument supplied for foreach()

    I don't really see any reason for this and I really don't know how to solve this issue.
    Your help is much appreciated.

    modx Revolution Versions 2.1.3 /2.1.5 both traditional
    PHP 5.2.17
    MySQL 5.0.77
      • 2901
      • 277 Posts
      Sorry when I push this subject again, but I kind of get an insecure feeling when in certain sites the navigations disappears once in a while.

      No one else having this problem?

      • I just had this same issue in Revo 2.2.1 and Wayfinder 2.3.3-pl. Clearing the cache fixed it, but would like to know why this happened.
          Mat Dave Jones
          • 13373
          • 70 Posts
          Hi guys,

          It's definitely got to do with your hosting account space filling up. I just had this issue when the hosting account quota was reset, and the account space was full. Even after increasing the quota, the error still occurred, until the cache was cleared within the Manager.

          Hope that helps!

          Cheers,
          Jacob
            • 3749
            • 24,544 Posts
            You might check your MODX error log and Manager Action log. These can get pretty big after a while, especially if you have some common plugin that's generating a error.



            ------------------------------------------------------------------------------------------
            PLEASE, PLEASE specify the version of MODX you are using.
            MODX info for everyone: http://bobsguides.com/modx.html
              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
              • 1061
              • 81 Posts
              [27-Sep-2012 11:28:47] PHP Warning:  ksort() expects parameter 1 to be array, integer given in .../core/components/wayfinder/wayfinder.class.php on line 121
              [27-Sep-2012 11:28:47] PHP Warning:  Invalid argument supplied for foreach() in .../core/components/wayfinder/wayfinder.class.php on line 190


              Confirm!
              I have to, but only on MODx 2.2.4 and Wayfinder 2.3.3(2 web sites), because on other versions I don't have a problem.
              This is really nasty problem because not only for me and several people!
              Check with google -
              PHP Warning: ksort() expects parameter 1 to be array, integer given in
              The MODx will have a first 2 pages with this error(Wayfinder), at least for my country.

              P.S. No quota problems, I have 2Gb free of disk space.
              P.S.S. Clearing cache is not resolve the problem, because this is temporary solution.
                • 3749
                • 24,544 Posts
                This is kind of a bandaid solution and I haven't tested it, but I think one or both of those problems would be fixed if you add this line between lines 118 and 119 in the core/components/wayfinder/wayfinder.class.php file:


                $this->docs = is_array($this->docs)? $this->docs: array() 


                That line would go just above the following line:

                if (!empty($this->docs)) {



                ------------------------------------------------------------------------------------------
                PLEASE, PLEASE specify the version of MODX you are using.
                MODX info for everyone: http://bobsguides.com/modx.html

                  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
                  • 10525
                  • 247 Posts
                  Hi folks,

                  I have recently started to experience the error described above: each of my Wayfinder menu items is replaced with the error string "Warning: ksort() expects parameter 1 to be array, integer given in ...".

                  Clearing the cache fixes it but only for a while (eg a few days).

                  Server space issues: none
                  Modx version: MODX Revolution 2.2.4-pl (traditional)
                  Wayfinder 2.3.3-pl

                  Is the bandaid fix mentioned above by BobRay still the only way to fix this error (assuming it has been tested) or has anything else been devised to solve the problem?

                  Thanks,

                  Gav
                    • 36686
                    • 165 Posts
                    I've had the same error appear today in two different Revo 2.2.8 sites with Wayfinder 2.3.3. They are two completely separate sites, but they are hosted on the same shared web and database servers. None of the log files were particularly heavy.

                    Any news would be much appreciated!
                      • 36686
                      • 165 Posts
                      Quote from: sketchi at Nov 26, 2013, 02:28 PM
                      I've had the same error appear today in two different Revo 2.2.8 sites with Wayfinder 2.3.3. They are two completely separate sites, but they are hosted on the same shared web and database servers. None of the log files were particularly heavy.

                      Any news would be much appreciated!

                      Ok, so today the same error occured again, this time on four sites, so I asked my hosting company to take a look. It turns out there was a problem with disc space on the server, which they've now freed up, so hopefully it won't happen again smiley