-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Entity history is not always recorded #11682
Comments
hi You can replace it with your Line 42 in e3e1779
|
I have replaced AuditHubFilter with a custom one but I still can't find the problem. I managed to see that every UI related action generates a scope for audilog. I have verified that it is possible to filter with auditingManager.Current.Log.Actions.IsNullOrEmpty(). But I have noticed that the actions are generated when some method of the Applications layer is called. A scope is generated for each event performed on the UI (click, hover, over, mousevent, etc.) I have been able to notice that if it detects the changes made in the entity but there comes a point where the tracking of the action is lost Thank you very much |
hi I made a new changes: #11687 |
Hi maliming. I hope you are well. I was able to detect that in the AuditingInterceptor class on the line he execution of the method is done in the application layer, which is just when I perform an action on the database In the AbpDbContext class on this line auditLog is null and does not get the changes made to the entity. Apparently the scope that arrives in SaveChangesAsync is not the same as the one that is being executed in AuditingInterceptor but auditLog is initialized in the AuditingInterceptor class. I've been trying to figure this out but couldn't find a solution, do you have any idea how I could solve this? I have prepared an example repository where you can see the behavior mentioned here repo |
hi I will check it. |
See #11807 context.Services.AddSignalR(options =>
{
var p = options.GetType().GetProperty("HubFilters", BindingFlags.Default | BindingFlags.Instance | BindingFlags.NonPublic);
var pp = p.GetValue(options);
var m = typeof(List<IHubFilter>).GetMethod("Clear");
m.Invoke(pp, BindingFlags.Default, null, null, null);
options.AddFilter<AbpHubContextAccessorHubFilter>();
options.AddFilter<AbpAuthenticationHubFilter>();
options.AddFilter<AbpUowHubFilter>();
options.AddFilter<AbpAuditHubFilter>();
}); |
Hi maliming. i have checked the latest version of abp 5.2 RC1 I can notice that the changes mentioned here are already implemented. I've made the changes you mention to the signalr middleware and it overrides the AbpUowHubFilter filter so it doesn't do anything so entity history is back to work Will anything change for the final 5.2 release as an internal fix for abp? Thank you |
Since Blazor's mechanism(dotnet/aspnetcore#30115) |
Any news on this? |
No. #11682 (comment) |
It looks like Microsoft won't be fixing the problem anytime soon Is it possible to trigger the audit logging manually ( within dbcontext or the repository ) ? |
Is there any solutions ? Its been more than a year since this ticket opened. We need help. |
No. #11682 (comment) |
@puschie286 |
@ogulcancakir sry but no - only not to rely on the entity history :/ |
Is this fixed now guys? |
Not yet.
|
Is there any work around on this? I really need to have the entity changes to my system, we are going to publish our product soon |
Only one or two entity to have their logs in enough for now |
Can you guide me more please? how to solve it ? |
Due to the current limitations of blazor, it cannot be resolved. |
So any alternative way to implement this feature? |
I am also in need of an alternative. Audit log is necessary for our site. |
This solution without AbpUowHubFiler and AbpAuditHubFilter seems to work. Is this currently a recommended approach? |
hi @MannRobertJ There are currently no other options. |
Hi, I am also facing the same issue. Did it get resolved in .Net 8 ? |
Not yet. |
Abp 8.1.1 also not fixed,Follow-up continue to follow |
Abp 8.2 also not fixed,Follow-up continue to follow |
Hello, did this get resolved in .Net 9? Thank you. |
Hi!
I am using the history of entities, the project currently started in version 4.3, migrated to 4.4 and finally to version 5.1.3
When the project updated to version 5.1.3 the entity history started to fail.
After doing some tests I have been able to notice the following.
The next HubFilter on this line there is nothing UI action (auditingManager.Current.Log.Actions).
Continuing with the tests that I have carried out, I have noticed that it is possibly a concurrency problem when generating the scope of auditingManager and registering the action in the AuditingInterceptor.cs class.
Unfortunately I couldn't solve the problem.
Any idea how I could fix this?.
Thank you very much
The text was updated successfully, but these errors were encountered: