We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9207 ☆ A M B ☆
    • 2,475 Posts
    Is this a bug? Or is this a behavior I can configure?

    I have a folder structure like this for my resources:
    MasterFolder
      + SubFolder1
         + page1
         + ... 



    When I right-click the master folder and choose to Duplicate it and its children, I’ve noticed that the alias of one of the sub-folders does NOT match the original. SubFolder1 (in my example) has the following attributes:


    • title: Resources & Case Studies
    • long title: Resources & Case Studies
    • alias: resources-case-studies
    • menu title: Resources & Case Studies

    However, on the duplicated folder structure, the corresponding SubFolder1 (copy) has the following attributes

    • title: Resources & Case Studies
    • long title: Resources & Case Studies
    • alias: resources-and-case-studies
    • menu title: Resources & Case Studies

    Expected: the alias of the duplicated subfolder should be the same as the original: resources-case-studies
    Actual: the alias of the duplicated subfolder does not match the original. Instead it appears to have been generated from the title: resources-and-case-studies

    It appears that the duplicate function totally ignores the alias in the master resources and instead overwrites the alias with an alias generated from the page’s title.

    System Stuff

    Revolution 2.0.7-pl (traditional)
    PHP 5.3.3 (also occurs on 5.2.13)
    MySQL 5.1.44

    Settings:
    +---------------------------------------+--------------------------------------------------+
    | key                                   | value                                            |
    +---------------------------------------+--------------------------------------------------+
    | automatic_alias                       | 0                                                | 
    | friendly_alias_lowercase_only         | 1                                                | 
    | friendly_alias_max_length             | 0                                                | 
    | friendly_alias_restrict_chars         | pattern                                          | 
    | friendly_alias_restrict_chars_pattern | /[\0\x0B\t\n\r\f\a&=+%#<>"~`@\?\[\]\{\}\|\^'\\]/ | 
    | friendly_alias_strip_element_tags     | 1                                                | 
    | friendly_alias_translit               | none                                             | 
    | friendly_alias_translit_class         | translit.modTransliterate                        | 
    | friendly_alias_trim_chars             | /.-_                                             | 
    | friendly_alias_urls                   | 1                                                | 
    | friendly_alias_word_delimiter         | -                                                | 
    | friendly_alias_word_delimiters        | -_                                               | 
    | request_param_alias                   | q                                                | 
    | use_alias_path                        | 1                                                | 
    | allow_duplicate_alias                 |                                                  | 
    | friendly_alias_translit_class_path    | {core_path}components/                           | 
    +---------------------------------------+--------------------------------------------------+
      • 22303 MODX Staff
      • 10,725 Posts
      I personally think it should only regenerate the alias on duplication if a) either use alias paths or allow duplicate aliases are set to false or b) there is no alias in the original. Want to enter the ticket Everett?
        • 9207 ☆ A M B ☆
        • 2,475 Posts
        Yep, that’s exactly what I was thinking, Jason wink

        Bug reported here: http://bugs.modx.com/issues/3677