Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cHash Typo3 8.7 #75

Open
prdt3e opened this issue Oct 14, 2017 · 5 comments
Open

cHash Typo3 8.7 #75

prdt3e opened this issue Oct 14, 2017 · 5 comments

Comments

@prdt3e
Copy link

prdt3e commented Oct 14, 2017

We need a condition in the Configuration-File for cHash.
In Typo3 8.7 need tx_indexedsearch_pi2 the chash. Powermail too.

Example:

<predefinedparts>
    <part for="tx_news_pi1">
      <parameter>cHash</parameter>
    </part>

    <part for="tx_myext_pi1">
      <parameter>cHash</parameter>
    </part>
</predefinedparts>

If is setting "for" you can check the combination for chash and ext-key.

Setting pageNotFoundOnCHashError is not nice.

@prdt3e
Copy link
Author

prdt3e commented Oct 15, 2017

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

@bednee
Copy link
Owner

bednee commented Oct 15, 2017 via email

@prdt3e
Copy link
Author

prdt3e commented Oct 15, 2017

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:

  • They do not know what namespace is
  • They do not have their own extension

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

@bednee
Copy link
Owner

bednee commented Oct 15, 2017

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.

@prdt3e
Copy link
Author

prdt3e commented Oct 15, 2017

Very good idea.
I like to support you.
I'll think of something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants