- Issue created by @joseph.olstad
- ๐ฎ๐ณIndia Shreya_98
Shreya_th โ made their first commit to this issueโs fork.
- @shreya_th opened merge request.
- ๐ฎ๐ณIndia Shreya_98
Hi @joseph.olstad,
As per my knowledge i have tried to solve this issue .Hope so ,these changes should help prevent null exceptions when the "key" module is not installed and also created MR for this. Kindly review the changes .Thank you!
- Status changed to Needs review
about 1 year ago 6:40am 6 October 2023 - ๐จ๐ฆCanada joseph.olstad
Hi @Shreya_th, thanks so much, that looks great, just a minor nit about the indent on the last line change.
Great work thanks again!
- Status changed to RTBC
about 1 year ago 7:33am 6 October 2023 - First commit to issue fork.
- Assigned to wilco
- Status changed to Fixed
about 1 year ago 4:56pm 6 October 2023 - Status changed to Fixed
about 1 year ago 4:59pm 6 October 2023 - ๐จ๐ฆCanada wilco
Great catch everyone!
I've gone ahead and reviewed the request. Modified it to better handle the conditional and ensure proper handling of null values.
Enjoy!
- ๐ฎ๐ณIndia Shreya_98
Hi @wilco,
I have given my valuable time to fix this issue , will you please tell me where is my mistake due to which i didn't receive credit on this issue.Thank you!
- ๐จ๐ฆCanada wilco
Hi @shreya_th,
If you review the code changes you made, they were only fixing some variable setting conventions but it actually didn't solve the NULL value errors. You can review the following code changes here:
https://git.drupalcode.org/project/language_negotiation_matrix/-/merge_r...
The modifications you made left an error behind here:
$module_handler->moduleExists('key')
As well, if the call
\Drupal::service('key.repository')->getKey('language_matrix')->getKeyValues()
came back null, it would still WSOD.Therefore, more conditionals were required. Not to put to fine a point on it, your changes didn't actually solve the fundamental issue.
I thank you for your efforts, but it wasn't enough to fix the issue.
- ๐จ๐ฆCanada wilco
I made an edit error in my comment above, so I corrected it. But just to be clear:
['%enabled' => $module_exists('key')?'Enabled':'Not Installed'])
This in particular
$module_exists('key')
was the problem. After your fix, this was now throwing errors. - ๐จ๐ฆCanada joseph.olstad
Thanks @Shreya_th and @wilco for your work on this.
Very cool module!