New Community Forums are coming. Watch this space for news.
Subscribe: RSS
  • before you begin with this steps, you should comment that line, of course!

    Then do this steps agein (don't forget to save the record, before trying to add new records to the media-table)

    And please copy/paste the responded SELECT................ here (not an image)

    I need the generated mysql - statement of the media-grid, not the one of the mediaList - grid.

    This means, you should uncomment that line not before trying to load the media-grid.


      you can buy me a beer, if you like MIGX

    • OH! Now I get it! I'm sorry. Now I feel stupid smiley

      So yes, I did those steps in that order and I get this error:

      (SELECT `media`.`id`, `media`.`title`, `media`.`description`, `media`.`file`, `m...

      HOW on earth do I copy that FULL line in Firebug?! I can hover on it to show in full, but I don't know how to copy the full line...?
      • in the firebug-console, the tab 'all' - click the + - symbol at the post-response.

          you can buy me a beer, if you like MIGX

        • SELECT `media`.`id`, `media`.`title`, `media`.`description`, `media`.`file`, `media`.`medialist_id`, `media`.`pos`, `media`.`published`, `media`.`createdby`, `media`.`createdon`, `media`.`editedby`, `media`.`editedon`, `media`.`deleted`, `media`.`deletedon`, `media`.`deletedby`, `media`.`publishedon`, `media`.`publishedby`, `` FROM `modx_migx_media` AS `media` WHERE ( `MedialistItem`.`id` = 3 AND `media`.`deleted` = 0 ) ORDER BY id ASC LIMIT 10 {"total":"0","results":[]}

          Thank you for your patience.
          • ok, seems this isn't generated correctly. Can I see your xpdo-schema?

              you can buy me a beer, if you like MIGX


            • Sure.

              mediaList schema:

              media schema:
              • I think the issue is, you have both classes in different packages.
                MIGX, by default loads only one package in its getlist-processor and xpdo(modx) doesn't know anything about the other package at this moment.
                While its possible to load the other package additionaly, its not necessary, when your classes, which belong to this project, are all in the same package and defined in the same xpdo-schema.

                that said, you should put both definitions into one xpdo-schema.

                  you can buy me a beer, if you like MIGX


                • Ok. Thanks.
                  I made a new schema. Can you take a look at it and see if that looks better? Is that what you mean?
                  I changed the class name of "media" to "mediaFile" for clearity.


                  Do you see something else wrong with it? Is it OK to have the same name for a package and class name (as I do for mediaList)?

                  I guess I could just update the mediaList schema and run "Parse schema" + "create Tables", and then remove the old "media" package from the file system and the old "media" table.
                  • I just tried this and it works great!
                    The key was to only have one package (with multiple classes) smiley

                    Thank you for your help!

                    • How should I call the media files from the "mediaListRowTpl"?

                      I tried this, but nothing happens:

                      [[!migx? &configs=`mediaFile` &sortConfig=`[{"sortby":"pos","sortdir":"ASC"}]` &where=`{"published":"1"}`]]

                      That should just output an array (without the tpl-parameter), but it doesn't... [ed. note: Eminos last edited this post 6 years, 4 months ago.]