We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 43374
    • 39 Posts
    Is there a setting or a hack which makes it possible to (temporarily) disable the automatically added "Duplicate of" phrase which is automatically generated if I duplicate a folder with multiple child resources?

    I need to disable it for "Title" and "Resource Alias" or for everything is fine too.

    I allready looked in /core/model/modx/processors/resource/duplicate.class.php but didn't find the part that needs to be changed.

    I will rename the parent during creation and all childs can keep the same name as the originals.

    This question has been answered by BobRay. See the first response.

    • discuss.answer
      • 3749
      • 24,544 Posts
      I think if you create a System Setting with the key prefixDuplicate and set its value to false, the prefix might not be used. It depends on whether the local getProperty() implementation checks System Settings.

      Probably better, you can edit the 'duplicate_of' lexicon string in System -> Lexicon Management (just put duplicate_of in the search box at the upper right and press enter). Your change will survive upgrades.


      Finally, the code that does it is in the core\model\modx\processors\resource\duplicate.class.php file around line 932.
        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
        • 43374
        • 39 Posts
        Thanks again for your help!

        What finally worked for me was to delete following line
                    'prefixDuplicate' => $this->getProperty('prefixDuplicate',false),

        found on line 55 of core\model\modx\processors\resource\duplicate.class.php

        I used a MODX Revolution 2.2.8-pl (traditional) installation
          • 3749
          • 24,544 Posts
          You probably know this, but for others, that change will likely be overwritten when you upgrade MODX.

          Did you try just changing the duplicate_of lexicon string to a blank?
            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