We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8898
    • 181 Posts
    Hi,

    at the moment I’m quite puzzled by an inconsistency I’m fighting with.

    On a site of a dancing club (competition dancing), I’m using some resources for data input. In the web context, the resource tree looks like this:

    Configuration (93)
    -- Couples (94)
    -- -- Smith / Wesson (95)
    -- -- Pratt / Whitney (96)
    -- -- [...]
    -- Contact addresses (108)
    -- -- Trainer (109)
    -- -- President (110)
    -- -- [...]
    Home (3)
    What we offer (4)
    [...]

    (well, in German wink). I created two templates for the resources in "Couples" and in "Contact addresses" without template code, but with several template variables attached to them.

    Via form customization I modified the forms (content field hidden, two tabs hidden, some more fields hidden, renamed the "Create/edit document" and "Template Variables" tabs, modified some default values). For "resource/update" I chose the template as constraint, for "resource/create" the parent ID. First I created everything that I mentioned for the "Couples" branch and set the default template for "resource/create" via form customization to the template with the ID 13 that holds the necessary TVs. This works perfectly. Then I did the same things for the "Contact addresses" branch; in form customization I just duplicated all the rules one by one and edited them so they now use the appropriate values. As default template for "resource/create" I chose the template with the ID 14 now.

    Everything works here, too - except that in this case, when creating a new resource in "Contact addresses", the wrong set of TVs is displayed; it’s the one of the normal default template. "Changing" the template from ID 14 to ID 14 (yes, to the same template that’s already displayed in the dropdown field) fixes the problem, but I’d really like this to work as is does in the "Couples" branch where this issue doesn’t occur.

    I just can’t find out what I did differently here: Both the "Couples" and "Contact addresses" resources don’t have a template assigned to them, they are both not published and hidden from the menus, the form customization rules have been duplicated one by one (I double-checked them to make sure they use the correct values) and therefore their ranks are the same, the templates just use different TVs, etc. I don’t know where else to look for some differences...

    Does anyone have an idea why these two apparently similar constructions behave differently? I’d be grateful for any advice!

    Cheers,
    Jan
      This message has been ROT-13 encrypted twice for higher security.
      • 8898
      • 181 Posts
      If this is a bug, I’d be happy to report it via the bug tracker, but since it works correctly in one of the two cases, I’m not sure about it... Can anyone confirm this behavior?

      Cheers,
      Jan
        This message has been ROT-13 encrypted twice for higher security.
        • 14585
        • 1 Posts
        I have a very similar problem. (MODx Rev. 2.0.4-pl2)(Advanced Distribution)

        I have two containers one with id: 6 and another with id: 10

        I have set 2 rules for "core - resource/create" setting the default template for resources in this containers and constraining by:
        Constraint Class: modResource
        Constraint Field: id
        Constraint: 6 (10 in the second rule)
        For Parent: checked.

        The second rule don’t work, but if I deactivate the first rule the second rule work fine. undecided
        Seems that only one can work. sad


        Sorry about my poor english.
          • 28215
          • 4,149 Posts
          Can you file that as a bug here: http://bugs.modx.com/
            shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
            • 8898
            • 181 Posts
            Quote from: splittingred at Nov 17, 2010, 10:49 PM

            Can you file that as a bug here: http://bugs.modx.com/
            Well, yes, of course (see http://bugs.modx.com/issues/2819), but as stated above I waited for a confirmation that this is indeed a bug. wink

            Cheers,
            Jan
              This message has been ROT-13 encrypted twice for higher security.