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

Fix issue on meteor 3.0 on patch publish and perserve env variable #191

Merged
merged 1 commit into from
Sep 13, 2024

Conversation

nachocodoner
Copy link
Contributor

This PR refers to the issue #190 and refered to the core at meteor/meteor#13258.

The fix involves using EnvironmentVariable.withValue before calling publish.call. This ensures the context is preserved and spread properly throughout the entire flow of an altered publication. This was a breaking change on Meteor 3 added on this change, meteor/meteor#13063.

I tried running the test suite to check if anything else is broken that might need deeper investigation on the meteor core level or if this fix is sufficient for all publication alterations as the one on this repository. I also wanted to add a regression test, but the suite isn't passing any tests. What am I doing wrong?

@zendranm
Copy link
Member

zendranm commented Sep 4, 2024

Hi @nachocodoner Thank you for creating this PR. Regarding tests, we recently had problems with running tests both on the CI and locally. We are currently working on fixing it.

As for the PR, I've tested this manually and it seems to solve the issue just fine.

@zendranm zendranm merged commit 39c9ad0 into vazco:master Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

Meteor 3: Error: Meteor.userId (DDP._CurrentPublicationInvocation.get()) patchPublish problem
2 participants