put alias url to landing html created

Created on 27 April 2021, about 3 years ago
Updated 20 October 2023, 9 months ago

Problem/Motivation

Drupal 9.1.7
HTML Page 1.0.2

After create content in "/html-page/html_page"
for example the url is "html-page/html_page/10"
how i can redirect this url to one normal name with alias ?
many thanks.

πŸ’¬ Support request
Status

Active

Version

1.0

Component

User interface

Created by

πŸ‡ͺπŸ‡ΈSpain Cangurin limpiezas Zaragoza

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡΅πŸ‡ͺPeru DavidCR

    Sorry for my English, I was testing the module on a Drupal 9 installation, and I'm seeing the same error you reported @Cangurin cleanups. After quickly reviewing the error, I've realized that the 'l()' function is being used, which is deprecated. Perhaps the following code could be an idea to resolve the error.

    NodeController.php::120 file.

    use Drupal\Core\Link;

    if ($vid != $html_page->getRevisionId()) {
    $link = Link::fromTextAndUrl($date, new Url('entity.html_page.revision', [
    'html_page' => $html_page->id(),
    'html_page_revision' => $vid,
    ]))->toString();
    }
    else {
    $link = $html_page->toLink($date)->toString();
    }

Production build 0.69.0 2024