We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 48482
    • 2 Posts
    Hi Guys, I need help with the following error.
    Fatal error: Call to a member function parseProperties() on a non-object in htdocs\core\model\modx\modelement.class.php on line 536

    I am new to MODx and can't fix it on my own. I got this error when i tried to run a already created project on my local server. When i printed the content of xpdo, [parser] was null, please help me with this, it is urgent
      • 3749
      • 24,544 Posts
      That's odd. Do you see this line above that (at the top of the function):

      $this->xpdo->getParser();


      That's supposed to set $xpdo->parser.

      You could try changing it to:

      $this->xpdo->parser = $this->xpdo->getParser();


      I'm not sure it would work, and the fact that getParser() isn't working is a concern.

      It's possible that you have a missing or corrupted file in your install. That's common if you transfer the files individually with FTP.

      What version of MODX are you using?
        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
        • 42941
        • 3 Posts
        hello bob,
        ive got the same error after deinstall "fastfield" via packagemanagment. do you have an idea to locate the error and fix it? beacause no everythin is broken and only display a white page sad Thank you for your time!

        PHP Fatal error: Call to a member function parseProperties() on a non-object in /core/model/modx/modelement.class.php on line 537
          • 3749
          • 24,544 Posts
          FastField is a plugin, and plugins have a way of sticking in the cache where they cause errors when they try to execute after their files are gone. Try deleting all files in the core/cache directory manually.
            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
            • 42941
            • 3 Posts
            Quote from: BobRay at Nov 24, 2014, 04:22 AM
            FastField is a plugin, and plugins have a way of sticking in the cache where they cause errors when they try to execute after their files are gone. Try deleting all files in the core/cache directory manually.

            Thanks Bob, i solved it. There was two settings in the System Settings for FastField.

            1. look for "fastfield" in /core/cache/system_settings/config.cache.php, note it and delete the file
            2. open the manager (which will rework now) an delete the settings above in the System Settings

            Thanks for your quick help!
              • 3749
              • 24,544 Posts
              I'm glad I could help. Thanks for reporting back. smiley
                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
                • 31837
                • 59 Posts
                Sorry to dig this up, but I've just had this same problem, of which I'm in the process of trying to fix it myself. :/

                Everything on the site had been working fine up until now, however I thought I'd upgrade some of the resources. The trouble is that not all of them cause issues, and it's hard to know which exactly caused the problem. From what I can tell, these are the ones I upgraded:


                • updater-0.3.8-beta
                • upgrademodx-1.4.0-pl
                • pdotools.2.2.8
                • login-1.9.2-pl
                • hybrid-1.1.4-pl

                I can only guess that it may have been the pdotools that caused the error?

                Fatal error: Call to a member function parseProperties() on null in /var/www/html/public_html/core/model/modx/modelement.class.php on line 536


                The cache path's been cleared, to the point where it's not creating any files. I even had to turn on a php error display for my live server to get the error to appear. (fortunately it's not a publicly known domain yet).

                As I don't know what has caused the problem, I'm now upgrading to 2.5.0rc1 from 2.4.3-pl. So I'll see if that solves the problem. :/
                I'll keep you posted.
                  • 3749
                  • 24,544 Posts
                  That's a very weird error. It comes from these lines:

                  $this->xpdo->getParser();
                  $this->_properties= $this->xpdo->parser->parseProperties($this->get('properties'));


                  It means that the $xpdo member of the MODX class is OK, but $xpdo->getParser() is failing.

                  Do you, by chance, have FastField installed? It replaces the MODX parser. I think discuss may also do that, though in that case it's temporary.

                  Check to see if there is a parser_class_path System Setting. If so, it's probably wrong.
                    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
                    • 31837
                    • 59 Posts
                    As a side note, to try and isolate the original problem, I renamed the folders of the core/components/hybridauth and the core/components/pdotools. As that didn't solve the problem previously, I did the upgrade to the new version.

                    So, here's the first result. As suspected, it could be a few things. Great...

                    [2016-03-04 23:41:50] (ERROR @ /var/www/html/public_html/core/xpdo/xpdo.class.php : 502) Path specified for package hybridauth is not a valid or accessible directory: /var/www/html/public_html/core/components/hybridauth/model/
                    [2016-03-04 23:41:50] (ERROR @ /var/www/html/public_html/core/xpdo/xpdo.class.php : 502) Path specified for package hybridauth is not a valid or accessible directory: /var/www/html/public_html/core/components/hybridauth/model/
                    [2016-03-04 23:41:50] (ERROR @ /var/www/html/public_html/core/xpdo/xpdo.class.php : 643) Could not load class: pdoParser from pdoparser.
                    [2016-03-04 23:41:50] (ERROR @ /var/www/html/public_html/core/xpdo/xpdo.class.php : 1245) Problem getting service parser, instance of class pdoParser, from path /var/www/html/public_html/core/components/pdotools/model/pdotools/
                    [2016-03-04 23:41:51] (ERROR @ /var/www/html/public_html/core/xpdo/xpdo.class.php : 502) Path specified for package hybridauth is not a valid or accessible directory: /var/www/html/public_html/core/components/hybridauth/model/
                    [2016-03-04 23:41:51] (ERROR @ /var/www/html/public_html/core/xpdo/xpdo.class.php : 502) Path specified for package hybridauth is not a valid or accessible directory: /var/www/html/public_html/core/components/hybridauth/model/
                    [2016-03-04 23:41:51] (ERROR @ /var/www/html/public_html/core/xpdo/xpdo.class.php : 643) Could not load class: pdoParser from pdoparser.
                    [2016-03-04 23:41:51] (ERROR @ /var/www/html/public_html/core/xpdo/xpdo.class.php : 1245) Problem getting service parser, instance of class pdoParser, from path /var/www/html/public_html/core/components/pdotools/model/pdotools/


                    While the log file is now being filled with errors again (which is great), I'm getting a blank page.

                    I fixed the hybridauth problem by renaming the folder back to the original.

                    This is the constant problem now:

                    [2016-03-04 23:51:36] (ERROR @ /var/www/html/public_html/core/xpdo/xpdo.class.php : 643) Could not load class: pdoParser from pdoparser.
                    [2016-03-04 23:51:36] (ERROR @ /var/www/html/public_html/core/xpdo/xpdo.class.php : 1245) Problem getting service parser, instance of class pdoParser, from path /var/www/html/public_html/core/components/pdotools/model/pdotools/


                    And... as suspected, I renamed the folder back to it's original name, and now it works again.

                    I must ask the question though, how is it that a bad plugin upgrade can crash a whole site?
                    Can we allow for bad plugins or similar that we are able to test for problems?
                    Has anyone developed a special mini-admin site that can do roll-backs, admin checks, or other similar stuffs to disable or enable various plugins or components?

                    So in conclusion, I think it was a plugin that I updated that did some minor damage.

                    Along this upgrade process, I also disabled many of the transport packages and plugins from the DB in an effort to resolve this, and even killed all the cookies, and the sessions on the server.

                    Cheers,
                    Steve [ed. note: vr_driver last edited this post 8 years, 1 month ago.]
                      • 31837
                      • 59 Posts
                      Quote from: BobRay at Mar 05, 2016, 04:57 AM
                      That's a very weird error.

                      Tell me about it! As much as I love working with modx, it frustrates me at times with the weird and wonderful errors that it irregularly puts up sometimes.

                      Quote from: BobRay at Mar 05, 2016, 04:57 AM
                      It means that the $xpdo member of the MODX class is OK, but $xpdo->getParser() is failing.

                      Weird. Just weird.

                      Quote from: BobRay at Mar 05, 2016, 04:57 AM
                      Do you, by chance, have FastField installed? It replaces the MODX parser.

                      No, but this is my current list:


                      • formit
                      • archivist
                      • articles
                      • breadcrumb
                      • cacheclear
                      • cachemaster
                      • getpage
                      • getresources
                      • hybridauth
                      • login
                      • newspublisher
                      • pdotools
                      • personalize

                      • quip

                      • taglister

                      • tinymce

                      • updater

                      • upgrademodx
                      • versionx

                      • wayfinder



                      Quote from: BobRay at Mar 05, 2016, 04:57 AM
                      Check to see if there is a parser_class_path System Setting. If so, it's probably wrong.
                      I'm not seeing anything out of the ordinary. It's just one of those things I think where a plugin broke it... Either that, or I installed a plugin that was released for a newer version - such as for the 2.5.0rc1 rather than 2.4.3-pl?