backdrop-ops / backdropcms.org

Issue tracker for the BackdropCMS.org website
https://backdropcms.org
25 stars 21 forks source link

Project releases paths not generated according to pathauto settings. #387

Open klonos opened 7 years ago

klonos commented 7 years ago

Not sure if this is a core bug or something wrong with the project.module, but...

In https://backdropcms.org/admin/structure/types/manage/project_release we have it set as project/[node:project_name]/releases/[node:title]

image

...but the actual releases get paths in the form of project/releases/[node:title] (like https://backdropcms.org/project/releases/libraries-1x-221 for example)

klonos commented 7 years ago

...makes me wonder if the [node:project_name] tokens works or not.

ghost commented 4 years ago

I looked into this, and the [node:project_name] token works for project nodes, but not for project_release nodes.

Here're the node details for the Devel project node: image (see the $node->project['name'] there)

And here're the details for the devel 1.x-1.8.0 project_release node: image (the best it has is $node->project_release['project_nid'], which you'd have to node_load() and then get the project name that way)

So I think we're using the wrong token here. I think the solution is to create a new token (in the project_release sub-module) that gets the project name for a relase as described above (using node_load()). Unless others have a different idea...?