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

2.14.x. links relationships id is reloaded. 2.13.2 is OK. #5143

Closed
ghost opened this issue Aug 24, 2017 · 7 comments · Fixed by #5410
Closed

2.14.x. links relationships id is reloaded. 2.13.2 is OK. #5143

ghost opened this issue Aug 24, 2017 · 7 comments · Fixed by #5410
Labels
🏷️ bug This PR primarily fixes a reported issue Needs Bug Verification

Comments

@ghost
Copy link

ghost commented Aug 24, 2017

With 2.13.2 everything ok.

From 2.14.x I have a strange phenomenon:

I'm in the category 1 page, in that page I have a simply

{{#each model.posts key="id" as |post index|}}
    {{#link-to 'post' model.id post.id}}Post{{/link-to}}`
{{/each}}

when I go in the post page I have this:

{{#link-to "category" model.category}}Back to category{{/link-to}}

sometimes that link is /#.

In my router.js I have this:

...
this.route('post', { path: ':category_id/:post_id' });
...

So after investigating a bit I realized that the blame is of the new "ember-data 2.14.x (and 2.15.x of course, I tried)" and of its bad relationship with the related JSONAPI links (many bugs with JSONAPI related links just fixed in ember-data 2.14.10).

The first time I enter that post page the link "Back to category" is /# until it loads (again I can say, because in the category page it already knows about post and its category.id, isn't it?).

I can't reproduce on ember-twiddle because I'm not enough good to. But I realized a twiddle with mirage without links related relationships. Maybe some of you can insert the missing links part in mirage? Here is the link: https://ember-twiddle.com/94b21b033f50339cfa5de0040787f12f

I hope we can fix soon and most important we can understand and test more from this mistake. :)

Maybe related to: #5124, #5062, #4982.

And maybe @mmun (author of bugfix #5119 in 2.14.10) knows something more and better?

@stefanpenner
Copy link
Member

stefanpenner commented Aug 24, 2017

Ya it seems quite likely related to (but not 100% sure) #5124, thanks for reporting!

@ghost
Copy link
Author

ghost commented Aug 24, 2017

@stefanpenner, can you modify that twiddle to use that ember-cli-mirage already there with JSONAPI links method? I don't know how... :(

@stefanpenner
Copy link
Member

@johnunclesam I'm not sure I have time this week (currently traveling), if you could give it another try that would be quite helpful.

@stefanpenner
Copy link
Member

stefanpenner commented Aug 24, 2017

I have a fix for #5124, which may cover this issue. I hope to get that released within a day or so. If you could double check that would be great.

@ghost
Copy link
Author

ghost commented Aug 25, 2017

Dear @stefanpenner, I tried install the master branch in my repo. Maybe the problem in #5124 is fixed, but mine is still there unfortunately.

I think we should add links example to that twiddle (I wish I could).

I enter the post page and if in the .hbs put {{model.category.id}} I see nothing immediately because it is fetching again the id... and then (after the delay I put on the server side) the id shows up! Really a big bug! :( :( :(

@stefanpenner
Copy link
Member

stefanpenner commented Aug 25, 2017

Dear @stefanpenner, I tried install the master branch in my repo.

Thanks for testing that out, to bad it wasn't addressed by the above.

and then (after the delay I put on the server side) the id shows up! Really a big bug! :( :( :(

Ya, sounds like we will need to investigate. I'll mark this as a bug and hope to get to it soon.

@stefanpenner stefanpenner changed the title 2.14.x. VSB (Very Serious Bug): links relationships id is reloaded. 2.13.2 is OK. 2.14.x. links relationships id is reloaded. 2.13.2 is OK. Aug 25, 2017
@BryanCrotaz
Copy link
Contributor

Try PR #5257 and see if that fixes your links problems

@bmac bmac closed this as completed in #5410 Apr 6, 2018
@runspired runspired added 🏷️ bug This PR primarily fixes a reported issue and removed Bug labels Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bug This PR primarily fixes a reported issue Needs Bug Verification
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants