-
Notifications
You must be signed in to change notification settings - Fork 555
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
Bug: Updating Module Title Twice Does Not Save Title Changes - 5.1.0 #3977
Comments
it looks like the data is not synced between different db context instances, need to analyze further to find out the root cause. |
could of been fixed by #3979 or a recent update in visual studio. I am not experiencing this issue any longer with today's branch. |
Hi @thabaum , this is still able to be reproduced with the latest code, could you please reopen the ticket so that it can be tracked? thx |
@zyhfish hello, I will try to reproduce again. |
@zyhfish Hello, I was unable to reproduce this on current dev branch. Did you test this with a hard refresh of the browser for the site page tested using Also be sure to update visual studio to latest sometimes that one gets me as I did update recently as well. |
Hi @thabaum , it's able to be reproduced in the interactive render mode. |
@zyhfish hello, thanks for sharing your finding as I was testing mainly 5.1.0, but did notice this had the issue in both render modes. Seems like when I switch to Interactive mode the issue was only the inactive drop down carrot icon after first save, but after refreshing page once everything works great again. I can reproduce this issue, it happens whenever you switch from static to interactive is through being in You can even change pages and are unable to access module settings. And if you can access the module settings updating the page name the second time does not save to the database. This issue to reproduce needs to be With Auto rendering mode enabled after a refresh things seem to have worked. Switching render modes to interactive does in fact still trigger this issue. |
Hi @thabaum , |
Closing as fixed in #3988 |
reopening as the standard process is that the issue is closed once the PR is reviewed, accepted, and merged |
I had thought this was fixed again as it was working in interactive mode for me with where I was at testing these other issues, so I switched to If the fix is something else other than #3988 this should leave some added clues. Seems like switching render modes may trigger the issue as well. |
Hi @sbwalker , I have attached the reproduce screencast in my previous comment, it can be reproduced with Interactive/Server render mode. After deeper analyze the code, I have identified the root cause of this issue, it's related to the db context factory changes, we also need to use db context factory in the repository classes as well. please check whether PR #4006 is ok to be merged, after this I will submit another PR to make the same changes in other repository classes as well. |
@zyhfish during the MVP Summit this week I asked the Blazor Product Team what the latest recommendation is for EF Core data access for Blazor (as the guidance has changed many times over the years ie. Scoped, Transient, OwnerComponentBase, etc…). I was told that DbContextFactory is the recommended approach. So I think we should transition all Repositories to use DbContextFactory. The references to DbContext can be removed from the Repositories. However the service registration for DbContext in Startup must be retained for backward compatibility as custom modules will continue to rely on it (until they transition to DbContextFactory). The module template should be updated to use DbContextFactory as well. Do you have time to make these changes? The reason why this issue is only coming to the surface now is that it’s a rare combination of events which can trigger it. Basically you need a long-lived component which is doing multiple data access calls to the same DbContext. And the component must be using a server-based rendering approach. So it’s quite rare - however it’s still a problem which can be easily avoided with DbContextFactory. |
ISSUE
Description
The module title is not being updated once you set it, and try to reset it, without refreshing the page to get a fresh UI instance.
Steps to Reproduce...
Happens both static and interactive Oqtane render modes.
I noticed in static at least that the carrot icon becomes inactive as well at times.
Not sure if the above issue with inactive dropdown actions is limited to my installation. It is something to be aware of while testing solutions.
The text was updated successfully, but these errors were encountered: