Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confusing warning 'calling IsSet with unsupported type "invalid" (<nil>)' #1464

Closed
deining opened this issue Mar 8, 2023 · 1 comment · Fixed by #1465
Closed

Confusing warning 'calling IsSet with unsupported type "invalid" (<nil>)' #1464

deining opened this issue Mar 8, 2023 · 1 comment · Fixed by #1465

Comments

@deining
Copy link
Collaborator

deining commented Mar 8, 2023

How to reproduce:

Remove these lines from userguide/hugo.yaml:

ui:
sidebar_menu_compact: true
sidebar_menu_foldable: false
sidebar_cache_limit: 10
breadcrumb_disable: false
sidebar_search_disable: false
feedback:
enable: true
'yes': >-
Glad to hear it! Please <a
href="https://github.com/google/docsy/issues/new">tell us how we can
improve</a>.
'no': >-
Sorry to hear that. Please <a
href="https://github.com/google/docsy/issues/new">tell us how we can
improve</a>.
readingtime:
enable: false

Start preview of the user guide:

hugo server --themesDir ../..

With configuration parameter params.ui not being present in hugo.yaml any more, a warning message is now emitted:

$ hugo server --themesDir ../..
Start building sites …
hugo v0.111.2-4164f8fef9d71f50ef3962897e319ab6219a1dad+extended windows/amd64 BuildDate=2023-03-05T12:32:20Z VendorInfo=gohugoio
WARNING: calling IsSet with unsupported type "invalid" (<nil>) will always return false.

As pointed out in #607 already, such a warning is too noisy and should be avoided.

@deining
Copy link
Collaborator Author

deining commented Mar 8, 2023

Just realized that this warning is printed out in other contexts as well (e.g. when working with taxonomies). The root cause is the wrong use of function isset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant