Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
language system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
14 May 2013 at 08:54 UTC
Updated:
16 Sep 2022 at 19:49 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #0.0
a.ross commentedAdd anchor
Comment #0.1
a.ross commented*sigh*
Comment #1
David_Rothstein commentedYes, 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.
Comment #2
David_Rothstein commentedActually the hook documentation isn't quite clear about whether they're required or not, but either way it seems like they should be provided.
Comment #3
fabianx commentedRTBC, makes sense.
Comment #4
gábor hojtsyThis 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:

Comment #5
gábor hojtsyI think we have a workable idea at #2420737: Differences in dynamic language names are confusing in views, content, etc., can you help implement?
Comment #6
gábor hojtsy#2420737: Differences in dynamic language names are confusing in views, content, etc. finally landed. This should be good to go again.
Comment #7
gábor hojtsyI 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!
Comment #8
alexpottCommitted c13aadd and pushed to 8.0.x. Thanks!
Comment #10
gábor hojtsySuperb :) Thanks all!
Comment #11
David_Rothstein commentedReuploading 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....
Comment #12
fabianx commentedExcept for needing to check that, this is RTBC.
Comment #18
poker10 commentedPatch #11 still applies to D7. I have tested it manually (with
LANGUAGE_TYPE_URLset 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.
Comment #19
mcdruid commentedThanks for doing the follow-up testing with views in D7.
This LGTM!
Comment #21
poker10 commentedThanks! Commited and pushed to 7.x.