Project

General

Profile

Actions

Bug #84568

closed

chash not generated

Added by Frank Buijze about 6 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Extbase
Start date:
2018-03-30
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.2
Tags:
pending-close
Complexity:
Is Regression:
Sprint Focus:

Description

The following problem occurs if one creates a plugin with multiple controller, action combinations.

If one generates a link without additional arguments for the first action in the first controller in the configuration no chash will be generated. This in turn causes a "cHash empty" error if a POST ajax call is made to the generated url.

If one inserts a fake action before the first action in the list a cHash will be generated for the now second action. When a call is made to this new url everything works as expected and the "cHash empty" message is gone.

Four possible solutions:
- Adjust the chash check for this particular situation. No arguments, no cHash check (probably the preferred one)
- Generate a cHash for the first action as well
- Introduce an option to force the generation of a cHash in Fluid, even if it's the default action
- Describe this situation in the documentation

<f:uri.action action="getUsersViaAjaxAdmin" controller="User" pageType="500"/>

ext_localconf.php

\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'FraJaWeB.'.$_EXTKEY,
'AjaxAdmin',
array(
'User' => 'getUsersViaAjaxAdmin',
'Customer' => 'getCustomersViaAjaxAdmin',
),
// non-cacheable actions
array(
'User' => 'getUsersViaAjaxAdmin,
'Customer' => 'getCustomersViaAjaxAdmin',
)
);

My temporary fix:

\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'FraJaWeB.'.$_EXTKEY,
'AjaxAdmin',
array(
'User' => 'bogus,getUsersViaAjaxAdmin',
'Customer' => 'getCustomersViaAjaxAdmin',

),
// non-cacheable actions
array(
'User' => 'getUsersViaAjaxAdmin,
'Customer' => 'getCustomersViaAjaxAdmin',
)
);

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Task #84537: Backport useCacheHash argument for widget linksClosed2018-03-27

Actions
Related to TYPO3 Core - Bug #88391: chash not generated in f:widget.paginate ViewHelperClosed2019-05-18

Actions
Actions #1

Updated by Frank Buijze about 6 years ago

  • Target version set to 8.7.13
  • Tags set to 8.7.12
Actions #2

Updated by Frank Buijze about 6 years ago

  • Tags deleted (8.7.12)
Actions #3

Updated by Frank Buijze about 6 years ago

  • Related to Task #84537: Backport useCacheHash argument for widget links added
Actions #4

Updated by Benni Mack almost 6 years ago

  • Target version changed from 8.7.13 to 8.7.19
Actions #5

Updated by Susanne Moog over 5 years ago

  • Target version changed from 8.7.19 to Candidate for patchlevel
Actions #6

Updated by Josef Glatz almost 5 years ago

  • Related to Bug #88391: chash not generated in f:widget.paginate ViewHelper added
Actions #7

Updated by Alexander Schnitzler about 4 years ago

  • Status changed from New to Accepted
Actions #8

Updated by Oliver Hader over 2 years ago

  • Status changed from Accepted to Needs Feedback

I guess this is not possible anymore with TYPO3 v9 - since PageRouter now would enforce the generation of a cHash parameter in case no static route is configured for those parameters.

Actions #9

Updated by Oliver Hader over 2 years ago

  • Tags set to pending-close
Actions #10

Updated by Oliver Hader over 2 years ago

  • Status changed from Needs Feedback to Closed

Closing this issue. Feel free to reopen in case the problem occurs again.

Actions

Also available in: Atom PDF