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

.net8+orchardcore blazorserver mode render component error #16363

Open
justlucky opened this issue Jun 22, 2024 · 10 comments
Open

.net8+orchardcore blazorserver mode render component error #16363

justlucky opened this issue Jun 22, 2024 · 10 comments

Comments

@justlucky
Copy link

Describe the bug
.net8+orchardcore create webpage, use blazorserver mode @(await Html.RenderComponentAsync(RenderMode.ServerPrerendered)) error.

error content:
System.InvalidOperationException: The current thread is not associated with the Dispatcher. Use InvokeAsync() to switch execution to the Dispatcher when triggering rendering or component state.

To Reproduce
Steps to reproduce the behavior:

Create a OrchardCore app, add module, and add WebPage page.
Create blazorclasslibrary project, add default Component.
call Html.RenderComponentAsync in webpage.
browser webpage.
Expected behavior
System.InvalidOperationException: The current thread is not associated with the Dispatcher. Use InvokeAsync() to switch execution to the Dispatcher when triggering rendering or component state.

Screenshots

301008515-3e38534d-55d4-4a24-954a-7b37c0305abe

301008533-b01c7b95-c949-4f94-b71b-1da7f72974ba

reference bug #15211

@justlucky
Copy link
Author

justlucky commented Jun 22, 2024

This bug has been discussed before, but it has not been merged into the main branch yet.

OrchardCore.Demo.zip

enable module; open /Hello

@sebastienros
Copy link
Member

This bug has been discussed before, but it has not been merged into the main branch yet.

Can you link to the issue that you mention?

@justlucky
Copy link
Author

I won't solve this problem, it's a bit difficult for me, but it has been discussed before; I can only provide a method of reproduction, as I uploaded the module code for OrchardCore above; You can also take a look at the previous discussion records.

reference bug #15211

@sebastienros

Copy link

It seems that this issue didn't really move for quite a while despite us asking the author for further feedback. Is this something you'd like to revisit any time soon or should we close? Please reply.

@justlucky
Copy link
Author

This bug has been discussed before, but it has not been merged into the main branch yet.

Can you link to the issue that you mention?

We retested the issue and found that it occurred when the liquid template theme mode was enabled, while TheDefaultTheme did not.

a1
a2
a3
a4

@justlucky
Copy link
Author

I recorded a debugging video to illustrate the situation.

20240719_143215.mp4

@sebastienros sebastienros added this to the backlog milestone Aug 1, 2024
Copy link

github-actions bot commented Aug 1, 2024

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.

@sebastienros
Copy link
Member

Have you tried to invoke it from a tag helper as it was suggested in the other issues? #15211 (comment)

@justlucky
Copy link
Author

您是否尝试过从标签帮助程序中调用它,就像在其他问题中建议的那样?#15211 (评论)

Still reporting an error, the theme is using a style that includes liquid

image

@justlucky
Copy link
Author

Have you tried to invoke it from a tag helper as it was suggested in the other issues? #15211 (comment)

There may be an issue with the output of LiquidViewTemplate, but I don't know how to resolve it.

image

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

No branches or pull requests

2 participants