Skip to content

Fix for anonym user case and log out on Organization profile #3386

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

Merged
merged 3 commits into from
Feb 8, 2018

Conversation

marla-singer
Copy link
Contributor

@marla-singer marla-singer commented Feb 6, 2018

Closes #3383
Closes #3382
Closes #2517

Changes

  • Rename path parameter "slug" to "orgSlug" for all related files (It needs to resolve conflict with "slug" parameter for API)

Fix for anonym user case and log out on Organization profile #3383, #3382
- Make sure Parameter "orgSlug" exists before subscribe
- Get related organization once, store it in Template reactive variable and return it
- Create the separated autorun function for watching on changes of apisPerPage parameter

Developer checklist

This checklist is to be completed by the PR developer:

  • Alternative solutions were compared/discussed before writing code
    • trade-offs with this solution are considered acceptable
  • Code in this PR adheres to the project styleguide
  • This pull request does not decrease project test coverage
  • If the code changes existing database collection(s), migration has been written
  • If UI texts are added or changed, all texts are internationalized

Reviewer checklist

Reviewed by: @matleppa @anarva

This list is to be completed by the pull request reviewer:

  • Code works as described/expected
  • Code seems to be error free
    • no browser console errors visible
    • no server console errors visible
    • passes CI build
  • Code is written in a way that promotes maintainability
    • easy to understand
    • well organized
    • follows project coding standards and conventions
    • well documented

…3382

- Make sure Parameter "orgSlug" exists before subscribe
- Get related organization once, store it in Template reactive variable and return it
- Create the separated autorun function for watching on changes of apisPerPage parameter
It needs to resolve conflict with "slug" parameter for API
@matleppa
Copy link
Member

matleppa commented Feb 7, 2018

When checking issue 3383, I get following exception.
Strange thing is, that it occurs only with some Organizations.

Exception in template helper: TypeError: Cannot read property '_id' of null
at Object.isBookmarked (http://localhost:3000/app/app.js?hash=24ddef301776868a4795be2fa8a482fc4e94744d:57219:30)
at http://localhost:3000/packages/blaze.js?hash=f33d3dfed63a491d24e3aa07ad66c24b5fe8c761:3051:16
at http://localhost:3000/packages/blaze.js?hash=f33d3dfed63a491d24e3aa07ad66c24b5fe8c761:1715:16
at http://localhost:3000/packages/blaze.js?hash=f33d3dfed63a491d24e3aa07ad66c24b5fe8c761:3103:66
at Function.Template._withTemplateInstanceFunc (http://localhost:3000/packages/blaze.js?hash=f33d3dfed63a491d24e3aa07ad66c24b5fe8c761:3744:12)
at http://localhost:3000/packages/blaze.js?hash=f33d3dfed63a491d24e3aa07ad66c24b5fe8c761:3102:27
at Object.Spacebars.call (http://localhost:3000/packages/spacebars.js?hash=ebf9381e7fc625d41acb0df14995b7614360858a:172:18)
at Template.bookmark.HTML.SPAN.class (http://localhost:3000/app/app.js?hash=24ddef301776868a4795be2fa8a482fc4e94744d:57125:22)
at Blaze.View. (http://localhost:3000/packages/blaze.js?hash=f33d3dfed63a491d24e3aa07ad66c24b5fe8c761:2734:44)
at http://localhost:3000/packages/blaze.js?hash=f33d3dfed63a491d24e3aa07ad66c24b5fe8c761:1934:20
at Function.Template._withTemplateInstanceFunc (http://localhost:3000/packages/blaze.js?hash=f33d3dfed63a491d24e3aa07ad66c24b5fe8c761:3744:12)
at http://localhost:3000/packages/blaze.js?hash=f33d3dfed63a491d24e3aa07ad66c24b5fe8c761:1932:29
at Object.Blaze._withCurrentView (http://localhost:3000/packages/blaze.js?hash=f33d3dfed63a491d24e3aa07ad66c24b5fe8c761:2271:12)
at viewAutorun (http://localhost:3000/packages/blaze.js?hash=f33d3dfed63a491d24e3aa07ad66c24b5fe8c761:1931:18)
at Tracker.Computation._compute (http://localhost:3000/packages/tracker.js?hash=997515fa2d5b0530ba07741da556c4b36963ef3b:339:36)
at Tracker.Computation._recompute (http://localhost:3000/packages/tracker.js?hash=997515fa2d5b0530ba07741da556c4b36963ef3b:358:14)
at Object.Tracker._runFlush (http://localhost:3000/packages/tracker.js?hash=997515fa2d5b0530ba07741da556c4b36963ef3b:532:14)
at onGlobalMessage (http://localhost:3000/packages/meteor.js?hash=6d285d84547b3dad9717a7c89c664b61b45ea3d8:398:23)

@marla-singer
Copy link
Contributor Author

@matleppa Fixed

Copy link
Member

@matleppa matleppa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as expected.

@matleppa matleppa merged commit 6265b6a into develop Feb 8, 2018
@ghost ghost removed the in progress label Feb 8, 2018
@matleppa matleppa deleted the bugfix/browser-error-organization branch February 8, 2018 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants