We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5143
    • 116 Posts
    It's me again, I'm afraid.

    I'm following the tutorial here: http://rtfm.modx.com/extras/revo/migxdb/migxdb.tutorials/migxdb.manage-child-resources-in-a-grid-tv-with-help-of-migxdb and I've hit another stumbling block. When I get to the section marked "Creating and Editing child-Resources" and try to load the grid, the display boxes returns "No items found".

    I've tried searching online but haven't been able to find any info.

    Any suggestions? [ed. note: chr.s last edited this post 12 years, 6 months ago.]
      • 4172
      • 5,888 Posts
      you can try to debug the getlist-processor.
      Should be this one:

      https://github.com/Bruno17/migxchildresources/blob/master/core/components/migxchildresources/processors/mgr/default/getlist.php#L133

      uncomment this line to:

      $c->prepare(); echo $c->toSql();


      and watch the response of your firebug-console, when you load or try to refresh the grid-view.
      This will produce a javascript-error and you need to reload the page after one time testing.

      But you should see the generated sql-query with the response.
      Can post this here then?
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 5143
        • 116 Posts
        It doesn't look much like an sql-query to me, but this is the output generated:

        GET http://nikkomsgchannel/e?00160022005a00210047004b006a0021002c00500056002600…300041002d005c001e0053002d0036005c0005002f0050002f005e002d005c00510059002e  VM405:63
        rapport_nikko_send_focus_event VM405:63
        rapport_nikko_on_focus VM405:73
        GET http://nikkomsgchannel/e?00160022005a00210047004b006a0021002c00500056002600…410036005d005600130024002b00430055007c0057002d005e0029005d0056005c002e0028  VM405:50
        rapport_nikko_on_blur VM405:50
          • 4172
          • 5,888 Posts
          ok, this is not the ajax-response.
          you should see something like that:
          SELECT `modResource`.`id`, `modResource`.`type`, `modResource`.`contentType`, `modResource`.`pagetitle`, `modResource`.`longtitle`, `modResource`.`description`, `modResource`.`alias`, `modResource`.`link_attributes`, `modResource`.`published`, `modResource`.`pub_date`, `modResource`.`unpub_date`, `modResource`.`parent`, `modResource`.`isfolder`, `modResource`.`introtext`, `modResource`.`content`, `modResource`.`richtext`, `modResource`.`template`, `modResource`.`menuindex`, `modResource`.`searchable`, `modResource`.`cacheable`, `modResource`.`createdby`, `modResource`.`createdon`, `modResource`.`editedby`, `modResource`.`editedon`, `modResource`.`deleted`, `modResource`.`deletedon`, `modResource`.`deletedby`, `modResource`.`publishedon`, `modResource`.`publishedby`, `modResource`.`menutitle`, `modResource`.`donthit`, `modResource`.`privateweb`, `modResource`.`privatemgr`, `modResource`.`content_dispo`, `modResource`.`hidemenu`, `modResource`.`class_key`, `modResource`.`context_key`, `modResource`.`content_type`, `modResource`.`uri`, `modResource`.`uri_override`, `modResource`.`hide_children_in_tree`, `modResource`.`show_in_tree`, `modResource`.`properties`, `CreatedBy`.`id` AS `CreatedBy_id`, `CreatedBy`.`username` AS `CreatedBy_username`, `CreatedBy`.`password` AS `CreatedBy_password`, `CreatedBy`.`cachepwd` AS `CreatedBy_cachepwd`, `CreatedBy`.`class_key` AS `CreatedBy_class_key`, `CreatedBy`.`active` AS `CreatedBy_active`, `CreatedBy`.`remote_key` AS `CreatedBy_remote_key`, `CreatedBy`.`remote_data` AS `CreatedBy_remote_data`, `CreatedBy`.`hash_class` AS `CreatedBy_hash_class`, `CreatedBy`.`salt` AS `CreatedBy_salt`, `CreatedBy`.`primary_group` AS `CreatedBy_primary_group`, `CreatedBy`.`session_stale` AS `CreatedBy_session_stale`, `CreatedBy`.`sudo` AS `CreatedBy_sudo` FROM `modx_site_content` AS `modResource` LEFT JOIN `modx_users` `CreatedBy` ON `modResource`.`createdby` =  `CreatedBy`.`id` WHERE  ( `modResource`.`deleted` = 0 AND `modResource`.`parent` = 125 )  ORDER BY menuindex ASC LIMIT 10
          


          But are you sure there are any children for this resource, where you are currently?
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 5143
            • 116 Posts
            At the time I posted there were no children in the resource - the instructions didn't explicitly state there ought to be, but perhaps I should've guessed there should. Anyway, I since added a child resource but still with the same result.

            The only console message I get is as above.

            I'm currently in a container resource (project1) which now has a single child resource (event1).
              • 4172
              • 5,888 Posts
              ok, when there were no childs, then "No items found" was correct.
              Because its configured to show only children of the resource, where you are, by default.

              Did you comment this line again, now, after adding a children?

              //$c->prepare(); echo $c->toSql();


              And I think, it's worth to learn how to use the firebug-console or chrome-developer-tools to watch ajax - requests/responses and do other debugging.
                -------------------------------

                you can buy me a beer, if you like MIGX

                http://webcmsolutions.de/migx.html

                Thanks!
                • 5143
                • 116 Posts
                ok, when there were no childs, then "No items found" was correct.
                Because its configured to show only children of the resource, where you are, by default.
                I assumed that maybe "load grid" would generate a rudimentary grid of resources, but I understand now - your explanation makes sense.

                I hadn't changed that line back though - it's still uncommented.

                I'm familiar with the console, if only for basic Javascript debugging, but I agree there's definitely a lot more I could learn. I'm tempted to uninstall MIGX and associated plugins completely and start again, in case it's related to the issue I was having with mod secure yesterday.
                  • 4172
                  • 5,888 Posts

                  I hadn't changed that line back though - it's still uncommented.

                  you should change it back, if you not longer want to debug the generated mysql-string.
                  Otherwise the grid doesn't show anything, because the echoed mysql-string within the response does produce an javascript-error.
                    -------------------------------

                    you can buy me a beer, if you like MIGX

                    http://webcmsolutions.de/migx.html

                    Thanks!
                    • 5143
                    • 116 Posts
                    I tried as you suggested last night - along with a couple of other attempts.

                    In the end I uninstalled, reinstalled, and all seems to be working fine now. My suspicions are that it had something to do with the mod secure; either way everything seems to be working perfectly now.