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

Global search results don't honour multilang filter

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.6.8, 3.8.1, 3.9.3, 3.10, 4.0.5, 4.1
    • None
    • Filters, Global search, Language
    • MOODLE_310_STABLE, MOODLE_36_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE, MOODLE_401_STABLE
    • MDL-67847-390
    • MDL-67847-311
    • 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).    

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              hamboneZA James Hamilton
              Luca Bösch Luca Bösch
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              6 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

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