Support from Acquia helps fund testing for Drupal Acquia logo

Comments

a.ross’s picture

Issue summary: View changes

Add anchor

a.ross’s picture

Issue summary: View changes

*sigh*

David_Rothstein’s picture

Title: LANGUAGE_TYPE_URL has no name and description. » LanguageInterface::TYPE_URL (D8) and LANGUAGE_TYPE_URL (D7) have no name or description
Version: 7.x-dev » 8.0.x-dev
Issue summary: View changes
Status: Active » Needs review
Issue tags: +Needs backport to D7
FileSize
658 bytes
689 bytes

Yes, this leads to PHP notices/etc in that case. Since 'name' and 'description' are required, core should be providing them even if it does not make this language type configurable by default.

Here are patches for Drupal 7 and 8.

David_Rothstein’s picture

Since 'name' and 'description' are required

Actually the hook documentation isn't quite clear about whether they're required or not, but either way it seems like they should be provided.

Fabianx’s picture

Status: Needs review » Reviewed & tested by the community

RTBC, makes sense.

Gábor Hojtsy’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Needs review
Issue tags: +D8MI, +language-base, +sprint
FileSize
135.27 KB

This will make the URL method available in views as well, probably confusing users (because you cannot configure this one and URL language does not appear anywhere else but in views then). See #2420737: Differences in dynamic language names are confusing in views, content, etc. for the issue discussing whether to display non-configurable language types in views and the reasons we do so now and distinguish between types with and without names instead. I think #2420737: Differences in dynamic language names are confusing in views, content, etc. would ideally be resolved sooner or elevated in priority if this one is committed.

Screenshot with this patch:

Gábor Hojtsy’s picture

Issue summary: View changes
Status: Needs review » Postponed

I think we have a workable idea at #2420737: Differences in dynamic language names are confusing in views, content, etc., can you help implement?

Gábor Hojtsy’s picture

Status: Postponed » Needs review
Gábor Hojtsy’s picture

Status: Needs review » Reviewed & tested by the community

I manually tested and this still applied and did not affect the views language list negatively anymore (thanks to #2420737: Differences in dynamic language names are confusing in views, content, etc.), so should be good to go. Yay!

alexpott’s picture

Version: 8.0.x-dev » 7.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Committed c13aadd and pushed to 8.0.x. Thanks!

  • alexpott committed c13aadd on 8.0.x
    Issue #1994292 by David_Rothstein, Gábor Hojtsy: LanguageInterface::...
Gábor Hojtsy’s picture

Issue tags: -sprint

Superb :) Thanks all!

David_Rothstein’s picture

Reuploading the Drupal 7 patch from #2, with the do-not-text prefix removed.

Not sure if there is a similar issue with Views in Drupal 7 as there was in Drupal 8....

Fabianx’s picture

Issue tags: +Needs manual testing

Except for needing to check that, this is RTBC.

  • alexpott committed c13aadd on 8.1.x
    Issue #1994292 by David_Rothstein, Gábor Hojtsy: LanguageInterface::...

  • alexpott committed c13aadd on 8.3.x
    Issue #1994292 by David_Rothstein, Gábor Hojtsy: LanguageInterface::...

  • alexpott committed c13aadd on 8.3.x
    Issue #1994292 by David_Rothstein, Gábor Hojtsy: LanguageInterface::...

  • alexpott committed c13aadd on 8.4.x
    Issue #1994292 by David_Rothstein, Gábor Hojtsy: LanguageInterface::...

  • alexpott committed c13aadd on 8.4.x
    Issue #1994292 by David_Rothstein, Gábor Hojtsy: LanguageInterface::...
poker10’s picture

Patch #11 still applies to D7. I have tested it manually (with LANGUAGE_TYPE_URL set as configurable) and it seems working - see screenshots.

before_patch_configurable.jpg - Before patch - PHP warnings and missing name and description
after_patch_cconfigurable.jpg - After patch - no warnings and table data are displayed correctly

To the views - it seems like that in D7 the language configuration is different. There are three general options before and after the patch is applied (current user's language, default site language and language neutral). So I do not see any negative impacts of this patch here either.

d9_views_language.jpg - Views language settings in D9
d7_views_language.jpg - Views language settings in D7
d7_views_language_after_patch.jpg - Views language settings in D7 after applying the patch

So +1 to RTBC.

mcdruid’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +RTBM

Thanks for doing the follow-up testing with views in D7.

This LGTM!

  • poker10 committed ee6e664 on 7.x
    Issue #1994292 by David_Rothstein: LanguageInterface::TYPE_URL (D8) and...
poker10’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: -Needs backport to D7, -RTBM

Thanks! Commited and pushed to 7.x.

Status: Fixed » Closed (fixed)

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