We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25287
    • 81 Posts
    I'm currently testing Taxonomies locally, and it looks like a good tagging system. When I add a getPagesbyTerm call via a chunk in a template the following error occurs
    Fatal error: Call to a member function fetchAll() on boolean in C:\xampp\htdocs\modx\core\cache\includes\elements\modsnippet\107.include.cache.php on line 56

    modsnippet 107 is the getPageTerms snippet, line 56 reads: $results = $obj->fetchAll(PDO::FETCH_ASSOC);

    The chunk I'm using is:
    [[!getPageTerms?  &page_id=`[[+page_id]]` &innerTpl=`taxonomyInner` &limit=`0`]]


    The taxonomyInner is:
    <li><a href="[[~[[+term_id]]]]">[[+pagetitle]]</a></li>


    The localhost is running Modx 2.3.1-pl (traditional) and PHP Version 5.6.3

    I have been able to get the getPagesByTerm snippet running successfully, but can't seem to display thumbnails.

    Any help appreciated

    This question has been answered by robinqld. See the first response.

      • 49790
      • 1 Posts
      S.O.S

      It seems to be great extension, but partialy useless with this error.

      getPageTerms and getTagCloud generate this problem. Both in line: $results = $obj->fetchAll(PDO::FETCH_ASSOC);

      Thanks for any help.
      • discuss.answer
        • 25287
        • 81 Posts
        I've moved to the Tagger extra ...
          • 36516
          • 179 Posts
          I *really* need this problem solved. It's a complete show-stopper, but in my inexperience it sucks not to be able to find a solution myself.

          I've look a little and it seems to me there are two issues [with the current version]:

          1) The default property sets for the snippets include settings with no values (blank), and so when the snippets are called all the settings are empty and nothing can happen. There's simply no default behaviour for the getTaxonomies snippet without the complete set of parameters, even if you're happy with the default template code.

          2) The fatal class-related errors seem to stem from the class autoloader the addon is using. Evidently as a means to avoid the need to constantly include a lot of classes by file, the developer has used an autoloader and the class name or file simply isn't being passed along properly.

          Solving #1 is easy enough - change the default property set to give all the settings values, or just call the snippets with parameters.

          Solving #2 seems to require someone with some experience with autoloading to look at the code and work out what might cause it to fail, perhaps under environmentally specific conditions. I'm running PHJP v5.3.29, which it seems should be fine.
          • That fatal error seems to come from pdo query returning false rather than a pdo query object that can be executed. Possibly because of an issue with the sql query it is trying to run, though I don't immediately see any issues with it. Normally pdo errors are logged to the error log, so there might be a useful error message there?

            If the error doesn't automatically get logged, you can try calling
            var_dump($modx->errorInfo());
            return 'Halted';
            before the $obj->fetchAll call to get the error information.
              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.
            • If there is a bug in the Taxonomies extra, then please report it in Github: I do not monitor the forums.
                • 36516
                • 179 Posts
                I don't suppose one of your guys could explain where Tagger falls short of Taxonomies. I presume it handles categories as an afterthought, or in a simplified way on which Taxonomies improves.
                  • 38705
                  • 101 Posts
                    Addict since 2012....