Permalink Generator icon
Module Id
permalink-generator
Group Id
org.jahiacommunity.modules
Updated
Requires Jahia
8.2.3.0
Author
pvollenweider
Category
Content Features
Status
COMMUNITY info

Permalink Generator group_work

url seo permalink

 Automatically generates and maintains permanent vanity URLs for all pages and displayable content — with no manual intervention required.

The goal of this module has always been that editors should never have to think about vanity URLs. They should just exist and stay correct as the site evolves. Version 1.0.x achieved this for the creation case only. The gap was everything that happens after a page is created: renames, moves, restructures. Every one of those operations left a stale URL behind. New Version 2 closes that gap entirely, and adds a full admin panel so site administrators can audit and control vanity URL state across the site at any time.

Every content lifecycle event is handled:

  • Title set → vanity URL created from the SEO-friendly slug
  • Page renamed → new vanity created, old one kept as a redirect
  • Page moved → vanity prefix updated across the entire subtree
  • Page deleted → vanity deactivated (no 404s on existing links)
  • Page copied → fresh vanity computed independently

  
A full admin panel (Site Settings → Permalink Generator) lets administrators:

  • Choose SMART mode (manual vanities are never overwritten) or FORCE mode
  • Exclude content subtrees from automatic generation
  • Audit pages with missing vanity URLs and generate them in bulk
  • Preview and apply force-regeneration across the site

Requires Jahia 8.2.3+. Depends on the built-in seo module.
 

Dependencies & Dependants

Dependencies
  • NONE
Dependants
  • NONE

Changelog 2.0.1

Security

  • Action endpoint authentication — GeneratePermalinksAction now explicitly requires an authenticated user and the siteAdminPermalinkGenerator permission. Previously these checks were not enforced at the action level.
  • Exception details no longer leaked — internal error messages are no longer returned to the client; a generic message is returned and the detail is logged server-side.

Fixed

  • Drools re-entrancy guard — removePermalinkMixin() now skips writes when called from a system session, preventing an infinite loop when Drools processes module-initiated saves.
  • isPublishedInLive() error handling — unexpected RepositoryException (other than ItemNotFoundException) now preserves the vanity instead of incorrectly treating it as unpublished.
  • CSS — help button size — .pl-help-btn restored to 20×20 px (was 44×44 px).
  • CSS — legend pills — decorative aria-hidden pills in the legend overridden to compact size.

Changed

  • saveVanityWithMixin() split into addMixinToSavedVanity() — single save per operation closes a create/save re-entrancy window.
  • Many magic strings extracted to named constants in PermalinkGeneratorService.

Dependencies

  • org.assertj:assertj-core 3.24.2 → 3.27.7 (fixes CVE-2026-24400 XXE in test scope)
  • cypress 13.17.0 → 15.17.0 / qs 6.14.2 → 6.15.2 (dev/test only)

Full changelog: https://github.com/Jahia/permalink-generator/blob/main/CHANGELOG.md

FAQ

How does the module generate vanity URLs?

When a page title (jcr:title) is set, the module computes a SEO-friendly slug using the Slugify library (lowercase, accents stripped, spaces to hyphens).
The slug is combined with the parent page's vanity URL to build the full path:

  • Home / Products / Cloud Solutions → /products/cloud-solutions
  • Same page in French → /fr/produits/solutions-cloud

What happens when I rename or move a page?

Rename: a new vanity is created for the new title. The old vanity is kept as
an active redirect — existing links and bookmarks continue to work.

Move: the slug is preserved and only the path prefix changes. All child pages
are updated automatically. Old vanities become redirects.

What is SMART mode vs FORCE mode?

SMART (default): the module never overwrites a vanity URL that an editor set
manually in the SEO tab. On rename or move, the prefix is updated but the
editor's slug is preserved.

FORCE: the module always applies the computed URL. Manual vanities are demoted
to redirects. Use this when launching a new site or after a planned SEO migration.

How do I generate vanity URLs for pages that existed before I enabled the module?

Use the Missing Permalink Audit panel (Site Settings → Permalink Generator):

  1. Enter a JCR path to scan (defaults to site root)
  2. Click Scan — pages with missing vanities are listed per language
  3. Select and click Generate

Can I exclude certain content from automatic generation?

Yes, two ways:

  • Site-level: enter JCR paths (one per line) in the Excluded Paths field in Site Settings → Permalink Generator
  • Page-level: add the jmix:permalinkExcluded mixin to a page in Content Editor

Does the module work for non-page content?

Yes — any displayable node (a node type that has a dedicated content template)
receives a vanity URL, not just pages.
 

How To Install

  1. Install from the Jahia Store or via the Jahia administration panel
    (Administration → Modules & Extensions → Modules).
    Full guide: https://academy.jahia.com/training-kb/tutorials/administrators/installing-a-module
  2. Enable the module on your site:
    Site Settings → Modules → search "Permalink Generator" → Enable
  3. The module starts working immediately for new content. For existing pages that have no vanity URL yet, use the Missing Permalink Audit:
    Site Settings → Permalink Generator → scan and generate in bulk.

Full documentation and source: https://github.com/Jahia/permalink-generator

Images

License

MIT License

Copyright (c) 2021 Jahia Forge - Code Repository

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A  ARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.