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

    After upgrading MODX website, I now cannot see my category folders for templates, chunks and TV's. I also cannot create a new category, it just gives me an error stating I cannot creating a new category! The site is working so the missing templates, chunks and TV's are still there! Also I can see the missing templates in the pulldown menu of a resource using them. I had a look using phpMyAdmin and I can see them in the table mdx_site_templates the templates are in there! I also ran Sitecheck plugin from Bob Ray and got errors but these in particular

    Elements with a nonexistent category
    [2015-09-09 15:24:22] (ERROR @ /core/components/sitecheck/index.php)

    Error 42S22 executing statement:
    Array
    (
    [0] => 42S22
    [1] => 1054
    [2] => Unknown column 'modCategory.rank' in 'field list'

    It said this type of error for all my missing templates, chunks and TV's.

    I am no mysql, php expert so I don't quite know what this all means. an explanation from a more knowledgeable person would be greatly appreciated. It looks like something obviously got deleted or corrupted in the update.

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

      • 3749
      • 24,544 Posts
      The upgrade was supposed to add a new column (rank) to the category table, but it looks like it didn't happen. This happens sometimes when you make too big a jump in versions. Setup is supposed to apply all the intermediate upgrades, but sometimes it doesn't happen.
        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
        • 36688
        • 9 Posts
        Quote from: BobRay at Sep 10, 2015, 09:21 PM
        The upgrade was supposed to add a new column (rank) to the category table, but it looks like it didn't happen. This happens sometimes when you make too big a jump in versions. Setup is supposed to apply all the intermediate upgrades, but sometimes it doesn't happen.
          • 36688
          • 9 Posts
          thanks for answering back. That site check plugin of your is great would never have known that was wrong without it! Is it possible to add that column (rank) to the table myself manually, and what would the contents of that field/column be anyway

            • 32507
            • 142 Posts
            Hi, I have same problem. I have two identical MODx installations; dev and production Site. After update dev-site manager worked ok, but production-site didn't. All the categories are missing. I don't think the reason is too big jump in versions.
            I also noticed that Package Providers are missing and i can't create new one.
            Any idea how to fix this?
            The upgrade was supposed to add a new column (rank) to the category table, but it looks like it didn't happen.

            Which table is the "Category table"?
              • 3749
              • 24,544 Posts
              Sorry, I mis-wrote. The name field was added to the context table (modx_context). That shouldn't be affecting your categories. The category table (modx_categories) should have a 'rank' field, which you may be able to add manually.

              Did you copy the dev site to production recently by exporting and importing specific tables? Maybe the category IDs and provider IDs don't match.

              The category table is modx_categories.

              Every element has a 'category' field which is supposed to match the 'id' field of the category it belongs to.

              Similarly, in the modx_transport_packages table the 'provider' field should match the 'id' field of the provider.

              Typically, the provider table only has one record with an ID of 1, and all transport packages that come from the Repo should have a 1 in their 'provider' field. [ed. note: BobRay last edited this post 8 years, 6 months ago.]
                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
              • discuss.answer
                • 32507
                • 142 Posts
                Oh yeah it's working! I added rank field manually.

                Did you copy the dev site to production recently by exporting and importing specific tables?
                I'm not sure about this since our IT-department did this. I can find out if needed.

                modx_transport_packages and modx_transport_providers tables seems to be okay, but for some reason i get 'provider_err_nf' on package download section. This ofcourse could have nothing to do with the update process.

                EDIT: active, priority and properties -fields are missing in 'modx_transport_providers' -table. Added these fields and this is also working now

                Thanks for your help!


                [ed. note: wintertribe last edited this post 8 years, 6 months ago.]
                  • 3749
                  • 24,544 Posts
                  I'm glad you got it sorted. 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
                    • 52315
                    • 1 Posts
                    The category table (modx_categories) should have a 'rank' field, which you may be able to add manually.

                    Your info has also helped me, thank you very much!
                    Best regards