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.36k stars 2.91k forks source link

Error while rendering "page" in "post/": template: _default/single.html:11:7: #720

Closed crazyhottommy closed 6 years ago

crazyhottommy commented 6 years ago

Hi there,

it was working before on my old Mac, I have a new Mac and now it gives me this error.

blogdown::serve_site()
Building sites … ERROR 2018/10/02 11:22:49 Error while rendering "page" in "post/": template: _default/single.html:11:7: executing "_default/single.html" at <partial "article_met...>: error calling partial: template: partials/article_metadata.html:37:18: executing "partials/article_metadata.html" at <$.Site.GetPage>: error calling GetPage: too many arguments to .Site.GetPage: [taxonomyTerm categories R]. Use lookups on the form {{ .Site.GetPage "/posts/mypage-md" }}
createTcpServer: address already in use
To stop the server, run servr::daemon_stop("140233446301480") or restart your R session
Serving the directory /Users/mingtang/github_repos/DivingIntoGeneticsAndGenomics at http://127.0.0.1:3274
> devtools::session_info()
Session info ----------------------------------------------------------------------------------------------------------
 setting  value                       
 version  R version 3.5.1 (2018-07-02)
 system   x86_64, darwin15.6.0        
 ui       RStudio (1.2.1013)          
 language (EN)                        
 collate  en_US.UTF-8                 
 tz       America/New_York            
 date     2018-10-02                  

Packages --------------------------------------------------------------------------------------------------------------
 package    * version date       source        
 backports    1.1.2   2017-12-13 CRAN (R 3.5.0)
 base       * 3.5.1   2018-07-05 local         
 blogdown     0.8     2018-07-15 CRAN (R 3.5.0)
 bookdown     0.7     2018-02-18 CRAN (R 3.5.0)
 compiler     3.5.1   2018-07-05 local         
 datasets   * 3.5.1   2018-07-05 local         
 devtools     1.13.6  2018-06-27 CRAN (R 3.5.0)
 digest       0.6.17  2018-09-12 CRAN (R 3.5.0)
 evaluate     0.11    2018-07-17 CRAN (R 3.5.0)
 graphics   * 3.5.1   2018-07-05 local         
 grDevices  * 3.5.1   2018-07-05 local         
 htmltools    0.3.6   2017-04-28 CRAN (R 3.5.0)
 httpuv       1.4.5   2018-07-19 CRAN (R 3.5.0)
 knitr        1.20    2018-02-20 CRAN (R 3.5.0)
 later        0.7.5   2018-09-18 CRAN (R 3.5.0)
 magrittr     1.5     2014-11-22 CRAN (R 3.5.0)
 memoise      1.1.0   2017-04-21 CRAN (R 3.5.0)
 methods    * 3.5.1   2018-07-05 local         
 mime         0.5     2016-07-07 CRAN (R 3.5.0)
 promises     1.0.1   2018-04-13 CRAN (R 3.5.0)
 R6           2.2.2   2017-06-17 CRAN (R 3.5.0)
 Rcpp         0.12.19 2018-10-01 CRAN (R 3.5.1)
 rmarkdown    1.10    2018-06-11 CRAN (R 3.5.0)
 rprojroot    1.3-2   2018-01-03 CRAN (R 3.5.0)
 rstudioapi   0.7     2017-09-07 CRAN (R 3.5.0)
 servr        0.10    2018-05-30 CRAN (R 3.5.0)
 stats      * 3.5.1   2018-07-05 local         
 stringi      1.2.4   2018-07-20 CRAN (R 3.5.0)
 stringr      1.3.1   2018-05-10 CRAN (R 3.5.0)
 tools        3.5.1   2018-07-05 local         
 utils      * 3.5.1   2018-07-05 local         
 withr        2.1.2   2018-03-15 CRAN (R 3.5.0)
 xfun         0.3     2018-07-06 CRAN (R 3.5.0)
 yaml         2.2.0   2018-07-25 CRAN (R 3.5.0)

Thanks for looking into it. Tommy

gcushen commented 6 years ago

Newer versions of Hugo have breaking changes. Therefore, either you'll need to downgrade Hugo to the previous version you were using (perhaps 0.3x) or upgrade your site to use the latest version of Academic (which is compatible with Hugo 0.4x).

crazyhottommy commented 6 years ago

Thanks! how to upgrade the site without re-editing all the changes that I have made?

gcushen commented 6 years ago

The documentation is here https://sourcethemes.com/academic/docs/update/ and the release notes are here https://sourcethemes.com/academic/updates/v2.4.0/ . If you have any questions, please use the support forum http://discourse.gohugo.io/

jananiravi commented 6 years ago

hello @gcushen, I run hugo+blogdown+academic from RStudio (preview v1.2.616 and R v3.4.4) recently updated both hugo (v0.51) and hugo-academic (v3.1) and my webpage doesn't render similar to the issue above. Any suggestions of which Hugo version would work best with the latest academic theme?

Current set of error messages while rendering using build_site()

Building sites … ERROR 2018/11/09 18:03:56 render of "page" failed: "/Users/janani/Google_Drive/Work/GitHub/jananiravi-webpage/themes/academic/layouts/project/single.html:3:19": execute of template failed: template: project/single.html:6:5: executing "project/single.html" at <partial "page_header...>: error calling partial: "/Users/janani/Google_Drive/Work/GitHub/jananiravi-webpage/themes/academic/layouts/partials/page_header.html:3:19": execute of template failed: template: partials/page_header.html:3:19: executing "partials/page_header.html" at <$page.Params.image.f...>: can't evaluate field focal_point in type interface {}
ERROR 2018/11/09 18:03:56 render of "page" failed: "/Users/janani/Google_Drive/Work/GitHub/jananiravi-webpage/themes/academic/layouts/publication/single.html:3:19": execute of template failed: template: publication/single.html:5:5: executing "publication/single.html" at <partial "page_header...>: error calling partial: "/Users/janani/Google_Drive/Work/GitHub/jananiravi-webpage/themes/academic/layouts/partials/page_header.html:3:19": execute of template failed: template: partials/page_header.html:3:19: executing "partials/page_header.html" at <$page.Params.image.f...>: can't evaluate field focal_point in type interface {}
ERROR 2018/11/09 18:03:56 render of "page" failed: "/Users/janani/Google_Drive/Work/GitHub/jananiravi-webpage/themes/academic/layouts/publication/single.html:3:19": execute of template failed: template: publication/single.html:5:5: executing "publication/single.html" at <partial "page_header...>: error calling partial: "/Users/janani/Google_Drive/Work/GitHub/jananiravi-webpage/themes/academic/layouts/partials/page_header.html:3:19": execute of template failed: template: partials/page_header.html:3:19: executing "partials/page_header.html" at <$page.Params.image.f...>: can't evaluate field focal_point in type interface {}
ERROR 2018/11/09 18:03:56 render of "page" failed: "/Users/janani/Google_Drive/Work/GitHub/jananiravi-webpage/themes/academic/layouts/project/single.html:3:19": execute of template failed: template: project/single.html:6:5: executing "project/single.html" at <partial "page_header...>: error calling partial: "/Users/janani/Google_Drive/Work/GitHub/jananiravi-webpage/themes/academic/layouts/partials/page_header.html:3:19": execute of template failed: template: partials/page_header.html:3:19: executing "partials/page_header.html" at <$page.Params.image.f...>: can't evaluate field focal_point in type interface {}
Total in 802 ms

Error: Error building site: failed to render pages: render of "page" failed: "/Users/janani/Google_Drive/Work/GitHub/jananiravi-webpage/themes/academic/layouts/_default/single.html:3:19": execute of template failed: template: _default/single.html:6:5: executing "_default/single.html" at <partial "page_header...>: error calling partial: "/Users/janani/Google_Drive/Work/GitHub/jananiravi-webpage/themes/academic/layouts/partials/page_header.html:3:19": execute of template failed: template: partials/page_header.html:3:19: executing "partials/page_header.html" at <$page.Params.image.f...>: can't evaluate field focal_point in type interface {}

All the errors seem to be pointing to the single.html files. What change must I make in these files to get the site up and running again? Thank you for your help!

gcushen commented 6 years ago

@jananiravi when updating Academic, it's necessary to follow the Update guide (see docs) and apply updates consecutively from the version that you were on (rather than jumping to the latest version). For each update, the notes in the breaking changes sections should be followed. For example, the error you experience appears to be caused by the fact these steps haven't been applied: https://sourcethemes.com/academic/updates/v3.0.0/#breaking-changes

jananiravi commented 6 years ago

Thank you. I will try to make these modifications and check back. Appreciate your prompt response. For instance, is the weird rendering of this page due to the same jumping versions issue: https://rladies-eastlansing.github.io/post/20180924-lightning/ (the social media icons lined up to the bottom-right)? Thanks again!