Language missing from preview URL

Created on 5 November 2024, 3 months ago

Problem/Motivation

On a multilingual website, with URL based language discovery, the preview URL doesn't include the language.

Proposed resolution

Because the preview URL generation doesn't include the absolute flag and language option a potential language id is missing from the final URL. This can be fixed by including the flag and the language option, and by replacing the current domain with the preview domain in the final string.

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡§πŸ‡ͺBelgium klaasvw

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

Merge Requests

Comments & Activities

  • Issue created by @klaasvw
  • Pipeline finished with Success
    3 months ago
    Total: 181s
    #330488
  • πŸ‡§πŸ‡ͺBelgium klaasvw

    The MR and the attached patch add a new service that helps in generating the draft, iframe and published URLs.

    Note that there's an assumption that the entity is a node, which was already originally the case. The MR doesn't address that, so maybe something for a follow-up issue.

    Also note that you may have to add the code below to you composer.json config when applying the patch through composer. Because the info yml file also has a change it conflicts with the d.o versioning.

    "config":
      ...
      "preferred-install": {
        "drupal/decoupled_preview_iframe": "source",
        "*": "auto"
      },
    ...
    
  • πŸ‡§πŸ‡ͺBelgium klaasvw

    Fixed an error when the default URL is used.

  • Pipeline finished with Success
    3 months ago
    Total: 255s
    #330883
  • πŸ‡§πŸ‡ͺBelgium klaasvw
  • πŸ‡§πŸ‡ͺBelgium klaasvw
  • Pipeline finished with Failed
    3 months ago
    Total: 1085s
    #330903
  • Pipeline finished with Failed
    3 months ago
    Total: 436s
    #330933
  • πŸ‡ΊπŸ‡ΈUnited States jmolivas El Centro, CA

    Thanks for the MR @klaasvw taking a look to this

  • Status changed to RTBC 23 days ago
  • πŸ‡ΊπŸ‡ΈUnited States kurttrowbridge

    I noticed the same issue, and the MR properly addressed it for me. Thanks! Marking RTBC.

Production build 0.71.5 2024