We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36632
    • 202 Posts
    1) In the Resource Settings tab, modResource is the default Resource Type when creating a new Resource. When the actual Resource is selected and saved, modResource is non longer an option (as if it ever was).

    1a) Saving the Resource without changing the Resource Type shows at error at the top of the screen:
    [2011-11-18 01:27:32] (ERROR @ /manager/index.php) Instantiated a derived class modResource that is not a subclass of the requested class modDocument

    This is a traditional install into LAMP. [ed. note: ultrasef last edited this post 12 years, 5 months ago.]
    • I'm running into this same exact problem on MAMP.

      [2011-11-23 11:54:40] (ERROR @ /All_Fired_Up/manager/index.php) Instantiated a derived class modResource that is not a subclass of the requested class modDocument


      Is this just a bug or is there a way to define in System Settings for the default "Resource Type" to be "Document"?
        Precision Web Development ... SmashStack.com
      • To help narrow down the specific conditions in which "Resource Type" is defaulting to "modResource", it's only occurring when I add a new MODx document under an existing document in the tree structure. If I click on the "New Document" icon above the tree structure, this isn't happening...it's only happening when I add a new document (make it a child document) in the tree.

        Hope this helps clarify.
          Precision Web Development ... SmashStack.com
          • 36632
          • 202 Posts
          Revisiting this minor issue: Quick Create has the correct Resource Type Setting already selected.
            • 20093
            • 81 Posts
            I spent some time trying to track this down and I think i have isolated the culprit. For Revo 2.2-rc2 it's in /manager/controllers/default/resource/resource.class.php on Line 49:

            $resourceClass = in_array($_REQUEST['class_key'],array('modDocument','modResource')) ? 'modResource' : $_REQUEST['class_key'];


            I'm not sure what the intention is here, but it's causing any request with a class_key of 'modDocument' to be converted to 'modResource'. I am guessing it has something to do with handling custom resource types.

            The only filed bug I could find which comes close to this is http://bugs.modx.com/issues/6060 but that's been closed. And it still doesn't directly adress the bug being discussed here. I'd like to report the bug but have been unable to create an account on the Issue Tracker to do so. The 'create an account' link (http://modxcms.com/community/register) give me a 404.
              • 36632
              • 202 Posts
              Interestingly enough, the Quick Create defaults to modDocument.
                • 20093
                • 81 Posts
                I don't have it in front of me right now to check, but I believe that is because the QuickCreate function doesn't have to pass/intercept its values through an HTTP request. So I guess it's assumed that the class_key is correct. and isn't matched against an array as in the code i pasted above.

                I'll look into it further if I get a chance later. In the meantime, can anyone more knowledgeable about the revo 2.2 code-base chime in on this? Keep in mind that the regular devs are probably not going to be looking at this stuff over the weekend.
                  • 28215
                  • 4,149 Posts
                  Can someone file it in a bug report: http://bugs.modx.com/projects/revo/issues

                  Things filed in bug reports have a much higher chance of being fixed; we'd love to get this fixed for 2.2-pl. Thanks!
                    shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
                    • 20093
                    • 81 Posts
                    Thanks, splittingred. I'd love to, but I mentioned in my first post that I am unable to register on the bug tracker, leaving this forum as my only available recourse. How can I sign up for an account so I can formally submit this?
                      • 28215
                      • 4,149 Posts
                      MokoJumbie:

                      Use the account you're logged into the forums with. It's all SSO.
                        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com