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

Timezone error after upgrade to 2.0 #16776

Open
emrahtokalak opened this issue Sep 20, 2024 · 7 comments · May be fixed by #16777
Open

Timezone error after upgrade to 2.0 #16776

emrahtokalak opened this issue Sep 20, 2024 · 7 comments · May be fixed by #16777
Assignees
Milestone

Comments

@emrahtokalak
Copy link
Contributor

Describe the bug

After upgrading my 1.8.3 project to 2.0, I am getting an error that I think is caused by the "OrchardCore.Users.TimeZone" module. Each user's setting is "local time zone" and the application's global time zone setting is "GMT+3".

These settings, which worked fine in 1.8.3, are causing me to get errors on the content items page and at many points where the "GetLocalTimeZoneAsync" method is called.

Orchard Core version

2.0

To Reproduce

Steps to reproduce the behavior:

  • Upgrade your project from 1.8.3 to 2.0.

  • Set your users in your project to the default timezone option.

  • Activate the "OrchardCore.Users.TimeZone" module.

  • You will see that many mechanisms, especially content items, do not work correctly.

Expected behavior

A clear and concise description of what you expected to happen.

Logs and screenshots

Screenshot 2024-09-21 at 00 02 48 Screenshot 2024-09-21 at 00 08 24

While timezone is active, I cannot call a SQL query with the "api/queries" endpoint, it throws an error caused by timezone.

Screenshot 2024-09-21 at 00 16 45
@Piedone
Copy link
Member

Piedone commented Sep 21, 2024

I can see the issue. It's because we get an NRE here:

{101D0C80-DE93-477C-AAF6-38BE3D85AB75}

This is only when the user's time zone is set as "Use site's time zone":

{5B102FEE-BA17-4147-A5CC-6D2B636A3D77}

@Piedone
Copy link
Member

Piedone commented Sep 21, 2024

This is a regression, so we need to fix it for 2.1.0 at least, perhaps also release it as a 2.1.1.

@Piedone Piedone added this to the 2.1 milestone Sep 21, 2024
Copy link

We triaged this issue and set the milestone according to the priority we think is appropriate (see the docs on how we triage and prioritize issues).

This indicates when the core team may start working on it. However, if you'd like to contribute, we'd warmly welcome you to do that anytime. See our guide on contributions here.

@Piedone Piedone self-assigned this Sep 21, 2024
@Piedone
Copy link
Member

Piedone commented Sep 21, 2024

This isn't just for an ugpraded site, BTW, even a vanilla 2.0 site has this issue.

BTW a workaround you can use for now is to either set the time zone of the affected users to something else than the site's, or to disable OrchardCore.Users.TimeZone altogether for now.

@emrahtokalak
Copy link
Contributor Author

This isn't just for an ugpraded site, BTW, even a vanilla 2.0 site has this issue.

BTW a workaround you can use for now is to either set the time zone of the affected users to something else than the site's, or to disable OrchardCore.Users.TimeZone altogether for now.

Yes, I later realized that there was a problem with the vanilla installation too.

@MikeAlhayek
Copy link
Member

I think @Piedone meant to fix this and release 2.0.1 not 2.1.1.

@Piedone
Copy link
Member

Piedone commented Sep 23, 2024

Yep!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants