Token `[node:book:parents:join-path]` returns un-processed path
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3578840. --> Reported by: [liam morland](https://www.drupal.org/user/493050) Related to !167 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>The value returned by <code>[node:book:parents:join-path]</code> is the parent node titles, separated by a slash. This means that if a parent is called "Book page", the path will contain <code>Book page</code> instead of <code>book-page</code>.</p> <h4 id="summary-steps-reproduce">Steps to reproduce</h4> <ol> <li>Set <code>[node:book:parents:join-path]/[node:title]</code> as the URL alias pattern for your book content type.</li> <li>Create a book called "Book top".</li> <li>Create a child page under it.</li> </ol> <p>Observe that the path contains <code>Book top</code> instead of <code>book-top</code>.</p> <p>This can be partially worked-around on <code>admin/config/search/path/settings</code> by removing <code>join-path</code> from the "Safe tokens" and under "Punctuation", setting "Slash" to "No action". However, this would not work correctly if a page title contains a slash.</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>In <code>BookTokenHooks</code>, the <code>[node:book:parents:join-path]</code> token should return path-style text, like <code>book-page</code>. If changing <code>[node:book:parents:join-path]</code> is a problem for backward-compatibility, create a new token.</p> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <p>Decide what to do. Implement. Document the correct URL alias pattern to use.</p> <h3 id="summary-ui-changes">User interface changes</h3> <p>None.</p> <h3 id="summary-api-changes">API changes</h3> <p>Change in meaning of token or new token.</p> <h3 id="summary-data-model-changes">Data model changes</h3> <p>None.</p> > Related issue: [Issue #3562297](https://www.drupal.org/node/3562297)
issue