-
Notifications
You must be signed in to change notification settings - Fork 36
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
Unable to edit blogs #44
Comments
I am also getting the same problem |
@vnetonline are you getting the error from the latest code in this repo… or from installing the package in the Marketplace? |
From installing it from market place |
I just forked the repo and I get the same error when trying to edit an existing blog |
the blogs module was downloaded from the marketplace, oqtane from github compiled @sbwalker |
Is it possible it could have been resolved by this recent PR - oqtane/oqtane.framework#4111 (Oqtane Framework dev branch) |
I am not able to reproduce this problem using the latest code in the dev branch of the Oqtane Framework |
I am still getting the issue i have run the latest changes from the Dev branch and have just updated the SDK to 8.0.4 on my local copy of the blog still have the same issue Adding content is fine I have noticed that the OnInitializedAsync is hit twice and on the second run, the error occurs |
@tranpl @vnetonline I am able to reproduce the problem now... I will investigate further today. Its very strange, as I am using the Blog module on https://www.oqtane.org (and other sites) without any issues. |
fix oqtane/oqtane.blogs#44 - rich text editor throwing exception in specific scenario
@tranpl @vnetonline this PR oqtane/oqtane.framework#4126 resolves the issue in the RichTextEditor. The problem was basically a race condition due to JS Interop. The JS Interop call to CreateEditor on firstRender can sometimes take time (depending on the environment) which means that OnAfterRenderAsync could be called a second time with firstRender = false BEFORE the first OnAfterRenderAsync call completed. This could result in the component trying to access a method on the RichTextEditor before it actually exists. The resolution is to explicitly control the flow within the component by tracking whether the firstRender event completed or not. So this required a fix to the framework which will be released in 5.1.1 |
I can confirm that PR oqtane/oqtane.framework#4126 resolves the issue in the RichTextEditor and now I am able to edit the blogs |
thank you @sbwalker |
Microsoft.JSInterop.JSException: Cannot read properties of null (reading '__quill')
TypeError: Cannot read properties of null (reading '__quill')
at Object.getQuillHTML (https://localhost/js/quill-interop.js:30:30)
at https://localhost/_framework/blazor.web.js:1:3244
at new Promise ()
at y.beginInvokeJSFromDotNet (https://localhost/_framework/blazor.web.js:1:3201)
at gn._invokeClientMethod (https://localhost/_framework/blazor.web.js:1:62841)
at gn._processIncomingData (https://localhost/_framework/blazor.web.js:1:60316)
at connection.onreceive (https://localhost/_framework/blazor.web.js:1:53957)
at i.onmessage (https://localhost/_framework/blazor.web.js:1:82102)
at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
at Oqtane.Modules.Controls.RichTextEditor.OnAfterRenderAsync(Boolean firstRender) in C:\Source\Projects\oqtane.framework\Oqtane.Client\Modules\Controls\RichTextEditor.razor:line 192
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
Oqtane Version 5.1.0
Blog Module Version 5.0.3
The text was updated successfully, but these errors were encountered: