We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28042 ☆ A M B ☆
    • 24,524 Posts
    Here’s a "fixed" version of duplicate_content.processor.php that also duplicates the hidemenu status, as well as the content_dispo status.

    I’m having an odd problem fixing the createdon and createdby fields; I thought an UPDATE query would take care of it, and it does for the original document being duplicated. But I can’t get it to work for the children.
      Studying MODX in the desert - http://sottwell.com
      Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
      Join the Slack Community - http://modx.org
      • 22303 MODX Staff
      • 10,725 Posts
      Susan, already fixed in 0.9.1 -- check the bug tracker...
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Well, pooh! After two evening of work, I finally even got the children documents fixed. rolleyes And learned something in the process! You can use a specific value in a "SELECT" query! So it didn’t need any UPDATE queries after the document was created after all!

        $sql = "SELECT type, contentType, pagetitle, longtitle, description, published, pub_date, unpub_date, '$parent' as 'parent', isfolder, introtext, content, richtext, template, menuindex, searchable, cacheable, ".$_SESSION['mgrInternalKey'].", ".time().", editedby, editedon, deleted, deletedon, deletedby, menutitle, donthit, privateweb, privatemgr, content_dispo, hidemenu  FROM $dbase.".$table_prefix."site_content WHERE id IN ($docs_to_duplicated);";
        


        So the time wasn’t really wasted since I learned something that’s very nice to know.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org