Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

String reference not set - errors #164

Open
FransLammers opened this issue Nov 15, 2022 · 2 comments
Open

String reference not set - errors #164

FransLammers opened this issue Nov 15, 2022 · 2 comments
Assignees
Labels
state/needs-more-info status/stale Marked as stale due to inactivity type/bug Something isn't working umbraco/v8 Issues and tasks related to Umbraco 8.

Comments

@FransLammers
Copy link

Hi @abjerner

We are using the Redirects package 2.1.v in an Umbraco 8.18.5 project.
The project has multiple languages in multiple domains. When we add a redirect for All sites everything works fine, but since there have been redirects added for specific sites we get a lot of errors in the log:

System.ArgumentNullException: String reference not set to an instance of a String.
Parameter name: name
   at System.Globalization.CultureInfo..ctor(String name, Boolean useUserOverride)
   at Skybrud.Umbraco.Redirects.Domains.DomainUtils.<>c.<FindDomainForUri>b__0_0(IDomain x)

Is there anything we can do to prevent this, or is it a bug in Redirect?

@abjerner
Copy link
Member

abjerner commented Feb 1, 2023

Hi @FransLammers

I missed this issue, so sorry for the late reply.

If I remember correctly, I based the method of similar logic in Umbraco own source code. It seems that the method may fail if a culture isn't specified for the node:

image

But I'm running a site where there isn't specified a culture at the root node level either, but this still works fine. So currently I'm not sure why it fails in your case.

The Umbraco 8 package isn't my top priority anymore, but I'll see if I can find some time to look more into this issue 😉

@abjerner abjerner added type/bug Something isn't working umbraco/v8 Issues and tasks related to Umbraco 8. labels Feb 1, 2023
@abjerner abjerner self-assigned this Feb 1, 2023
@abjerner
Copy link
Member

abjerner commented Feb 1, 2023

Maybe going our on a limb, but could you try checking the umbracoDomains in the database?

The domainDefaultLanguage column references languages in the umbracoLanguage table. Does all the domainDefaultLanguage IDs also exist as languages in the umbracoLanguage table?

I think if you have deleted a language, and the umbracoDomains table is still referencing the language, you could see errors like the one you shared. Can you confirm whether this is the case?

@limbobot limbobot added state/needs-more-info status/stale Marked as stale due to inactivity labels Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state/needs-more-info status/stale Marked as stale due to inactivity type/bug Something isn't working umbraco/v8 Issues and tasks related to Umbraco 8.
Projects
None yet
Development

No branches or pull requests

3 participants