HugoBlox / hugo-blox-builder

🚨 GROW YOUR AUDIENCE WITH HUGOBLOX! 🚀 HugoBlox is an easy, fast no-code website builder for researchers, entrepreneurs, data scientists, and developers. Build stunning sites in minutes. 适合研究人员、企业家、数据科学家和开发者的简单快速无代码网站构建器。用拖放功能、可定制模板和内置SEO工具快速创建精美网站!
https://hugoblox.com/templates/
MIT License
8.2k stars 2.9k forks source link

Cookie Consent throw an error after an update to v4.8.0 #1680

Closed JOduMonT closed 4 years ago

JOduMonT commented 4 years ago

Hi;

After an update of Themes Academic to v4.8.0" used with Netlify and Hugo version to v0.65.0

Particularity of my setup

  1. I downloaded all js and css locally (as explained in https://sourcethemes.com/academic/docs/**offline-site**/) and it was working well before the update
  2. in site_js.html I don't see anything related to cookie_consent
  3. my netlify.toml
[build]
  command = "hugo --gc --minify -b $URL"
  publish = "public"

[build.environment]
   HUGO_VERSION = "0.65.0"
  HUGO_ENABLEGITINFO = "true"

[context.production.environment]
  HUGO_ENV = "production"

[context.deploy-preview]
  command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"

[context.branch-deploy]
  command = "hugo --gc --minify -b $DEPLOY_PRIME_URL"

[[headers]]
  for = "*.webmanifest"
  [headers.values]
    Content-Type = "application/manifest+json; charset=UTF-8"

[[headers]]
  for = "index.xml"
  [headers.values]
    Content-Type = "application/rss+xml"

Cookie Consent give me an error:

ERROR 2020/05/02 06:40:46 render of "page" failed: execute of template failed: template: _default/single.html:5:3: executing "_default/single.html" at <partial "site_head" .>: error calling partial: execute of template failed: template: partials/site_head.html:175:5: executing "partials/site_head.html" at <partial "cookie_consent" .>: error calling partial: "/home/username/Public/Domain.tld/themes/academic/layouts/partials/cookie_consent.html:6:99": execute of template failed: template: partials/cookie_consent.html:6:99: executing "partials/cookie_consent.html" at <$js.cookieconsent.url>: invalid value; expected string

If I remove {{ partial "cookie_consent" . }} from the sitehead the issue don't appear, so I really have an issue with $js.cookieconsent.url (line 6 character 99)_

Now, what I should do to continue my debug ?

JOduMonT commented 4 years ago

I might skip a version I think my bug is related to this refactor in v4.7

gcushen commented 4 years ago

The error implies that the data in themes/academic/data/assets.toml may have been changed or overridden from the data provided in the release. You might wish to remove any overrides/customizations which you have applied and re-install the theme.

Also, offline sites are more complex and the offline assets vary for each version. It's recommended to remove all assets related to offline sites prior to upgrading and then re-apply the offline steps on the new version once the upgrade is successful.

For support, see https://github.com/gcushen/hugo-academic/blob/master/.github/support.md

JOduMonT commented 4 years ago

@gcushen thanks for your reply and sorry I missed the template For **help** and **questions**, please join our **[community chat](https://spectrum.chat/academic)** or use the **[forum](https://discourse.gohugo.io/c/themes)** 🚑.

JOduMonT commented 4 years ago

JFYI @gcushen I don't know what happened between March 2 (the day I opened this issue) and March 7 (the day you release version 4.8) but after losing few days of debugging my pseudo error which you believe it was on my side and too complex to support it has been fixed automagically with your "official" release