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

Missing title_prefix for routes in history pages #337

Open
ginold opened this issue Jul 4, 2016 · 8 comments
Open

Missing title_prefix for routes in history pages #337

ginold opened this issue Jul 4, 2016 · 8 comments
Milestone

Comments

@ginold
Copy link
Contributor

ginold commented Jul 4, 2016

I'm not sure it is an API problem, but here it is:
whenever i try to browse an old version of an outing, I receive an error (...) KeyError: 'associations' even though the associations were present at that time.

There is no issue with waypoints or routes.

@ginold
Copy link
Contributor Author

ginold commented Jul 4, 2016

same for title_prefix in routes page -> not available.

see c2corg/v6_ui#408

@tsauerwein
Copy link
Member

Yes, the associations are not returned for history pages. Like in v5, e.g.: http://www.camptocamp.org/summits/37620/fr/5

Same for the title prefix, e.g.: http://www.camptocamp.org/routes/194206/fr/2

@ginold
Copy link
Contributor Author

ginold commented Jul 5, 2016

Ok, I don't know if the associations should or should not be returned for history pages, however @asaunier seems concerned about not having the title_prefix. But very likely the title_prefix has to do with the associations as it is the main_waypoint's (associated wp) title...

So, is there something to do about it?

@ginold
Copy link
Contributor Author

ginold commented Jul 5, 2016

and there is this problem:

I still have this pb: In "Comparaison des documents" page (see outings/diff/736972/fr/1164793/1164795)
When I click on "Version du....", I get an "Internal Server Error".
See http://c2corgv6.demo-camptocamp.com/outings/diff/736956/fr/1164743/1164744

@tsauerwein
Copy link
Member

So, is there something to do about it?

For the associations: Would you expect the associations the document had at that version? Or the associations the document has now? I tend to say this is an "extra" task (same for the title prefix).

@tsauerwein
Copy link
Member

When I click on "Version du....", I get an "Internal Server Error".

The API returns the document with no error:
http://c2corgv6-api.demo-camptocamp.com/outings/736956/fr/1164743

This must be a problem on the UI server side.

@asaunier
Copy link
Member

asaunier commented Jul 7, 2016

Yes, the associations are not returned for history pages. Like in v5, e.g.: http://www.camptocamp.org/summits/37620/fr/5

That makes sense because there is no relationship between the versions of a document and the associations at the time of those versions: adding or removing an association doesn't create a new document version.

Same for the title prefix, e.g.: http://www.camptocamp.org/routes/194206/fr/2

Perhaps but v5 is not flawless!
It's definitely a default not to show the main waypoint name in archived versions. Because it is part of the route name: "Mont Blanc : Face N" is the real name, not "Face N".
In v5 the summit name was figured out using the most elevated associated summit.
In v6 the main waypoint id and name are part of the route attributes, aren't they? Then we should use them in the archived doc versions.

@tsauerwein
Copy link
Member

In v6 the field title_prefix caches the title of the associated main waypoint, but only on the latest locale. For history pages it would be possible to retrieve the title, but I consider this as "extra".

@asaunier asaunier changed the title associations not returned in history pages Missing title_prefix for routes in history pages Aug 12, 2016
@stef74 stef74 modified the milestones: V6.1, V6.2 Nov 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants