How do I debug why a viewlet is not being hidden even after adding it to viewlets.xml?

  1. Yes, in the correct manager. No, it doesn't appear in more than one manager.
  2. I don't like this approach when there's already the hidden machinery in place, and our Diazo rules are in a second package.

But somehow your post gave my an idea: the viewlet is in https://github.com/collective/collective.nitf/blob/a0b6ebf7fcda2cbcf60b4d4a48a42d53e4165c30/src/collective/nitf/browser/configure.zcml#L126, but there isn't a viewlets.xml in the package profile (https://github.com/collective/collective.nitf/tree/0808e73168a17fceb717acc925d02278c4fda76e/src/collective/nitf/profiles/default), only the zcml directive. How can I hide it using only zcml, create a new class and override it making render method return ''?

So, it seems that you can only try to use hidden for a viewlet in viewlets.xml if it was prior registered in another viewlets.xml. Can anyone confirm this? Indeed this is what makes sense, I was only dreaming that if the xml did nothing a warning would have been nice.