The language_list function don't exist anymore on Drupal 8.
Please use \Drupal::languageManager()->getLanguages();

Comments

mgoncalves created an issue. See original summary.

mgoncalves’s picture

Assigned: mgoncalves » Unassigned
Status: Active » Needs review
StatusFileSize
new574 bytes
hgunicamp’s picture

Status: Needs review » Reviewed & tested by the community

I applied the 'filefield_source-change_language_list-2876161-2-8x.patch' patch and used the command

find . -type f \( -name '*.inc' -or -name '*.php' -or -name '*.module' \) -exec grep --color=auto language_list {} \+

I did not find any other 'language_list' occurrences.

So the patch worked for me.

gnuget’s picture

It seems that the transliteration_clean_filename() does not exists either in D8.

mmm, this makes me wonder if this function it's used at all. 🤔

I'm going to check before to commit this.

Thanks for your patch.

gnuget’s picture

Status: Reviewed & tested by the community » Needs work

Yup, the whole function is not working, I'm going to work on this.

gnuget’s picture

Status: Needs work » Needs review
StatusFileSize
new1.04 KB

Patch attached.

gnuget’s picture

Title: Change language_list() to getLanguages(). » Transliteration is not working on the File attach source
Component: General » Source: Attach (FTP)
Status: Needs review » Needs work

We need a test with a file with special characters so we can prove that the transliteration is working, so this needs work.

gnuget’s picture

Status: Needs work » Needs review
StatusFileSize
new3.38 KB
new4.43 KB

Ok I was finally able to work on this.

I refactored a bit the tests and include one that tests a file with special characters.

Patch attached.

  • gnuget committed 38dfa66 on 8.x-1.x
    Issue #2876161 by gnuget, mgoncalves: Transliteration is not working on...
gnuget’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.