Issue Bug Closed

#103003Problem with workspace generate view button for plugin

taieb rekik 01/31/24, 10:24 updated 10/15/24, 09:30

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);
}

clipboard-202401311118-zn4o1.png

Reviews 0

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

Files 1

History 3

  1. Mathias Brodala changed Duplicates #103346 09/03/24, 10:56

  2. Mathias Brodala commented and changed status New Resolved 09/03/24, 10:56

    This was fixed with #103346 in the meantime.

  3. Benni Mack changed status Resolved Closed 10/15/24, 09:30