Project

General

Profile

Actions

Bug #82861

closed

linkPopup option 'allowedExtensions' in TCA inputLink field not considered

Added by Tobias Klepp over 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
Start date:
2017-10-26
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.0
Tags:
tca, fieldControl, renderType, inputLink, linkPopup, option, allowedExtensions
Complexity:
Is Regression:
Sprint Focus:

Description

I setup the following TCA configuration:

        'link' => [
            'exclude' => 1,
            'label' => 'link',
            'config' => [
                'type' => 'input',
                'renderType' => 'inputLink',
                'size' => '50',
                'eval' => 'trim',
                'fieldControl' => [
                    'linkPopup' => [
                        'options' => [
                            'blindLinkOptions' => 'mail,page,spec,url,folder',
                            'blindLinkFields' => 'class,params,target,title',
                            'allowedExtensions' => 'html',
                        ],
                    ],
                ],
            ],
        ],

The allowedExtensions option has no effect in the Link browser popup. After some debugging, I found out, that the allowedExtensions parameter from the url is not available in $this->linkBrowser->getUrlParameters().

The effect is, that in FileLinkHandler.php on line 133 the allowed extensions are not present.

            if ($selectedFolder->checkActionPermission('read')) {
                $this->view->assign('selectedFolder', $selectedFolder);
                $parameters = $this->linkBrowser->getUrlParameters();
                $allowedExtensions = isset($parameters['allowedExtensions']) ? $parameters['allowedExtensions'] : '';
                $this->expandFolder($selectedFolder, $allowedExtensions);
            }
Actions

Also available in: Atom PDF