Cannot add sidebar via Objects setting editor

Hello! I am an admin on the https://forum.image.sc discourse site. This is currently the error I am getting when I try to add a new entry to our Topic List Sidebars component:

Steps to Recreate

  1. Open Admin section
  2. Under Appearance, select Themes & components
  3. Under Components, click Edit next to Topic List Sidebars entry
  4. Click Objects setting editor
  5. Scroll to the bottom and click + sidebar and select the new topic
  6. Scroll back to the top and enter name, tag, and topic_id
  7. Scroll back to the bottom and click Save Changes
  8. Error message appears and sidebar fails to save

Alternatives tried (same failure)

  • Ensuring that the component is up-to-date
  • Adding a category
  • Adding multiple valid tags
  • Removing - from tag name

Workaround

Instead of using the Objects setting editor, if I use the Settings Editor button at the bottom of the Topic List Sidebars component edit page I am able to directly edit the JSON. I was able to successfully manually create an entry with the same data that’s being rejected by the GUI.

This suggests to me that there is an error in the save logic detecting the tags and wrapping it/them into an array.

Last Success

A sidebar was added to the site on Jan 5, at which point the GUI entry was functioning as expected.

Additional Notes

  • In the Edit sidebars setting page, the fact that the sidebars aren’t in a scrolling component means that, with a sufficiently long list of sidebars, the error message and data entry aren’t in view when clicking Save Changes. I actually didn’t even realize there was a problem at first.
  • This was compounded by the error message providing an index instead of the name, which made it unclear what was failing validation.

Thank you for the support!

2 Likes

Thanks for the thorough report, it made it much easier to track down. This required a fix in Discourse, you should receive this the next time your site is updated.

3 Likes