Misplaced page resources in 0.112 multilingual - a regression?

I have a site that has “ru” for DefaultContetLanuguage, so my Russian site is in /, and the English version in /en/. /ru/ still gets created, but it only has sitemap.xml and index.html with a redirect to /.

The site has a number of categories, and uses page bundles heavily. Most of the pages are in /content/category1/page1/*, /content/category2/page3/*, etc, and there’s no problem with those in 0.112. However, some page bundles are not in any category, and reside in /content/pageX/*. They work OK in 0.111.3, but not in 0.112.0 to 0.112.4.

For any page bundle in /content/pagex/ consisting of index.ru.md, index.en.md, and image.jpg, the English version is generated just fine: /en/pagex/index.html and /en/pagex/image.jpg are present. For a Russian version, there’s /pagex/index.html and /ru/pagex/image.jpg (used to be in /pagex/image.jpg before 0.112); of course, the links to images point to /pagex/image.jpg in site root, not /ru/, so these images end up broken.

Only the top-level page bundles are affected; images in more deeply nested page bundles end up where they should. A regression?

Can you share your site configuration?

The theme is a heavily modified LoveIt, and the config is below:

config.toml
## Basic Configuration
baseurl = "https://evgenykuznetsov.org/"
languageCode = "ru"

title = "DIMV"
theme = ["hugo-video", "loveit"]

DefaultContentLanguage = "ru"

# summarylength = 30

# paginate = 5

rssLimit = 20

enableGitInfo = true
enableRobotsTXT = true

enableInlineShortcodes = false

[[module.mounts]]
source = 'content'
target = 'content'

[[module.mounts]]
source = 'content/go'
target = 'content/code'

[[module.mounts]]
source = 'content/code'
target = 'content/code'

[languages]
  [languages.en]
    languageName = "In English"
    weight = 2
    description = "Evgeny Kuznetsov's personal website"
    copyright = "Evgeny Kuznetsov"

  [languages.ru]
    languageName = "По-русски"
    weight = 1
    description = "Личный сайт Евгения Кузнецова"
    copyright = "Евгений Кузнецов"

[author]
  name = "Evgeny Kuznetsov"
  email = "evgeny@kuznetsov.md"
  link = "https://evgenykuznetsov.org"
  image = "/img/avatar.jpg"
  nickname = "nekr0z"
  sex = "M"
  
[languages.ru.author]
  name = "Евгений Кузнецов"
  email = "evgeny@kuznetsov.md"
  link = "https://evgenykuznetsov.org"
  image = "/img/avatar.jpg"
  nickname = "nekr0z"
  sex = "M"
  
## Site Settings
[params]
    title = "DIMV"
    description = "Evgeny Kuznetsov"
    authorimage = "/img/avatar.jpg"
    dateformat = "January 2, 2006"
    mainSections = ["posts"]

    paginate = 20

    # sidebar, copyright & license
    copyright = "Evgeny Kuznetsov"
    showBuiltWith = true
    poweredBy = '<a rel="external nofollow" href="https://m.do.co/c/f1458b17f038" title="Digital Ocean referral link">Digital Ocean</a>'

    defaultTheme = "auto"

    WebmentionAccount = "evgenykuznetsov.org"

    websubHub = [
	"https://switchboard.p3k.io/",
	"https://evgenykuznetsov.superfeedr.com/",
    ]
    feedFiles = [
	"comments.xml",
	"index.xml",
	"single-language.xml",
    ]
    # Table of contents
    #toc = none, "hugo", or "tocbot"
    toc = "hugo"

    # LoveIt version
    version = "0.2.X"
    fingerprint = "sha384"
  
  [params.header]
    desktopMode = "fixed"
    mobileMode = "auto"

    [params.header.title]
      name = "DIMV"

  [params.search]
    enable = false
    type = "lunr"
    contentLength = 4000
    placeholder = ""
    maxResultLength = 10
    snippetLength = 30
    highlightTag = "em"
    absoluteURL = false

  [params.footer]
    since = 2003
    license = '<a rel="license external" href="https://creativecommons.org/licenses/by-sa/4.0" title="License CC BY-SA 4.0 (where not otherwise specified)."><i class="fab fa-creative-commons"></i> <i class="fab fa-creative-commons-by"></i> <i class="fab fa-creative-commons-sa"></i></a>'

  [languages.ru.params.footer]
    since = 2003
    license = '<a rel="license external" href="https://creativecommons.org/licenses/by-sa/4.0/deed.ru" title="Лицензия CC BY-SA 4.0 (где не указано иное)."><i class="fab fa-creative-commons"></i> <i class="fab fa-creative-commons-by"></i> <i class="fab fa-creative-commons-sa"></i></a>'

  [languages.ru.params.home]
    rss = 20

  [languages.en.params.home]
    rss = 20

    [languages.ru.params.home.posts]
      enable = true
      paginate = 10

    [languages.en.params.home.posts]
      enable = true
      paginate = 10

    [languages.ru.params.home.profile]
      title = "Евгений Кузнецов"
      avatarURL = "/img/avatar.jpg"
      social = true

    [languages.en.params.home.profile]
      title = "Evgeny Kuznetsov"
      avatarURL = "/img/avatar.jpg"
      social = true

  [params.section]
    rss = 20

  [params.list]
    rss = 20

  [params.typeit]
    duration = -1

  [params.page]
    rssFullText = true
    lightgallery = true

    [params.page.toc]
      enable = false

    [params.page.comment]
      enable = true

    [params.page.code]
      copy = true
      maxShownLines = 100

    [params.page.share]
      enable = false

[permalinks]
    # posts = "/:year/:slug"

[webmentions]
    excludesources = [
      "/tags/*",
      "/en/tags/*",
      "/categories/*",
      "/en/categories/*",
      "/blog/*",
      "/en/blog/*",
      "/feeds/*",
      "/awstats/*",
      "/repo/*",
      "/baikal/*",
      "/hfeed*",
      "/en/hfeed*",
      "/single-language*",
      "/en/single-language*",
      "/page/*",
      "/en/page/*",
      "/index.html",
      "/en/index.html",
      "/go/index.html",
      "/en/go/index.html",
      "/go/single-language.html",
      "/en/go/single-language.html",
      "/cv/*",
      "/en/cv/*",
    ]
    excludedestinations = [
      "https://evgenykuznetsov.org",
      "mailto:",
      "/tags/",
      "/en/tags/",
      "/categories/",
      "/en/categories/",
    ]
    alsoWatch = ["#webmentions"]
    excludeSelectors = ["#comments", ".post-nav", ".back-home-nav"]
    oldDir = "old/public"
    newDir = "public"
    concurrentFiles = 2
    concurrentRequests = 5

## Social Accounts
[params.social]
    GitHub = "nekr0z"
    Twitter = "nekr0z"
    # facebook = "evgkuz"
    orcid = "0000-0002-0343-0589"
    microblog = "nekr0z"
    # wishlist = "/wishlist"
    Email = "evgeny@kuznetsov.md"
    RSS = false
    PGPkey = "/key.asc"
    # lichess = "nekr0z"
    # gravatar = "your-email@example.com"
    
#  App icon config
[params.app]
    # optional site title override for the app when added to an iOS home screen or Android launcher
    title = "DIMV"
    # whether to omit favicon resource links
    noFavicon = false
    # modern SVG favicon to use in place of older style .png and .ico files
    svgFavicon = "/favicon.svg"
    # Android browser theme color
    themeColor = "#ffffff"
    # Safari mask icon color
    iconColor = "#6d2b2b"
    # Windows v8-10 tile color
    tileColor = "#ffc40d"

## Main Menu
[[languages.en.menu.main]]
    name = "Blog"
    weight = 100
    identifier = "blog"
    url = "/en/blog/"
[[languages.ru.menu.main]]
    name = "Блог"
    weight = 100
    identifier = "blog"
    url = "/blog/"
[[languages.en.menu.main]]
    name = "Code"
    weight = 200
    identifier = "code"
    url = "/en/code/"
[[languages.ru.menu.main]]
    name = "Код"
    weight = 200
    identifier = "code"
    url = "/code/"
[[languages.ru.menu.main]]
    name = '<i class="fas fa-tags fa-fw"></i>'
    weight = 370
    identifier = "tags"
    url = "/tags/"
[[languages.ru.menu.main]]
    name = '<i class="far fa-folder fa-fw"></i><i class="far fa-folder fa-fw"></i>'
    weight = 360
    identifier = "categories"
    url = "/categories/"
[[languages.en.menu.main]]
    name = '<i class="fas fa-tags fa-fw"></i>'
    weight = 370
    identifier = "tags"
    url = "/tags/"
[[languages.en.menu.main]]
    name = '<i class="far fa-folder fa-fw"></i><i class="far fa-folder fa-fw"></i>'
    weight = 360
    identifier = "categories"
    url = "/categories/"
[[languages.en.menu.main]]
    name = "About"
    identifier = "about"
    weight = 350
    url = "/en/about/"
[[languages.ru.menu.main]]
    name = "О сайте"
    identifier = "about"
    weight = 350
    url = "/about/"

[outputs]
    page = ["HTML", "htaccess", "commentsRSS"]
    home = ["HTML", "RSS", "hfeed", "lang", "langRSS"]
    section = ["HTML", "RSS", "lang", "langRSS"]
    taxonomy = ["HTML", "lang"]
    term = ["HTML", "RSS", "lang", "langRSS"]

[mediaTypes]
  [mediaTypes."text/htaccess"]
    suffixes = ["htaccess"]

[outputFormats]
  [outputFormats.htaccess]
    mediaType = "text/htaccess"
    baseName = ""
    isPlainText = false
    notAlternative = true
  [outputFormats.hfeed]
    mediaType = "text/html"
    baseName = "hfeed"
    rel = "feed"
    permalinkable = true
  [outputFormats.lang]
    mediaType = "text/html"
    baseName = "single-language"
    permalinkable = true
  [outputFormats.langRSS]
    mediaType = "application/rss+xml"
    baseName = "single-language"
    permalinkable = false
    noUgly = true
  [outputFormats.commentsRSS]
    mediaType = "application/rss+xml"
    baseName = "comments"
    permalinkable = false
    noUgly = true

[markup]
  [markup.highlight]
    lineNos = true
    style = "github"
    noClasses = false
    guessSyntax = true
    lineNumbersInTable = true
  [markup.goldmark.renderer]
    # whether to use HTML tags directly in the document
    unsafe = true

[services]
  [services.youtube]
    privacyEnhanced = true

[privacy]
  [privacy.youtube]
    privacyEnhanced = true

[imaging]
quality = 90

[frontmatter]
  publishDate = [":default", ":fileModTime"]
  lastmod = ["lastmod", ":default"]

I created a minimal site and can’t yet reproduce the problem.

git clone --single-branch -b hugo-forum-topic-44600 https://github.com/jmooring/hugo-testing hugo-forum-topic-44600
cd hugo-forum-topic-44600
hugo server

Hugo v0.112.4-e285153d

content/
content/
├── pagex/
│   ├── image.jpg
│   ├── index.en.md
│   └── index.ru.md
├── posts/
│   └── post-1/
│       ├── image.jpg
│       ├── index.en.md
│       └── index.ru.md
├── _index.en.md
└── _index.md


public/
public/
├── en/
│   ├── pagex/
│   │   ├── image.jpg
│   │   └── index.html
│   ├── posts/
│   │   ├── post-1/
│   │   │   ├── image.jpg
│   │   │   └── index.html
│   │   └── index.html
│   ├── index.html
│   └── sitemap.xml
├── pagex/
│   ├── image.jpg
│   └── index.html
├── posts/
│   ├── post-1/
│   │   ├── image.jpg
│   │   └── index.html
│   └── index.html
├── ru/
│   ├── index.html
│   └── sitemap.xml
├── favicon.ico
├── index.html
└── sitemap.xml


Upon deeper investigation, it turned out that some pages on my site, including those that triggered the described behavior, had malformed page bundles.

Please accept my apologies for the extra work my mislead report here caused!

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.