Branding not working using Admin Interface

Hi @niraj

I can confirm that removing the contents of the branding.json file will produce an invalid branding doc on the server. This can cause problems in multiple places where we assume that the branding document should respect a specific structure.

I think that the action points that we can take is:

  1. update cht-conf to validate the contents of the branding.json file before uploading, and disallow malformed structures.
  2. add a command to remove existent branding, instead of incentivizing to empty branding.json contents to achieve this
  3. update admin app to inform the user that their branding document is malformed. There is an error thrown in the console, but no indication in the UI that this is the case.

Iโ€™m going to create issues to track these shortly.

For my curiosity, does any of our documentation indicate that you should empty the branding.json file contents to clear branding?

Thanks!

CHT-Conf issue: Add validation to `upload-branding` and `upload-partners` ยท Issue #528 ยท medic/cht-conf ยท GitHub
CHT-Core issues: Admin app fails to update `partners` if existing document is malformed ยท Issue #8027 ยท medic/cht-core ยท GitHub and Admin app fails to update `branding` if existing document is malformed ยท Issue #8026 ยท medic/cht-core ยท GitHub

2 Likes

thank you very much, @diana. I was trying to update branding using both admin interface and cht-conf so, I thought of empty the branding.json to remove the existing branding. I did not see the documentation for the emptying but just was assuming if emptying branding.json would empty the branding.

1 Like


could this be the same issue also?

Hi @Olayinka_Adeyemi

The error you are seeing is due to the fact that the user you are logged in with is not a database admin. You will need to log in with a database admin user in order to edit branding.

Thank you Diana. Please can i have a private conversation with you?