CoreCommunity ExtensionsIncubatorDistributionsTYPO3 4.5 ProjectsTYPO3 4.6 ProjectsTYPO3 4.7 ProjectsTYPO3 6.0 ProjectsTYPO3 6.1 ProjectsTYPO3 6.2 Projects (+)

Bug #37842

keepExistingParametersForNewSearches broken / never worked?

Added by Stefan Galinski 12 months ago. Updated 6 months ago.

Status:Closed Start date:2012-06-08
Priority:Should have Due date:
Assignee:Ingo Renner % Done:

100%

Category:Frontend Plugins
Target version:2.8
TYPO3 Version:4.5 Has patch:Yes
PHP Version: Tags:
Votes: 0

Description

This feature just adds the url with the GET parameters of the last request to the form action. Initially this looks ok, but in fact this doesn't work if the form is set to method="GET". The reason is simple: Browsers are dropping all added parameters from the url and append the parameters of the input fields if you use the GET method. The feature works if you change the method to POST, but this is just a bad workaround with other problems. So the GET parameters should be added as hidden fields to the form instead to append them to the form url.

solr_37842.patch (6.2 kB) Stefan Galinski, 2012-06-08 13:44


Related issues

duplicated by Apache Solr for TYPO3 CMS - Bug #39660: "keepExistingParametersForNewSearches" not working Closed 2012-08-09

Associated revisions

Revision 8b28d3d8
Added by Michel Tremblay 7 months ago

[BUGFIX] Fix functionality of keepExistingParametersForNewSearches

Fixes: #39660
Fixes: #37842

History

Updated by Ingo Renner 11 months ago

  • Target version set to 2.2

Updated by Ingo Renner 11 months ago

  • Category set to Frontend Plugins
  • Assignee set to Ingo Renner

definitely used to work ;)

Updated by Ingo Renner 11 months ago

... used to work ... just checked the site which we implemented this for and apparently it's broken their, too. It might well be the case that we used to use it wit POST and obviously it does not work with GET as I can confirm.

Updated by Ingo Renner 11 months ago

  • Status changed from New to Needs Feedback
  • Assignee changed from Ingo Renner to Stefan Galinski
  • Target version deleted (2.2)

Hi Stefan,

I tested the patch and it works, but there are a few things I'd like to discuss:

  • I'd add the GET parameters in the results template only, as the search plugin is meant to be included on each page - kin of like macina_searchbox did for idnexed_search
  • you add the parameters loop in the markers array and for the template object directly, I don't understand why yet
  • is there a source for the getFlattenedArray() method so that we have to look out for its license?

Let's discuss these things after you're back from vacation. Enjoy your time!

Updated by Ingo Renner 11 months ago

  • Target version set to 2.8

Updated by Stefan Galinski 10 months ago

Hi Ingo,

  • I'd add the GET parameters in the results template only, as the search plugin is meant to be included on each page - kin of like macina_searchbox did for idnexed_search

And would prevent possible errors with unrelated GET-variables that would be possibly transferred (e.g. for statistics). Makes sense... :-)

  • you add the parameters loop in the markers array and for the template object directly, I don't understand why yet

Simple answer: I did that, because it worked. ;-)
I didn't really understood the internals of the templating engine.

  • is there a source for the getFlattenedArray() method so that we have to look out for its license?

As far as I remember this was a piece of code I found in some kind of forum, but I changed the code a lot. I don't think that this could to an licencing issue.

Updated by Ingo Renner 7 months ago

  • TYPO3 Version set to 4.5
  • Has patch set to Yes

Updated by Ingo Renner 7 months ago

  • Status changed from Needs Feedback to Resolved
  • Assignee changed from Stefan Galinski to Ingo Renner
  • % Done changed from 0 to 100

Updated by Ingo Renner 6 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF