Need help with theme error

Hello, I am using the Nubia theme and I got this error. I recently updated the theme but not sure what I did wrong.

What do I need to do to fix this error – see below

If you guys don’t answer questions about custom themes, no problem – I can ask the developer I bought it from.

Ann Marie

Theme errors


Highly recommended to fix, functionality could be restricted

  • [

A custom theme setting defined in package.json hasn’t been used in any theme file.

](Ghost Admin)
Custom theme settings defined in package.json must be used at least once in the theme templates.

Affected files:
  • package.json: Found unused variables: @custom.advertise_widget_image, @custom.advertise_widget_link

Ghost switched recently to making those error messages more prominent. That looks like a nuisance error (who cares if the theme sets a variable and doesn’t use it?), and possibly a mis-reporting (some variable use doesn’t “count” for deciding if the custom setting has been used). I’d ignore it.

1 Like

Thank you so much – I appreciate it :blush:

That is a possible bug on gscan

Yup. From some experimentation, custom variables in filter settings don’t ‘count’ for gscan.

Thanks all for flagging this! It looks like the bug is being tracked here: Gscan does not detect custom setting usage inside a get helper · Issue #464 · TryGhost/gscan · GitHub

Here’s why I think flagging this error is important:

A theme developer adds a custom setting:

“Change post layout.”

  • Grid
  • List
  • Masonry

But they don’t actually implement the setting in the theme. For the user, then, they would be changing this setting but not seeing any change in the theme, which would be frustrating. This error warns the user that this setting won’t actually do anything. :upside_down_face: