Project

General

Profile

Actions

Bug #21249

closed

indexed search Unset Stopwords in Backend is not possible

Added by Leviathan over 14 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2009-10-12
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.2
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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)


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #17558: can not remove stopwordsClosed2007-08-24

Actions
Actions #1

Updated by Alexander Opitz almost 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)?

Actions #2

Updated by Alexander Opitz over 10 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.

Actions #3

Updated by Christian Kuhn 3 months ago

  • Related to Bug #17558: can not remove stopwords added
Actions

Also available in: Atom PDF