Install

Works with Drupal: ^10.3 || ^11

Using Composer to manage Drupal site dependencies

Alternative installation files

Download tar.gz 265.29 KB
MD5: 7271a4eb3d9f31000e10f7d5ad400824
SHA-1: 314261b1a60cb81fd43db28190bd465d80d6a770
SHA-256: 63e6aa92128766369d75ff0f2df64841fc200b018a1847b1b26c803958b81276
Download zip 343.78 KB
MD5: 48a3a70273558c7ab4dec3e77ccd0c3d
SHA-1: 0bd4f944634054b491090f9622944ed0ac72da04
SHA-256: 7a1a686055984d6d7ec890e80cfc4d46f06b1d7a87706a5311736141da4eef75

Release notes

Third beta of Short URL 2.0. It fixes short URLs that showed a page instead of redirecting when a path alias had their slug, which every short URL did under a Pathauto pattern like /[node:title]. It also stops Short URL from building its services when content of other types is saved, viewed or listed.

Upgrade

  • Run drush updatedb: two post-updates run. The first shows the short URL and its QR code with the slug field's new formatter (#3602999). The second deletes the path aliases that short URLs have at their own slug, and lists each one in its output and in the site log (#3603000).
  • Sites that deploy configuration: export the configuration after drush updatedb. Otherwise the next configuration import restores the short URL display with the removed "Short URL & QR code" pseudo-field (#3602999).
  • Themes: a node template that prints content.shorturl_qrcode must print content.field_shorturl_slug instead (#3602999).

Behavior changes

A path alias never takes a short URL's slug any more. The Redirect module resolves path aliases before it looks a request up, so an alias at /promo showed its page, and the short URL with the slug promo never redirected (#3603000):

  • Short URL nodes get no Pathauto alias: each save turns off their "Generate automatic URL alias" setting. A short URL's address is its slug.
  • Pathauto gives other content another alias, /promo-0 for example, instead of a short URL's slug.
  • The URL alias box of content forms and the URL aliases page refuse a short URL's slug. An alias that is already stored is kept on later saves of its page.
  • A slug cannot be changed to a path that already has an alias, the short URL's own node included.
  • The update keeps an alias that another page already has at a short URL's slug, because it is that page's address. Change the slug, or that page's alias, to make the short URL redirect again.
  • Existing short URL nodes keep the Pathauto setting they had until they are next saved. A bulk "Generate URL aliases" run before then gives them an alias like /promo-0, never their slug.

The short URL and its QR code are shown by the slug field's "Short URL and QR code" formatter, instead of the "Short URL & QR code" pseudo-field (#3602999).

Bug fixes

  • Editing a short URL to the slug of a redirect made before Short URL was installed, or regenerating its slug when its mode changed, failed with a database error. Such redirects now count as taken (#3603000). Domain Short URL has the same fix in 1.x-dev (#3589284).

Performance

  • Saving, viewing or listing content of any other type no longer builds Short URL's slug generator, redirect manager, visit tracker and QR code generator (#3602999).

API changes

  • ShortUrlViewHooks is removed, with the shorturl_qrcode pseudo-field and its hook_node_view(). The field formatter shorturl_qrcode (ShortUrlQrCodeFormatter) replaces them.
  • ShortUrlEntityHooks receives the slug generator, the short URL manager and the visit tracker as closures. Its redirect, operation, field and cron hooks moved to ShortUrlRedirectHooks, ShortUrlOperationHooks, ShortUrlFieldHooks and ShortUrlCronHooks.
  • New: the ShortUrlAlias constraint on the path alias alias field, and ShortUrlRedirectLookupTrait::isShortUrlSlug().

All changes since 2.0.0-beta2

Bug fixes

  • #3602999 Saving any node, rendering any node, and listing any entity builds Short URL's slug generator, redirect manager, visit tracker and QR code generator
  • #3603000 Pathauto compatibility issue: the default alias pattern silently breaks short URL redirects, and the module gives no warning
Created by: mably
Created on: 22 Oct 2026 at 08:16 UTC
Last updated: 22 Oct 2026 at 08:17 UTC
Bug fixes

Other releases