Closed (outdated)
Project:
Simplenews
Version:
8.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
22 Jul 2019 at 04:48 UTC
Updated:
2 Aug 2023 at 13:55 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
gbisht commentedHere is a patch to save websites current language which will be the default language for the websites which are not multilingual.
Comment #3
adamps commentedHi thanks for the patch.
You have set this issue as a bug. Please can you update the issue summary with the symptoms or problems that you have found?
Comment #4
gbisht commentedComment #5
gbisht commentedThis situation of blank 'langcode' column causes issues with custom queries and code. It will be a good thing to save the site language as it is also the behavior of other core entities.
Comment #6
adamps commentedThanks. So if I understand correctly the motivation is to make it easier for you to write custom code and to be consistent with other entities. In that case I think the category should be "Task" not "Bug".
Please can you add the patch again now I have changed the version to 2.x? In fact I've just checked the code and this might even already be fixed on 2.x so please take a look.
Comment #7
gg24 commentedHi @AdamPS and gulab.bisht,
Please have a look at the patch attached with a change. Please review.
Thanks!
Comment #8
adamps commented@gg24 thanks for the patch. However I don't understand - please can you explain?
The default is
$preferred_langcode = NULLin which case the existing code ?? should work correctly.As I said in #6
Are you sure that it doesn't already work in 2.x?
Comment #9
adamps commentedThis has been fixed in the current code