theCrag / website

theCrag.com: Add your voice and help guide the development of the world's largest collaborative rock climbing & bouldering platform
https://www.thecrag.com/
110 stars 8 forks source link

Route descriptions replaced with ethics text in topo edit page #1823

Closed brendanheywood closed 9 years ago

brendanheywood commented 9 years ago

Lots of routes have a generic chunk of text as their description:

http://www.thecrag.com/climbing/australia/glasshouse-mountains/tibrogargan/area/12229051

image

This is not the text in the routes:

image

scd commented 9 years ago

doh, I missed this in the release. It is happening because ethic is now inherited down to the route level. There are places where this needs to be excluded in the templates, which assume a single route description. I thought I got them all, but obviously missed this one. Maybe there will be other places I missed as well.

Hot fixed and closing

brendanheywood commented 9 years ago

this isn't fixed in prod?

http://www.thecrag.com/climbing/australia/morialta/area/12317725/topo#t288932523

image

scd commented 9 years ago

actually different bug. this was the topo template, I fixed the route facet. Maybe you were refering to the topo template originally, but I assumed it was the facet.

Anyway there are probably a few other templates where this is lurking.

scd commented 9 years ago

BTW, hot fixed.

brendanheywood commented 9 years ago

yeah it was the topo page all along, thinking out load other places to check where route text is shown would be the update feed(s), streams

Also looking at the diff, is the inheritedFrom key guaranteed to be last after the main route desc? otherwise this would silently hide the main route desc

!$record->{beta}[0]->{inheritedFrom})

brendanheywood commented 9 years ago

quick audit: nodes search facet, route page meta tag description, kml and gpx export (if we cared) all look like places where this would leak. should refactor into a route markdown template and do it in a single place

scd commented 9 years ago

agreed, but I think it should be a beta template which works for areas, routes and annotations. This does not stop us doing a route template as well. If you agree please create another issue.

BTW the I am pretty sure the order of descriptions is consistent but this was never discussed as a hard and fast business rule so we should not rely on it in the long term. All other places I have put it in a for loop, it is just for the topo template I thought I would make it consistent with what was done for the area field. If I put it in a for loop then muliple descriptions will come through (in the area nodes), which I am not sure you want.