-
-
Notifications
You must be signed in to change notification settings - Fork 21
Symfony: Two topics on one page #82
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
Comments
ThomasLandauer
added a commit
to ThomasLandauer/symfony-docs
that referenced
this issue
Jan 17, 2025
Page: https://symfony.com/doc/6.4/mercure.html#subscribing Closes symfony#20574 Closes symfony/mercure-bundle#71 Closes symfony/mercure-bundle#82 Info is taken from symfony#20574 (comment)
javiereguiluz
added a commit
to symfony/symfony-docs
that referenced
this issue
Jan 21, 2025
This PR was merged into the 6.4 branch. Discussion ---------- [Mercure] Adding hint for multiple topics Page: https://symfony.com/doc/6.4/mercure.html#subscribing Closes #20574 Closes symfony/mercure-bundle#71 Closes symfony/mercure-bundle#82 Info is taken from #20574 (comment) Commits ------- 3dca32e [Mercure] Adding hint for multiple topics
IMO, this can be closed by symfony/symfony-docs#20580 |
Thanks @ThomasLandauer. |
alanzarli
pushed a commit
to smsbox-net/symfony-docs
that referenced
this issue
Jan 21, 2025
Page: https://symfony.com/doc/6.4/mercure.html#subscribing Closes symfony#20574 Closes symfony/mercure-bundle#71 Closes symfony/mercure-bundle#82 Info is taken from symfony#20574 (comment)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I'm using two topics on my symfony-project:
/user/notification/{userid} -> Send notifications to user (flash messages, statusupdates)
/user/messenger/{userid} -> Messages from other users
Both (private) topics were created by diefferent symfony-services.
At the client-side I'm using different stimulus-controllers:
Both topics are working perfect.
But when I'm using both on the same page, I get this error:
An exception has been thrown during the rendering of a template ("The "mercureAuthorization" cookie for the "default hub" has already been set. You cannot set it two times during the same request.").
I have no idea how to fix this.
I think I can set the cookie by myself:
$authorization->setCookie($request, ['/user/notification/{userid}','/user/messenger/{userid}']);
But the mercure-twig-helper still tries to set the cookie. -> Error again.
What can I do?
The text was updated successfully, but these errors were encountered: