c2corg / v6_ui

UI for c2c.org v6
GNU Affero General Public License v3.0
7 stars 12 forks source link

On route, links to material article are not migrated #1005

Closed HSERGERAERT closed 7 years ago

HSERGERAERT commented 8 years ago

on v5, route http://www.camptocamp.org/routes/784566/fr/la-pyramide-traversee-toit-pyramide-petite-traversee The route has a connection, in material section, to the article "material" http://www.camptocamp.org/articles/185384/fr/le-contenu-du-sac-alpinisme-rocheux-de-f-a-ad

on v6 the article exists https://www.demov6.camptocamp.org/articles/185384/fr/le-contenu-du-sac-alpinisme-rocheux-de-f-a-ad

but the route has no connection to the article https://www.demov6.camptocamp.org/routes/784566/fr/la-pyramide-traversee-toit-pyramide-petite-traversee, only "sangles" was migrated

tsauerwein commented 8 years ago

When was the association between the route and article created? Because in the v5 database that we made the migration with, this article only has associations to 4 other articles (which are shown).

brunobesson commented 8 years ago

I don't think the association exists in the database. In v5, the article link is displayed depending on the route characteristics (activity, difficulty, ...). So this isn't a migration problem.

tsauerwein commented 8 years ago

In v5, the article link is displayed depending on the route characteristics (activity, difficulty, ...).

Can you give more information about how this works?

brunobesson commented 8 years ago

The code is here on v5: https://github.com/c2corg/camptocamp.org/blob/72e777075f2e6260b1d2ef563ab0f90c383038ba/apps/frontend/modules/routes/templates/_i18n.php

Basically, if some conditions are met, a link to a specific article is added in gear section. There are several articles (https://github.com/c2corg/camptocamp.org/blob/9a44a3b50ab2681a5e27435e1469c3911a192f6d/deployment/conf.ini-dist#L81)

To translate the logic:

In addition to this, there are some strings for each language to display the link.

Yes, it's a bit complicated :stuck_out_tongue_closed_eyes: @fbunoz did most of this work, he may be able to correct me

tsauerwein commented 8 years ago

Thanks for the info!

Yes, it's a bit complicated

Then it is unlikely that we will have the time to do it for the Go Live.

brunobesson commented 8 years ago

Then it is unlikely that we will have the time to do it for the Go Live.

I never thought it would/could be so.

fbunoz commented 7 years ago

fbunoz did most of this work, he may be able to correct me

It is correct. It is complicated because it misses some articles or chapters for some rating ranges. An objective is to improve these articles.

brunobesson commented 7 years ago

@fbunoz you should have taken a look 2 days ago :wink: I had incorrectly reported the logic, #1417 should be the final stage.

desnoes commented 7 years ago

Fixed on demo