0
AlderCove created
- ABP Framework version: v5.1.1 & 5.1.2
- UI type: MVC
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): yes
- Exception message and stack trace:
jquery.js?_v=637774598147390000:4059 Uncaught TypeError: Cannot read properties of undefined (reading 'users') at HTMLDocument. (chatMessageReceiving…2743500000000:12:31) at mightThrow (jquery.js?_v=637774598147390000:3766:29) at process (jquery.js?_v=637774598147390000:3834:12)
- Steps to reproduce the issue:"
- Create a new application
- Add the Chat module
- run the application
- enable Chat feature
- open developer tools
- refresh the page
- view the developer tools console
3 Answer(s)
-
0
hi
Try to add
ChatProxyScriptContributor("/client-proxies/chat-proxy.js")
public class ChatProxyScriptContributor : BundleContributor { public async override Task ConfigureBundleAsync(BundleConfigurationContext context) { var featureChecker = context.ServiceProvider.GetService<IFeatureChecker>(); if (await featureChecker.IsEnabledAsync(ChatFeatures.Enable)) { context.Files.AddIfNotContains("/client-proxies/chat-proxy.js"); } } } Configure<AbpBundlingOptions>(options => { options.ScriptBundles .Get(StandardBundles.Scripts.Global) .AddContributors(typeof(ChatGlobalScriptContributor), typeof(ChatProxyScriptContributor )); });
-
0
Thanks.
That fixed the problem, but is this a bug and should the script contributor be automatically configured by way of my Web module having a dependency on the ChatWebModule?
Or, is this the typical approach for making the module scripts available in the Web projects?
-
0
We fixed it in the next version.