Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8997915
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:57:14+00:00 2026-06-15T23:57:14+00:00

I have a basic router for posts index and show action. If I navigate

  • 0

I have a basic router for posts index and show action. If I navigate to a single post, it renders the page correctly and sets the URL to /#/posts/foo. But if I copy the URL and paste it into a new tab, it will load the page, but the url will change to /#/posts/null. Other than that the page is rendered properly and no errors are shown

show: Em.Route.extend({
  route: "/post/:id",

  serialize: function(router, context) {
    return { id: context.get("id") };
  },

  deserialize: function(router, context) {
    return App.get("store").find(App.Post, context.id);
  },

  connectOutlets: function(router, context) {
    router.get("applicationController").connectOutlet("body", "post", context);
  }
})

with a simple model

App.Post = DS.Model.extend({
  id:      DS.attr("string"),
  title:   DS.attr("string"),
  content: DS.attr("string"),
  image:   DS.attr("string")
});

and the log looks like this

STATEMANAGER: Entering root ember.js:17420
STATEMANAGER: Sending event 'navigateAway' to state root. ember.js:17172
STATEMANAGER: Sending event 'unroutePath' to state root. ember.js:17172
STATEMANAGER: Sending event 'routePath' to state root. ember.js:17172
STATEMANAGER: Entering root.show 

and a router

App.Store = DS.Store.extend({
  revision: 4,
  adapter: DS.RESTAdapter.create({
    bulkCommit: false
  })
});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T23:57:14+00:00Added an answer on June 15, 2026 at 11:57 pm

    The issue was specifying id as an attrirbute. You should never do that and let Ember Data take care of it automatically.

    App.Post = DS.Model.extend({
      title:   DS.attr("string"),
      content: DS.attr("string"),
      image:   DS.attr("string")
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have basic Spring MVC 3 setup for i18n where I can show labels
I have a pretty basic Backbone app which uses a router to instantiate views
I'm having trouble doing a basic record update via POST in Laravel. I have
All the examples of WebAPI I have seen show how to have a basic
I have an ember.js router based application and need to perform some basic logic
I have a form: %form{:action:method => post} %fieldset %label{:for => title} Title: %input{:name =>
I have a very basic POST route that creates a new user out of
I have a controller POST action that redirects to a GET method using RedirectToAction.
I have set up a site that is correctly using basic CRUD functionality succesfully.
I have a basic project with areas in it, I have registered my routes

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.