Ember upgrade to 3.0.0 version, problem with record loading

#1

Hi,

Recently I started to work on Ember.js project, backend is Ruby on Rails. The ember version was 2.12.3 and my goal was to upgrade at least to 3.0.0. I upgraded slowly, step by step, the first upgraded version was 2.15.0 then 2.18.0 and then the final version of Ember is 3.0.0, Ember Data is 3.0.4

I had a lot of work with upgrade, I fixed a lot of deprecations, changed a new syntax, etc… Finaly application works, but I have a problem with records loading.

On several pages the model relationships are not loaded properly, I get records in ember store and I can to check that records in console log (with filled attributes) and they’re appeared on the template (for example on select tag), but with empty attributes. In console log in object’s current state I found ‘isLoaded: false’.

On some pages, when I add a new record, it’s appear on the template with other records in each block, but the new record is without attributes and current state has a stateName: “root.loaded.created.uncommitted” in other objects the stateName is “root.loaded.saved”. I try to reload that record manually after save, but without success.

Right now is hard for me to add you a code info, because I have this problem on several pages, but at first I just wanna ask you what did you change on a new versions that can be a potentially problem with loading records?

Or is there any possibility that page is rendered before objects are loaded or something like that?

#2

Hey @dbilek, welcome to Ember and sorry you didn’t get a response here earlier! Sounds like you’re making good progress on things, tackling upgrades can be a challenge sometimes :wink:

As far as your code snags, it’s hard to give much of an answer without more context. It is possible that your models aren’t being loaded before your template (it’d help to see how one of the routes with problems is defined) or it could be something else. Could you post some code here?

Another approach (and one that sometimes works better when you’re first working through these types of issues) is to ask on the Discord help channel. There are a lot of folks who are quite willing to help who hangout there and if you explain that you’re new to Ember people will be glad to dig in in detail. You can signup here: https://discordapp.com/invite/zT3asNS