Disable annotations completely for a page?

Hello there!

I wanted to disable likes, annotations and comments for the system XWiki pages as I think this feature is not needed to them.

I found out that you can still annotate there by using the keyboard shortcut Ctrl+M. Users still need the permission to comment in the first place (you cannot annotate due to a server error otherwise), but this right is ALLOW by default for users. This seems like a bug that can be used to circumvent this disabled feature.

Hello

Depends what’s your desire expectation to visually disable such elements from XWiki UI, if so you can use official guides.

  • For likes, see this Administer the Like Preferences. Note this You can disable it by unchecking the “Always Display Like Button” checkbox, so only users with Like right will see it.

  • For comments since it’s part of page tabs, see Controlling Page Tabs

  • For annotations, you’re already found the section

Otherwise, if you want to completely remove such UI components, than it’s different thing.

Such shortcut command be removed Removing keyboard shortcuts. Also worth to check this old threads here, ex this solution from user.

Note sure, I understand your issue. So far, I don’t have such problems on personal XWiki 17.10.0.

The issue is that you can still use annotations after you disabled them through the keyboard shortcut. This seems to be a bug.

@nikpetrenko Can you reproduce this steps?

  1. Disable annotations on a page / globally
  2. Use keyboard shortcut Ctrl+M

It would be expected that you cannot annotate. But you can.

Hi!

With a page reload and cache clear, I could not reproduce it on my end. Pressing Ctrl+M only mutes the page once the annotation setting is off ^^’

My guess is that the cache needs to be cleared (on Firefox, reload without cache with Ctrl+Shift+R). We could report it as a bug but it’s probably been already reported as a more generic bug with all the admin settings.

Thanks for the report!
Lucas C.

You’re right, reloading without cache fixes it. Does that mean there is no server-side validation? When the annotation feature is cached, I can annotate successfully.

Can you point me to the ticket?

AFAIK this feature is handled in some javascript that’s only ran client-side. The script queries info from the server but can rely on cache to improve load times :slight_smile: