We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1331
    • 129 Posts
    Is anyone else having trouble getting the resource group checkboxes to stick with docs inside an articles container?

    I'm on Revo 2.2.8 (upgraded to 2.2.9, still not working) and Articles 1.7.1.

    The bad part about it is: I can't use the drag-n-drop method of adding articles to a resource group because you can't see inside the container.

    Very strange.
      • 50190
      • 6 Posts
      Go to: assets/components/articles/js/article/

      Edit these two files:
      create.js
      update.js



      Change this before submit function to this

          ,beforeSubmit: function(o) {
              var d = {};
      
              var tags = this.find('xtype', 'bxr-field-tags')[0];
              if(tags) {d.tags = tags.getValue()}
      
               var g = Ext.getCmp('modx-grid-resource-security');
              
           
              if (g) {
                         Ext.apply(o.form.baseParams,{
                             resource_groups: g.encode()
                         });
                     }
      
             
              Ext.apply(o.form.baseParams,d);
          }


      Credit to Jimmy!
        • 44007
        • 15 Posts
        I've just come across this myself - thanks for posting a solution.

        Is it ever going to make it into the Articles extra? I notice that even with this fix, a JS error is still being thrown in MODX 2.5 and Articles 1.7.11 when checking a resource group checkbox:

        TypeError: o.field is undefined
        /manager/assets/modext/widgets/resource/modx.panel.resource.js
        Line 270

        Ext.state.Manager.set('curFocus', o.field.id); [ed. note: wallacio last edited this post 10 years, 5 months ago.]
          • 3749
          • 24,544 Posts
          It might if someone reports the bug and the fix here: https://github.com/modxcms/Articles/issues, especially if the report includes a pull 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