Comment 25 for bug 1681627

Revision history for this message
Hua Zhang (zhhuabj) wrote : Re: Page not found error on refreshing bowser (in AngularJS-based detail page)

In fact, backporting two primitive patches [1][2] into Ocata will not be able to work, because:

1, In Ocata release, getDetailsPath returns "'project/ngdetails/OS::Glance::Image/' + item.id;"

https://github.com/openstack/horizon/blob/stable/ocata/openstack_dashboard/static/app/core/images/images.service.js#L59

function getDetailsPath(item) {
return 'project/ngdetails/OS::Glance::Image/' + item.id;
}

2, In > Ocata release, eg: Pike release, getDetailsPath returns "detailRoute + 'OS::Glance::Image/' + item.id"

https://github.com/openstack/horizon/blob/stable/pike/openstack_dashboard/static/app/core/images/images.service.js#L69

function getDetailsPath(item) {
return detailRoute + 'OS::Glance::Image/' + item.id;
}

So we will see the error 'The current URL, project/ngdetails/OS::Glance::Image/46ef8cab-dfc3-4690-8abb-d416978d237e, didn't match any of these.' when backporting two primitive patches into Ocata. So the following simple changes need to be made in urls.py in addition to the primitive backport patches as well.

-ngdetails_url = url(r'^ngdetails/',
+ngdetails_url = url(r'^project/ngdetails/',

I will propose a backport to ocata later.

[1] https://review.openstack.org/#/c/541676/
[2] https://review.openstack.org/#/c/553970/