Bug #21249
closedindexed search Unset Stopwords in Backend is not possible
0%
Description
Unsetting Stopwords in Info->Indexed Search [Detail Page View] is not possible.
If you just set one Word, save, uncheck and save again you will get this message:
"Invalid argument supplied for foreach() in /var/www/www/kbgk/2009/data/typo3/sysext/indexed_search/modfunc1/class.tx_indexedsearch_modfunc1.php on line 1345"
If you set and unset more words you doenst get any error, but every unchecked word is still checked.
A little Workaround for function processStopWords:
/** * Setting / Unsetting stopwords * * @param array Array of stop-words WIDs with 0/1 to set / unset * @return void */ function processStopWords($stopWords, $phash) { if ($GLOBALS['BE_USER']->isAdmin()) { // Traverse words // Finding all words for this phash: $ftrows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows( 'index_words.*, index_rel.*', 'index_rel, index_words', 'index_rel.phash = '.intval($phash). ' AND index_words.wid = index_rel.wid', '', 'index_words.baseword', '' ); foreach ($ftrows as $_ftrow_num => $_ftrow) { if ((int)$stopWords[$_ftrow['wid']] != $_ftrow['is_stopword']) { $changed_stopwords[] = array('is_stopword' => (int)$stopWords[$_ftrow['wid']], 'wid' => $_ftrow['wid']); } } foreach ($changed_stopwords as $_stopwords) { $fieldArray = array( 'is_stopword' => $_stopwords['is_stopword'], ); $GLOBALS['TYPO3_DB']->exec_UPDATEquery('index_words', 'wid=' . $_stopwords['wid'], $fieldArray); } } }
Are Stopwords allready in use, or is it not implemented yet?
(sorry for bad english).
(issue imported from #M12203)
Updated by Alexander Opitz about 11 years ago
- Status changed from New to Needs Feedback
- Target version deleted (
0) - Is Regression set to No
Hi,
as this issue is very old. Does the problem still exists within newer versions of TYPO3 CMS (4.5 or 6.1)?
Updated by Alexander Opitz almost 11 years ago
- Status changed from Needs Feedback to Closed
No feedback within the last 90 days => closing this ticket.
If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.
Updated by Christian Kuhn 8 months ago
- Related to Bug #17558: can not remove stopwords added