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

Adding a new site fails #2192

Closed
dkoeder opened this issue May 11, 2022 · 1 comment
Closed

Adding a new site fails #2192

dkoeder opened this issue May 11, 2022 · 1 comment

Comments

@dkoeder
Copy link

dkoeder commented May 11, 2022

Adding a new site fails due to user.LastIPAddress being null and User.LastIpAddress field in DB not nullable. My workaround was to add user.LastIPAddress = SiteState.RemoteIPAddress to the user that is created on line 307 of Oqtane.Client\Modules\Admin\Sites\Add.razor. My knowledge of the code is too small to know if this is right or not.

@sbwalker
Copy link
Member

Thank you for reporting this issue. It was caused by the fix in PR #2179 which previously used HttpContext.Connection.RemoteIpAddress but now relies on the IP Address being passed from the client (as HttpContext.Connection.RemoteIpAddress does not work properly on Blazor Server). Your solution is correct that Add.Razor needs to pass the IP Address. Please go ahead and submit a PR for this change.

sbwalker added a commit that referenced this issue May 13, 2022
fix #2192 - Adding a new site fails
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants