After updating Hugo to new version from the old one, I get this error while building the site
execute of template failed: template: partials/head.html:29:21: executing "partials/head.html" at <.Paginate>: error calling Paginate: pagination not supported for this page: kind: "page
The code in line 29 is {{- $paginator = .Paginate .RegularPages -}}
my pagination code which worked on far older Hugo version:
It may have done what you want, but it didn’t work; its failures were silent. You cannot invoke pagination when the page kind is page. You can only invoke pagination from home, section, taxonomy, and term templates.
Without looking at your site, I’m guessing that the params.images key in your site configuration is an array, and your can’t convert an array to a URL.
It worked earlier, now it fetches the value but error came up. Live website is running without problems on older version of hugo. Current one with errors of new hugo is not published.
Include a link to the source code repository of your project, because we really need the context of seeing your templates and partials to be able to help you. It is trivial to do a quick git clone on your repo, then run hugo server in your project, to help you out. On the other hand, recreating your code from screenshots, or sort of guessing at it, is not.
If you can’t share your repository for whatever reason, consider creating a dummy repo that you can share, which reproduces the problem you’re experiencing.
and see if the error goes away (pretty sure) and any pagination goes missing (pretty sure too).
I had the same issue a number of Hugo versions back and ended up finding, that there is no pagination available on single pages (true) which Hugo until that version just silently ignored in that last condition, but since that version complained loudly about.
Depending on the structure of your website (which you did not say anything about) anytime Hugo goes into the last three lines of the else an error is thrown. Don’t use else.
A pagination exists only on home and list pages, not on single pages…
From the looks of it you need another condition that checks for isNode and then creates the default pagination.
In v0.125.0 we fixed a bug where, unlike urls.AbsLangURL and urls.RelLangURL, the urls.AbsURL and urls.RelURL functions did not return an error when unable to cast the argument to a string. They checked for an error, but didn’t tell you about it.