Extra Admin logs generated on category edit

AI-generated summary

In a report regarding a bug where editing a category logo triggered extraneous admin logs for unrelated settings (permissions, background URL, topic template), user jomaxro provided detailed reproduction steps and screenshots showing the issue affected multiple categories. Mittineague suggested checking for overflow logs and asked for specific differences, prompting jomaxro to export logs but find no common link. Developer tgxworld investigated and confirmed the issue was a bug in the logging implementation. They submitted a fix via PR #3912 tgxworld. jomaxro thanked the team and requested the thread be closed.

Recently I was adding category logos to a Discourse instance, and after completing the edits went in to review the logs. While reviewing I noticed that extraneous logs were being generated despite not modifying the settings in question. The only change I made was the category logo, so I am unsure why permission, background url, and topic template appear as well. Repro steps are as follows:

  1. Go to category page ($site_url/c/category_name)
  2. Click edit
  3. Click images tab
  4. Click image button for Category Logo Image
  5. Browse to and select png or jpg image
  6. Wait for upload
  7. Click Save Category
  8. Check logs

Were some outside of the scroll, overflow?
If not, can you determine what it is that might have caused the difference?

catId	perms	logoU	logoT	bkgdU
24	+	+	+	+
25	+	+	
26 		+
27	+	+

Yes, many were outside of my screenshot, I updated almost every category. Give me a few minutes to export the logs and look at the different logs per category.

Will update…

Can’t seem to find a common link there…

1 curtida

I implemented logging of categories setting sometime back so I’ll take a look soon :smile:

4 curtidas

Thanks for reporting @jomaxro :smile: This was indeed a bug and I just submitted a PR to fix!

https://github.com/discourse/discourse/pull/3912/files

6 curtidas

Great, thank you! Feel free to close up this thread.

1 curtida