We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17665
    • 54 Posts
    Maybe I’m just stupid, but it seems to me that not all of the access permissions copy over properly when you duplicate a document that has more than 1 child. The last child to be duplicated seems to pickup some random permissions. Please let me know if this is in fact a bug and what needs to be done to fix it. I’ve poked around the content duplicator processor and I can’t quite see what’s wrong. If it’s a bug and not just my stupidity, I’ll be happy to add it to the bug tracker.

    Thanks. You guys are the best!
      • 17665
      • 54 Posts
      There haven’t been any replies to this so that probably means it’s just me... I guess I’ll submit it to the bug tracker anyway. I just wanted to post here first because in the past things I thought were bugs were actually "I" "D" "10" "T" errors on my part.
        • 32241
        • 1,495 Posts
        It doesn’t happen on my case though. I have a folder contain 4 documents and 1 subfolder. Inside the subfolder, I have 1 document beneath it. I duplicate them, and everything seems to be duplicated right.
          Wendy Novianto
          [font=Verdana]PT DJAMOER Technology Media
          [font=Verdana]Xituz Media
          • 17665
          • 54 Posts
          This is really strange... huh

          I did some more testing with various numbers of child documents (4, 6, 9) in the folder and I was getting some really strange results. It seemed like the 3rd document was always wrong, the 4th was right and the 5th on would be wrong until you get to the 7th doc. Ok, I know by now you think I’m insane (believe me, you wouldn’t be wrong) but what makes things a little stranger is that when I actually query the database in mysql to see what’s going on I notice that all of the doc permissions are there, but the document number was never updated correctly. When I query the permissions for the second doc (remember the third doc has no permissions) I see this:

          id document_group document
          2764 10 774
          2765 9 774
          2766 84 774
          2785 10 774
          2786 9 774
          2787 84 774

          Those last three entries should have been document 775. Same thing happens with doc 7:

          id document_group document
          2767 84 779
          2768 9 779
          2769 10 779
          2770 84 779
          2771 9 779
          2772 10 779
          2791 10 779
          2792 9 779
          2793 84 779

          The missing document permissions are there, they were just put into the database with the wrong document number. If it helps, I’m running MySQL 4.1.9-standard and using I.E. (sorry) in the manager interface.

          Maybe there’s something wrong with our MySql server? Any help as to how to fix this would be greatly appreciated.

          Thanks!





            • 22303 MODX Staff
            • 10,725 Posts
            Just sounds like a defect in the duplication code. Could you please log this in the bug tracker, and I bet we can work the fixes in for 0.9.2. Thanks!
              • 17665
              • 54 Posts
              You mean I might not be crazy?!? grin

              That’s too much to believe. It may still be something with our setup, but either way, I posted it on the bug tracker here:
              http://modxcms.com/bugs/task/253

              If you do figure out what fix needs to be added, I’d love to know about it. I took a look at the code myself when I first noticed it but I didn’t see any obvious problems. Recursive php functions can be a little tricky... I’ll poke around with it a bit more if you like (now that I have a better understanding of what’s happening). It still seems a bit random though.

              You guys are awesome! Some day I hope to give more back to this great community. Thank you for everything you do to make the best product out there.