Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-67847

Global search results don't honour multilang filter

    • MOODLE_310_STABLE, MOODLE_36_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE, MOODLE_401_STABLE, MOODLE_402_STABLE, MOODLE_404_STABLE
    • MDL-67847-master
    • Hide

      Testing instructions

      1. As administrator, under Advanced features, do activate global search.
      2. As administrator, do enable the multilang filter for titles and content.
      3. As administrator, add the Russian language package.
      4. Create a course with a multilanguage title, like so: 
        <span lang="EN" class="multilang">TITLE ENGLISH</span><span lang="RU" class="multilang">TITLE RUSSIAN</span>
      1. Wait a while for the course to get indexed by global search (or do php admin/cli/cron.php)
      2. Set language to Russian from the language menu
      3. Perform a global search for 'TITLE'
      4. Check only TITLE RUSSIAN is printed (so TITLEENGLISH is not displayed).

       
       

      Show
      Testing instructions As administrator, under Advanced features, do activate global search. As administrator, do enable the multilang filter for titles and content. As administrator, add the Russian language package. Create a course with a multilanguage title, like so:  <span lang="EN" class="multilang">TITLE ENGLISH</span><span lang="RU" class="multilang">TITLE RUSSIAN</span> Wait a while for the course to get indexed by global search (or do php admin/cli/cron.php) Set language to Russian from the language menu Perform a global search for 'TITLE' Check only TITLE RUSSIAN is printed (so TITLEENGLISH is not displayed).    

      Yeah, it seems that the titles of results of global search display all languages wrapped with <span lang="XX" class="multilang">your_content_here</span>.

      I've been able to reproduce this on Mount Orange:

      1. Create a course with a multilanguage title, like so:

        <span lang="EN" class="multilang">TITLE ENGLISH</span><span lang="RU" class="multilang">TITLE RUSSIAN</span>

      1. Wait a while for the course to get indexed by global search
      2. Set language to Russian from the language menu
      3. Perform a global search for 'TITLE'

      Result: TITLE ENGLISHTITLE RUSSIAN is returned as the title of of the page, in both languages but strips the <span>

      Expected: TITLE RUSSIAN, i.e only print the Russian <span>

      Hopefully I'm not losing my mind and someone else can confirm this behavior.

            Unassigned Unassigned
            hamboneZA James Hamilton
            Luca Bösch Luca Bösch
            Votes:
            12 Vote for this issue
            Watchers:
            26 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 minutes
                3m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.