Issue Bug Closed

#102154Copy option in options.contextMenu.pages.disableItems

Oliver Schmidt 10/12/23, 14:43 updated 10/12/23, 16:45

Description

The User TSconfig documentation (https://docs.typo3.org/m/typo3/reference-tsconfig/main/en-us/UserTsconfig/Options.html#contextmenu-disableitems) says that

options.contextMenu.pages.disableItems = copy

should disable the copy option in the contextmenu. All options instead of copy set like this are hidden in both list context menu as well as in tree context menu. For copy you have to additionally set:

options.contextMenu.pages.tree.disableItems = copy

Seems the .context isn’t optional in that case. It should be fixed.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 7

  1. Chris Müller commented 10/12/23, 15:39

    In DefaultConfiguration.php the following settings are defined:

    options.contextMenu {
      table {
        pages {
          disableItems =
          tree.disableItems =
        }
        sys_file {
          disableItems =
          tree.disableItems =
        }
        sys_filemounts {
          disableItems =
          tree.disableItems =
        }
      }
    }

    https://github.com/TYPO3/typo3/blob/12.4/typo3/sysext/core/Configuration/DefaultConfiguration.php#L1340-L1355

  2. Chris Müller commented 10/12/23, 15:40

    If you find bugs in documentation, please open an issue in the according repository. The repository is linked on the bottom of each page.

  3. Chris Müller commented 10/12/23, 15:44

    Digging into it: The documentation described this:

    “The full path of this property is: contextMenu.table.[tableName][.context].disableItems”

    and

    “Optional key “[.context]” refers to the place from which the context menu is triggered. The core uses just one context called tree for context menus triggered from page tree and folder tree. This way you can disable certain options for one context, but keep them for another.”

    And the examples:

    # Remove "New" and "Create New wizard" for pages context menu (list module)
    options.contextMenu.table.pages.disableItems = new,newWizard
    
    # Remove "New" and "Create New wizard" in page tree context menu
    options.contextMenu.table.pages.tree.disableItems = new,newWizard

    So, there are two cases, as far as I can see. In the tree and outside the tree.

  4. Chris Müller changed status New Needs Feedback 10/12/23, 15:44

  5. Oliver Schmidt commented 10/12/23, 16:42

    If the “.context” option describes the context from which the context menu is invoked, why isn’t there a “.list” context? In tsconfig we often have options where it is possible to define something for all (e.g. contexts) and override it for special (context). Here you have to define it for each context separately. Fine. You can close this issue: it’s not a bug.

  6. Chris Müller commented 10/12/23, 16:45

    I can’t answer you the question, maybe historical reasons and backward compatibility.

  7. Chris Müller changed status Needs Feedback Closed 10/12/23, 16:45