Project

General

Profile

Actions

Bug #90404

closed

Linkhandler removes all attributes set in fluid viewhelper if parameter uses stdWrap

Added by Kevin Appelt about 4 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2017-04-20
Due date:
2017-04-20
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

After an update from v8 to v9 link handler does not work correctly anymore:
The link is generated, but all attributes set in the viewhelper (like classes) are removed.

There is an old issue created by myself which was solved: https://forge.typo3.org/issues/81620

The problem is now slightly different: The classes remain available as long as the PageId is specified directly in the configuration as parameter, but this is not possible in my case because I get the PageId from a relation.

config {
  recordLinks {
    myext {
      typolink {
        parameter.stdWrap.cObject = CONTENT
        parameter.stdWrap.cObject {
          table = tx_myext_domain_model_product
          select {
            uidInList.data = field:uid
            pidInList = root
            recursive = 99
            orderBy = tx_myext_domain_model_product.uid
            max = 1
            selectFields = tx_myext_domain_model_category.page
            leftjoin = tx_myext_domain_model_category ON tx_myext_domain_model_product.category = tx_myext_domain_model_category.uid
          }
          renderObj = TEXT
          renderObj {
            field = page
          }
        }
        additionalParams {
          data = field:uid
          wrap = &tx_myext_products[product]=|&tx_myext_products[action]=show&tx_myext_products[controller]=Product
          insertData = 1
        }
        useCacheHash = 1
        ATagParams.data = parameters:allParams
        target.data = parameters:target
        title.data = parameters:title
      }
    }
  }
}

If I replace the whole parameter section with just "parameter = 57" (which is one of the correct pageIds) the linkhandler works as expected.

If I use the linkhandler in the RTE everything is fine and the link is generated correctly with the classes set.

<f:link.typolink parameter="{link}" class="btn"> generates <a href="the_rendered_link"> and removes the class completely.


Related issues 4 (0 open4 closed)

Related to TYPO3 Core - Bug #81620: Linkhandler remove all attributes set in the link wizard and the templateClosed2017-06-19

Actions
Related to TYPO3 Core - Bug #97869: typolink with returnLast returns also more information than just the URLClosedBenni Mack2022-07-07

Actions
Related to TYPO3 Core - Bug #98108: Regression with nested parameter for typolinkClosed2022-08-09

Actions
Follows TYPO3 Core - Bug #80896: TypolinkViewhelper with linkhandler ignores class attributeClosed2017-04-19

Actions
Actions

Also available in: Atom PDF