No Code Attached Yet bug
avatar vintzl
vintzl
14 Aug 2020

Steps to reproduce the issue

Do some search with Smart Search while debugging with Xdebug from Vscode.

Expected result

No exception.

Actual result

Get exception inside StemmerFactory.php:
Wamania\Snowball\NotFoundException: Stemmer not found for

inside the following function:

  /**
     * @throws NotFoundException
     */
    public static function create(string $code): Stemmer
    {
        $code = UTF8::strtolower($code);

        foreach (self::LANGS as $classname => $isoCodes) {
            if (in_array($code, $isoCodes)) {
                return new $classname;
            }
        }

        throw new NotFoundException(sprintf('Stemmer not found for %', $code));
    }

System information (as much as possible)

Joomla Beta 3 from here :

Additional comments

Tested with a clean install.

avatar vintzl vintzl - open - 14 Aug 2020
avatar joomla-cms-bot joomla-cms-bot - change - 14 Aug 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 14 Aug 2020
avatar infograf768 infograf768 - change - 14 Aug 2020
Title
Joomla Beta 3 — Wamania\Snowball\NotFoundException: Stemmer not found for
[4.0] Joomla Beta 3 — Wamania\Snowball\NotFoundException: Stemmer not found for
avatar infograf768 infograf768 - edited - 14 Aug 2020
avatar brianteeman
brianteeman - comment - 14 Aug 2020

What language is your site?

avatar vintzl
vintzl - comment - 14 Aug 2020

English (United Kingdom), the only one installed.

avatar alikon
alikon - comment - 15 Aug 2020

Confirmed
i suspect the cause is that $code is equal *
public static function create(string $code): Stemmer

avatar infograf768
infograf768 - comment - 15 Aug 2020

@Hackwar
Could you please look at that?

avatar brianteeman
brianteeman - comment - 20 Dec 2020

The stemmer has been updated can you please retest. See #31732

avatar Quy Quy - change - 23 Dec 2020
Labels Added: Information Required
avatar Quy Quy - labeled - 23 Dec 2020
avatar vintzl
vintzl - comment - 24 Dec 2020

Seems not solved, as I get this

image

avatar Quy
Quy - comment - 24 Dec 2020

Are you testing with the nightly builds?

https://developer.joomla.org/nightly-builds.html

avatar vintzl
vintzl - comment - 24 Dec 2020

Just tested with Joomla_4.0.0-beta6-dev-Development-Update_Package.zip from here:

avatar infograf768
infograf768 - comment - 25 Dec 2020

@alikon is right in a multilingual site:

If you var_dump $code

    public static function create(string $code): Stemmer
    {
        $code = UTF8::strtolower($code);
var_dump($code);
        foreach (self::LANGS as $classname => $isoCodes) {
            if (in_array($code, $isoCodes)) {
                return new $classname;
            }
        }

        throw new NotFoundException(sprintf('Stemmer not found for %s', $code));
    }

You get when en-GB is the site language (would be *, fr, fr for French):

`string(1) "*" string(2) "en" string(2) "en" `

If you work in a monolanguage site, then you may have to set Smart Search Options to your language or Default Site Language.

Screen Shot 2020-12-25 at 10 42 25

Do you still get the Exception in that case?

Note

I do not get any suggestions when typing in the search field.
Could someone confirm?

avatar infograf768
infograf768 - comment - 25 Dec 2020
avatar wilsonge wilsonge - change - 25 Dec 2020
Labels Added: ?
avatar wilsonge wilsonge - labeled - 25 Dec 2020
avatar richard67 richard67 - change - 25 Dec 2020
Labels Removed: Information Required
avatar richard67 richard67 - unlabeled - 25 Dec 2020
avatar richard67
richard67 - comment - 25 Dec 2020

"Information Required" label removed since the requested information if it still happens with current 4.0 has been provided.

avatar bembelimen bembelimen - change - 28 Dec 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-12-28 04:59:07
Closed_By bembelimen
avatar bembelimen bembelimen - close - 28 Dec 2020
avatar bembelimen
bembelimen - comment - 28 Dec 2020

The problem is not the exception. That is caught and the indexer still runs. So no need to fix here anything, it's expected behaviour that there is one when the current language has no stemmer.
But the thing is, that if "*" is the current language, then it's not translated in e.g. "en-GB" (= the current language on the site).
#31795 tries to fix it and reduces the exception numbers.

avatar wilsonge wilsonge - change - 20 Feb 2021
Labels Removed: ?
avatar wilsonge wilsonge - unlabeled - 20 Feb 2021
avatar rdeutz rdeutz - change - 21 Oct 2022
Status Closed New
Closed_Date 2020-12-28 04:59:07
Closed_By bembelimen
Labels Added: No Code Attached Yet
Removed: ?
avatar rdeutz rdeutz - reopen - 21 Oct 2022
avatar Hackwar Hackwar - change - 20 Feb 2023
Labels Added: bug
avatar Hackwar Hackwar - labeled - 20 Feb 2023
avatar Hackwar Hackwar - close - 27 Feb 2023
avatar Hackwar
Hackwar - comment - 27 Feb 2023

#39959 should fix this. Closing since we have a PR.

avatar Hackwar Hackwar - change - 27 Feb 2023
Status New Closed
Closed_Date 0000-00-00 00:00:00 2023-02-27 21:26:18
Closed_By Hackwar

Add a Comment

Login with GitHub to post a comment