We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19226
    • 7 Posts
    I was trying to understand what Class Key did. The field contained "modDocument". I added another word to that list as in "modDocument, myClass". I pressed save and the document disappeared from the list of resources. With it still on the screen, I returned the Class Key field to the original "modDocument", pressed save again, and received the error "Resource not found with ID: 2".

    Document id 2 seems to have completely disappeared!

    In the error log:

    [2010-04-13 04:10:17] (ERROR @ /connectors/resource/index.php) Could not load class: modDocument, myClass from mysql.moddocument, myClass.

    Ok, I see I did something dumb here, how can I recover?
      • 19226
      • 7 Posts
      Ok, to whomever gets themselves into this situation, here’s how to get out of it:

      Go into sql (for example, use myPHPAdmin)

      Find the table named "modx_site_content"

      Find your missing resource

      Edit the class_key field and return it to what it should be

      The missing resource will come back.

        • 22303 MODX Staff
        • 10,725 Posts
        The class key field is there for convenience right now; makes it possible to manually change the type of Resource it is (modDocument, modStaticResource, modSymLink or modWebLink) until we implement a better way to do so without the possibility of human error in selecting the new class_key, as well as doing any cleanup to the Resource necessary to convert it to the target type.