Open prdt3e opened 6 years ago
solution approach:
config: for specific action / controller (switchablecontrolleractions(get) in your ext):
<part needle="tx_news_pi1[action]" for="detail">
<parameter>cHash</parameter>
</part>
for all action / controller
<part needle="tx_myext[action]">
<parameter>cHash</parameter>
</part>
Translate.php 544
if(!empty($ppart['needle']) && !empty($ppart['for'])){
if(array_key_exists((string)$ppart['needle'],$uri->originalparams) && $uri->originalparams[(string)$ppart['needle']] == (string)$ppart['for']){
unset($uri->params[(string)$ppart->parameter]);
}
}elseif(!empty($ppart['needle'])){
if(array_key_exists((string)$ppart['needle'],$uri->originalparams)){
unset($uri->params[(string)$ppart->parameter]);
}
}else{
unset($uri->params[(string)$ppart->parameter]);
}
Hi, you wouldn't need this if you'd map all URL parameters. Well, I can undestand that with some extensions this can be impossible. Anyway, there's always option of userFunc on every parameter, why not go with that? It'd look like
function myChashHandler($lConf, $cHashValue, $originalParams) { if (!empty($originalParams[...])) { return $cHashValue; } return ''; // or maybe null, I'm not sure }
Jan
Dne 15.10.2017 v 2:53 prdt3e napsal(a):
solution approach:
config:
<part needle="tx_news_pi1[action]" for="detail"> <parameter>cHash</parameter> </part>
Translate.php 544
|if(!empty($ppart['needle']) && !empty($ppart['for'])){ if(array_key_exists((string)$ppart['needle'],$uri->originalparams) && $uri->originalparams[(string)$ppart['needle']] == $ppart['for']){ unset($uri->params[(string)$ppart->parameter]); } }elseif(!empty($ppart['needle'])){ if(array_key_exists((string)$ppart['needle'],$uri->originalparams)){ unset($uri->params[(string)$ppart->parameter]); } }else{ unset($uri->params[(string)$ppart->parameter]); }|
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/bednee/cooluri/issues/75#issuecomment-336677923, or mute the thread https://github.com/notifications/unsubscribe-auth/AGfXg1lRLNHLE2pxByBghNGgDOchcajWks5ssVd9gaJpZM4P5iPb.
Hi, i have built this function optionally. If not set needle that remove all.
Yes, I know the function userfunc. Many people can not use this feature:
Return back to the problem. I had in the past often the problem with switchablecontrolleractions. Use tx_indexedsearch_pi2 (i think its a bug in Typo3 or Cooluri) in 8.7 then you know what I mean. And set a link to the search-page. Cooluri save only the Link without chash.
thanks
Well, people would need to know what's the problem in order to use the new attributes. And having to iterate just the attributes that may be excessive is not the way to go I think. It'd be better to have a special handling for cHash so that it wouldn't be removed in case there are some unmapped parameters.
Very good idea. I like to support you. I'll think of something.
We need a condition in the Configuration-File for cHash. In Typo3 8.7 need tx_indexedsearch_pi2 the chash. Powermail too.
Example:
If is setting "for" you can check the combination for chash and ext-key.
Setting pageNotFoundOnCHashError is not nice.