Bug #51189
closedRemove non-needed Url parameter for standard search
100%
Description
Currently (6.1.3/6.2.0alpha2) an Url parameter is set in any case, if you toggle the standard/advanced search switch. This parameter should only be set in case of advanced search to prevent duplicate content, speaking url headaches and overloaded urls. Patch tested with bilingual content.
In SearchFormController.php, starting from line 1425:
if ($this->conf['show.']['advancedSearchLink']) { // $linkToOtherMode = $this->piVars['ext'] ? $this->pi_getPageLink($GLOBALS['TSFE']->id, $GLOBALS['TSFE']->sPre, array($this->prefixId . '[ext]' => 0)) : $this->pi_getPageLink($GLOBALS['TSFE']->id, $GLOBALS['TSFE']->sPre, array($this->prefixId . '[ext]' => 1)); $linkToOtherMode = $this->piVars['ext'] ? $this->pi_getPageLink($GLOBALS['TSFE']->id) : $this->pi_getPageLink($GLOBALS['TSFE']->id, $GLOBALS['TSFE']->sPre, array($this->prefixId . '[ext]' => 1)); $markerArray['###LINKTOOTHERMODE###'] = '<a href="' . htmlspecialchars($linkToOtherMode) . '">' . $this->pi_getLL(($this->piVars['ext'] ? 'link_regularSearch' : 'link_advancedSearch'), '', 1) . '</a>'; } else { $markerArray['###LINKTOOTHERMODE###'] = ''; }
p.s. sorry for not providing a patch file - don't know how to do it.
Updated by Gerrit Code Review about 11 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/25314
Updated by Gerrit Code Review over 10 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/25314
Updated by Gerrit Code Review over 10 years ago
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/31419
Updated by Gerrit Code Review over 10 years ago
Patch set 1 for branch TYPO3_6-1 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/31420
Updated by Tomita Militaru over 10 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 900b11bb3ff2ca8697fab8420b794a3054b6b949.
Updated by Garvin Hicking over 10 years ago
Hi!
It seems that the bugfix resolving #51189 was not properly merged in TYPO3 6.1 and 6.2 trees.
For reference, 6.1 uses this:
https://git.typo3.org/?p=Packages/TYPO3.CMS.git;a=commit;h=900b11bb3ff2ca8697fab8420b794a3054b6b949
and 6.2 uses this:
https://git.typo3.org/?p=Packages/TYPO3.CMS.git;a=commit;h=93a54c8d904f9b4f9941834faa46dccc4705c011
The proper patch is the one from 6.2 (which puts the [ext]=1 link at the last parameter), while in 6.1 the patch uses [ext]=0 at the wrong place.
It seems that 6.1 already contained the proper patch, and that the reverse patch had been applied, reverting the previous fix.
We have locally patched the 6.1 file with the patch of 6.2, and it works there.
Best regards,
Garvin & Jörg
Updated by Markus Klein about 10 years ago
- Is Regression set to No
Thanks for the report. Unfortunately I stumbled over this just now, which is 2 months too late.
Please always open a new ticket for such regressions.
Did so now: #61982
Will be solved there.
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed
Updated by Benni Mack almost 5 years ago
- Related to Bug #78316: Regression: Wrong link to normal search mode if advanced mode is active by default added