Project

General

Profile

Actions

Bug #102154

closed

Copy option in options.contextMenu.pages.disableItems

Added by Oliver Schmidt 7 months ago. Updated 7 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2023-10-12
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.1
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.

Actions #1

Updated by Chris Müller 7 months ago

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

Actions #2

Updated by Chris Müller 7 months ago

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

Actions #3

Updated by Chris Müller 7 months ago

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.

Actions #4

Updated by Chris Müller 7 months ago

  • Status changed from New to Needs Feedback
Actions #5

Updated by Oliver Schmidt 7 months ago

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.

Actions #6

Updated by Chris Müller 7 months ago

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

Actions #7

Updated by Chris Müller 7 months ago

  • Status changed from Needs Feedback to Closed
Actions

Also available in: Atom PDF