We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25551 ☆ A M B ☆
    • 1,231 Posts
    When installing snippets via the package management scripts and chunks are sometimes put in categories, this is great but it’s stopping them working for my fresh install of 2.0.7 traditional.

    I have installed several snippets such as simpleSearch and googleSitemap and they are categorised when installed. When including a simple snippet call they do not work, when removing them from categories they work. What on earth is stopping them working? Is this a bug or a permission as I have uploaded all the modx files 3 times and installed the snippets twice.

    Thanks.
      Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
      AugmentBLU - MODX Partner

      BLUcart - MODX Revolution E-Commerce & Shopping Cart
      • 25551 ☆ A M B ☆
      • 1,231 Posts
      Any possible ideas what could cause this?
        Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
        AugmentBLU - MODX Partner

        BLUcart - MODX Revolution E-Commerce & Shopping Cart
        • 28215
        • 4,149 Posts
        First off, can you give us this:
        If you’re posting about a bug, please state all of your Environment information in your post: Version of MODx, Traditional or Advanced distribution (for Revo), Server OS, Server Version, PHP Version, MySQL Version (client and server), is pdo_mysql installed, your Browser type and version, if you are using any opcode caching such as eAccelerator, APC, winCache, xCache, etc; any relevant errors in core/cache/logs/error.log, and any other environment data we should know. We can’t help you without that information.

        Especially about any errors in core/cache/logs/error.log.
          shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
          • 25551 ☆ A M B ☆
          • 1,231 Posts
          Sorry, forgot to include that!

          Rev 2.0.7 Traditional

          Quad core Intel(R) Xeon(R) CPU X3430 @ 2.40GHz
          8GB RAM
          MySQL = 5.1.54
          PHP = 5.2.9
          DB Charset = UTF8
          PHP Handler = fastCGI & Apache suEXEC enabled
          PDO = enabled
          eAccelerator = enabled

          I just changed the PHP handler to fastCGI today so it’s not that causing issues as it was on DSO before and had the same issue.

          I have just installed Rev on the same server, the same exact way and tried to mimic the same setup before I start developing the site and the categories work. The issue is still there on the other site that the category issue first appeared. I uninstalled googleSitemap and force deleted it, reinstalled but the issue still remained. I just get a blank page instead of it displaying the XML.

          There are quite a few errors but they are all the same.

          [2011-02-06 01:25:38] (ERROR @ /home/site/public_html/dev/core/xpdo/xpdo.class.php : 1884) PHP warning: json_encode() [<a href=’function.json-encode’>function.json-encode</a>]: recursion detected

          If there’s any other information you want or want me to test I can.
            Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
            AugmentBLU - MODX Partner

            BLUcart - MODX Revolution E-Commerce & Shopping Cart
            • 28215
            • 4,149 Posts
            1. Try disabling eAccelerator.
            2. Try putting a really simple snippet into a Category on a blank Resource and see if it works:

            <?php
            return 'TEST';
            


            If that doesn’t work, I’m not sure. Can you describe in detail what kind of customizations you’ve done. Have you set any Element Category ACLs?
              shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
              • 18373 ☆ A M B ☆
              • 3,141 Posts
              If it works on the same server in a different install, perhaps something went wrong in that process?

              Perhaps you can try re-uploading all the files and running setup in upgrade mode and see if that changes anything.
                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.
                • 25551 ☆ A M B ☆
                • 1,231 Posts
                Back to this issue again.

                I have now install Rev 2.0.8 on a windows based server with no accelerator. When I create a new category and put chunks in it that are used for wayfinder for example they are not being picked up. I tried putting the wayfinder snippet in the same category to see it worked but it still didn’t.

                What could I possibly be doing wrong?
                  Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
                  AugmentBLU - MODX Partner

                  BLUcart - MODX Revolution E-Commerce & Shopping Cart
                  • 37059
                  • 368 Posts
                  Same issue here, pointed out to me by rossco on this thread. In my case, this is only a problem with the GoogleSiteMap snippet; I have many other snippets in categories working fine. GSM wouldn’t work until it was removed from being in a category.

                  Revo 2.0.7 Traditional
                  Linux (shared host - don’t have exact info in front of me)
                  PHP 5.2.15
                  MySQL 5.1.42
                  PDO-MySQL installed
                  Chrome/Firefox
                  No opcode caching, no errors to my knowledge.
                    Jason
                    • 25551 ☆ A M B ☆
                    • 1,231 Posts
                    If this is a bug I’m happy to report it on bug tracker.

                    Cheers
                      Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
                      AugmentBLU - MODX Partner

                      BLUcart - MODX Revolution E-Commerce & Shopping Cart
                      • 3749
                      • 24,544 Posts
                      Do you have any Element Category Access ACL entries for any user group?

                      To check,

                      * Go to Security -> Access Controls -> User Groups tab.
                      * Right click on each user group, select "update", go to the Element Category Access tab and see if there are any entries.
                      * Click on the "cancel" button to get back to the user group list.
                        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