Problem/Motivation

In #3535554: HTML tags in body text is shown as plain text it was discovered that the URL alias can be missing a leading slash, where for example "2026/03/14/aliquid-quis" should be "/2026/03/14/aliquid-quis".

Steps to reproduce

Proposed resolution

  • Update the code to add the missing leading slash ("if leading slash missing then add it")
  • Move it to the new MigrateFieldsBuilders.php to keep streamlining the generator
  • Expand the test coverage for path aliases to cover this as well

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

ressa created an issue. See original summary.

ressa’s picture

Title: Add missing slash in migrations » Add missing slash in Path alias

Fix title.

hongpong made their first commit to this issue’s fork.

sapnil_biswas made their first commit to this issue’s fork.

  • hongpong committed efe17bd3 on 8.x-3.x
    feat: #3580021 Add missing slash in Path alias and test coverage, update...
hongpong’s picture

Status: Active » Fixed

Thanks for reporting, ressa, I added a test to confirm it works. sapnil_biswas thanks for your first contribution and welcome to drupal.org . I have credited you on the issue.

However your function signature is different than mine, although it is quite similar. I am going to close the issue as fixed but if you can rebase your fix onto the new head 8.x-3.x we can take this additional test. It is OK to reopen the issue or attach it to a different one.

If you want to get further involved we have more issues we are trying to sort - see #2904990: Plan for wordpress_migrate 8.x-3.x beta release - rebasing and evaluating any of the ones discussed would be very helpful.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

ressa’s picture

Very impressive, super fast, thank you both! The solution works perfectly, and now the dev-version has great paths 🚀
(and HTML is imported and displayed as well, all fixed in the same day!)

sapnil_biswas’s picture

Hi, just checking — I can see my name listed in the contribution record, but it seems the credit checkbox might not have been selected. Could you please confirm? Thanks!

ressa’s picture

Status: Fixed » Needs review

@sapnil_biswas: Thanks for your work here, it's really appreciated. I am sure it was an oversight from @hongpong, he is usually very good at granting credits. You can see the credit status here, and that no one was credited yet: https://new.drupal.org/contribution-record/11446411

Another thing: When you have pushed new code up, and it is ready for review, please change the issue Status to "Needs review", to make sure other users know some new code has arrived: https://www.drupal.org/docs/develop/issues/fields-and-other-parts-of-an-...

You can see all the Status'es in effect here: https://www.drupal.org/project/issues/wordpress_migrate

sapnil_biswas’s picture

Hi @ressa, thanks a lot for the clarification and guidance!

I’m quite new here and still getting familiar with the workflow and processes, so this really helps. I’ll make sure to update the issue status to “Needs review” going forward when it’s ready.

Appreciate your support!

hongpong’s picture

Status: Needs review » Fixed

Hi sapnil_biswas, I tried to add your contribution record earlier but something went awry. Regarding this MR 50 there are a number of unrelated changes on here and it alters the function signature and name from what is already on head. I would suggest if you want the MR to be included please narrow it down to the minimum necessary, such as the additional test that you included, and rebase to what we already have on the 8.x-3.x head. Please feel free to reopen if this is taken care of. If you want to add additional code cleanups these should be moved to a separate issue. Appreciate your help! --dan

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.