@alexpott post:

# /core/includes/update.inc
- function update_language_list($flags = LanguageInterface::STATE_CONFIGURABLE) {
This suggests that update_language_list() should just be removed. It is obviously not working. It'd error immediately. It was added without usage in #1754246: Languages should be configuration entities.

Comments

Anonymous’s picture

vaplas created an issue. See original summary.

ritzz’s picture

Assigned: Unassigned » ritzz

I am working on it.

ritzz’s picture

Status: Needs work » Needs review
StatusFileSize
new4.83 KB

Status: Needs review » Needs work

The last submitted patch, 3: 2860277-removed-function-3.patch, failed testing.

gaurav.kapoor’s picture

Assigned: ritzz » gaurav.kapoor
gaurav.kapoor’s picture

Status: Needs work » Needs review
StatusFileSize
new3.4 KB
Anonymous’s picture

Status: Needs review » Reviewed & tested by the community

@ritzz, thanks for the help. But we must solve the problem without out scope of the issue (only remove update_language_list). If you feel need to make other changes, please create a separate issue.

@gaurav.kapoor, exactly what is needed. Thank you! I applied the #6 patch and found no unnecessary empty lines and calls to this function in other parts of core. Also all tests green without artifacts. Hence RTBC!

alexpott’s picture

Category: Task » Bug report
Status: Reviewed & tested by the community » Fixed

This is a bug - if you call this code - it blows up. So no one can possibly be using it!

>>> require_once DRUPAL_ROOT . '/core/includes/update.inc';
=> 1
>>> update_language_list();
PHP Fatal error:  Class 'LanguageInterface' not found in /Volumes/devdisk/dev/sites/drupal8alt.dev/core/includes/update.inc on line 703

Fatal error: Class 'LanguageInterface' not found in /Volumes/devdisk/dev/sites/drupal8alt.dev/core/includes/update.inc on line 703

Committed and pushed 7f708fa to 8.4.x and 93652fa to 8.3.x. Thanks!

  • alexpott committed 7f708fa on 8.4.x
    Issue #2860277 by ritzz, gaurav.kapoor, vaplas: update_language_list()...

  • alexpott committed 93652fa on 8.3.x
    Issue #2860277 by ritzz, gaurav.kapoor, vaplas: update_language_list()...
Anonymous’s picture

I glad, that issue was fixed and Drupal became even better! But it seems to me, that creditors are not correct in this issue. I'm only open issue. But problem was found and explained by @alexpott, when he reviewed another patch (proof). For honesty, I would never have detected it :). And @ritzz's patch not working too. Hence, right creditors:
@gaurav.kapoor, @alexpott or @gaurav.kapoor, @alexpott, @ritzz.

I also found, that you can get into credit, if add any file after fixed the issue. Example, it happened to me twice: 1, 2, and it will be good if anyone can remove me from them, for the purity of my progress :). But I do not know where to report this more correctly, because the tracker - is only one communication channel for me, but it's not looks like problem of drupal code.

alexpott’s picture

@vaplas I credited you because it was your work on #2859992: [PP-1] Consistent use of leading \ for class names in *.api.php files that alerted us to the issue. Since you've requested that credit be removed for you I've done that.

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

We could have added info about "LanguageManager::getLanguages"? What Say?