We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42393
    • 143 Posts
    I have high bandwidth and a low tolerance for hunting through pages of data. smiley So I set my default_per_page system setting to 60 and was hoping to see 60 rows per grid throughout the manager, as advertised. But that doesn't happen. Looking at the code, there are many places where the pageSize is still hardcoded to 10 or 20. In one place it's throttled at 30.

    I've made a list of many scripts where a simple change is required:
    from: pageSize: xx
    to : pageSize: MODx.config.default_per_page > 100 ? MODx.config.default_per_page : 100

    It's not quite as simple as that.
    - In the above I'm still hardcoding 100 as an ultimate maximum. It would be better to set this as a constant somewhere.
    - It's arguable whether a ComboBox should be subject to the same default as grids. I would propose another setting called default_per_grid and let users decide on that.
    - There are many calls direct to ext.JS and the syntax being used in these calls is different around the app, so finding and modifying all of these is a chore. The parameter value for these calls is 'limit', and FYI, Ext.JS itself has a hardcoded page size of 20 if it's not specified.

    Anyway, would someone here like to volunteer to walk this path with me? In fact, you don't need to write any code. I'll do all of the coding. I just need an occasional tip on where to find things. And I have no clue about standard practices here for checking in code, commenting, getting peer review, etc.

    Where is the best place to take this? Carry on the discussion here in the open? In PMs? Email?

    Looking forward to contributing in my own small way.
    Thanks!
      Loved ModX when I was using it a few years ago. Shifted to WordPress, sorry. Thanks, all.
      • 10208 ☆ A M B ☆
      • 1,780 Posts
      You may be quite happy hanging your raincoat on a hook here: http://tracker.modx.com/projects/modx-proposals

      2.2.5 was the first version to be able to "maintain" a setting over 20 in package management (released maybe 9w ago??). Used to be that you could set it but if you installed or upgraded a package, it returned to default. I could hardly contain myself when I noticed that it kept what it set it to (even posted about it here).

      I'm seeing some more default behavior sporadically throughout the manager now with the default setting (got mine at 100) but like you say, it isn't global yet.
        Frogabog- MODX Websites in Portland Oregon
        "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
        Having server issues? These guys have MODX Hosting perfected - SkyToaster
        • 42393
        • 143 Posts
        I'd be happy to send my modified 2.2.6 scripts to anyone who wants access to page sizes in line with their default_per_page setting. Then just tell me where you are Not seeing the enhancement and I'll add that to a target list for the next update.

        That said, I don't want to run before I crawl here. No one knows if my code is secure or of suitable quality. And frankly I don't know how to create a patch to do a mass update of files across the application.

        After making about 20 changes I did a different search and found maybe 30 more targets that I need to research. Like for the life of me I can't figure out why the Package Management page always has 10 items. I spent 2 hours trying to figure out where the setting or default for that is. My next step will be to walk through that code in debug. sad But I expect there will be a number of those.

        And then there are other things to discuss. For example, my ModX home page security feed and news feed are HUGE - I don't want that history re-loaded every time I open the manager. I think there should be custom settings just for those grids. How many of those might there be? Rather than having a system setting for all of these grids, perhaps it would be more elegant to have a maintenance page where we can select a grid and the setting just for that grid. From what I've seen in the code I think I could do that, but I wouldn't know how to integrate it into the manager yet.

        Anyway, it's for all of these reasons that I suggested taking this discussion out of the forum. smiley

        ...Not young enough anymore to be this eager... wink
          Loved ModX when I was using it a few years ago. Shifted to WordPress, sorry. Thanks, all.
          • 10208 ☆ A M B ☆
          • 1,780 Posts
          The boys will be back in a few hours, they'll tell you how to handle this. It's also ok to stay here for now as well.

          I'd take those scripts. I gotta admit I never thought about or looked into actually modifying the page defaults but it's sure bugged the hell out of me since day one.
            Frogabog- MODX Websites in Portland Oregon
            "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
            Having server issues? These guys have MODX Hosting perfected - SkyToaster
            • 3749
            • 24,544 Posts
            The most helpful method would be to use Git, clone the current dev version, make your changes, and issue a pull request.

            Almost as good, would be to make a feature request at http:/bugs.modx.com and just list all the places that need changing.

            Another option would be to zip up the files you've changed and attach that file to the feature request.
              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