Project

General

Profile

Actions

Bug #103003

closed

Problem with workspace generate view button for plugin

Added by taieb rekik 9 months ago. Updated 16 days ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Workspaces
Target version:
-
Start date:
2024-01-31
Due date:
% Done:

0%

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

Description

Hi,

I found a problem with the core, it's related to the package workspace, the problem is generating a link for the view button for the plugin it was missing "&" between the queryString and the additional query string, to reproduce the problem:
1: configure the Preview link for any typo3 plugin for example News
2: switch to workspace
3: Go to list module for example
4: click/ check the view button link

Problems come from this class

TYPO3\CMS\Workspaces\Hook\BackendUtilityHook

Before

 if ($event->getAdditionalQueryParameters() !== []) {
            $queryString .= http_build_query($event->getAdditionalQueryParameters(), '', '&', PHP_QUERY_RFC3986);
}

Solution

if ($event->getAdditionalQueryParameters() !== []) {
     $endChar = strlen($queryString) > 0 && !str_ends_with($queryString, "&")? '&' : '';
     $queryString .= $endChar.http_build_query($event->getAdditionalQueryParameters(), '', '&', PHP_QUERY_RFC3986);
}


Files

clipboard-202401311118-zn4o1.png (57.2 KB) clipboard-202401311118-zn4o1.png taieb rekik, 2024-01-31 10:18

Related issues 1 (0 open1 closed)

Is duplicate of TYPO3 Core - Bug #103346: Url Generation for View Button of records wrongClosed2024-03-08

Actions
Actions #1

Updated by Mathias Brodala about 2 months ago

  • Is duplicate of Bug #103346: Url Generation for View Button of records wrong added
Actions #2

Updated by Mathias Brodala about 2 months ago

  • Status changed from New to Resolved

This was fixed with #103346 in the meantime.

Actions #3

Updated by Benni Mack 16 days ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF