Dashboard New Posts statistics broken

Hi all,

since one of the last upgrades one or two weeks ago the new posts statistics on the dashboard is broken here. It does not show anything anymore. Is this a problem just for me or a common bug? I did not find anything through search here.

Regards

Sorry, can you clarify, are you saying these graphs are not working?

When did you update your instance last, can you update it now?

Sorry for being unclear, here is a screenshot:

I updated this evening to 05685d430f.

If I recall right, it is for about one of two weeks now, I upgrade every five days per so at the moment.

And yeah, not much traffic at the moment, but we have new posts. :wink: I also clicked and chose the year since today. Nothing there either.

The first thing that springs to mind is “not enough data”, but let me mention this to the staff xp team who can help debug.

1 Like

Thank you! Another screenshot, where you can see that there are new topics. So there must be new posts, too. At least as many as topics (but for sure it’s more than that here :wink:).

If you go to the full report page at https://YOURSITE.COM/admin/reports/posts?end_date=2025-02-17&start_date=2025-01-17 can you get it to show you any data, adjusting the dates/filters? Do you see any errors in the logs at https://YOURSITE.COM/logs or in the Chrome DevTools Network tab when loading this page or the dashboard?

1 Like

No, everything is empty there, too. I can also adjust start and end dates, not change.

The screenshot is of a data import interface with a message indicating that no data has been imported in the current session and buttons for incremental, daily, and monthly import options, along with import dates and category selection. (Captioned by AI)

No, none. Just some deprecation notices, not related to the stats (according to the time).

Indeed, there are errors. When I load the page, it’s 9, getting more after time.

The image displays a console log with various error messages related to scripting and fetching issues in the Chrome DevTools, such as "Uncaught TypeError", "Cannot find page" errors, as well as an example of a script being executed and some managed resources and restrictions. (Captioned by AI)

Does this help? Shall I copy-paste (text) one/all of these errors?

2 Likes

Indeed, I have encountered this situation as well.My community also fails to display the correct post count.

Not correct or nothing at all like here?

1 Like

Did a little research, it seems like the domQueryService errors are from the Bitwarden Chrome extension, they are unlikely to cause issues. The mini-profiler errors can be ignored.

The fingerprint-report error is from GitHub - discourse/discourse-fingerprint: A plugin that computes user fingerprints to help administrators combat internet trolls., and while it is an issue that we need to fix it doesn’t seem to prevent the Posts report from loading for me locally.

That body_tag_1.js file other people seem to have issues with sometimes on Discourse Lost ability to scroll through HA community site - community-feedback - Home Assistant Community . Do you have any Adblockers? If so try disabling them. If not or that doesn’t work, try enabling Safe Mode Using Safe Mode to troubleshoot issues with themes and plugins and seeing if you can load the page, if you can that would indicate a plugin or theme issue.

Finally, try loading the JSON for the report and see if you get any results here:

https://YOURSITE.COM/admin/reports/bulk.json?reports[posts][facets][]=prev_period&reports[posts][start_date]=2025-01-18&reports[posts][end_date]=2025-02-18&reports[posts][limit]=50

4 Likes

I have, what’s already in Opera, which is the browser I am using on the computer. I also use Pi-hole with several blocklists.

But: These problems also occur on my iPad in the Discourse app and in other networks, including mobile data. So no ad blockers or anything like that.

I can, but not today anymore. :wink:

Sure:

{"reports":[{"type":"posts","title":"Beiträge","xaxis":"Tag","yaxis":"Anzahl neuer Beiträge","description":"Neue Beiträge, die in dieser Zeit erstellt wurden","description_link":null,"data":[],"start_date":"2025-01-18T00:00:00Z","end_date":"2025-02-18T23:59:59Z","prev_data":null,"prev_start_date":"2024-12-17T00:00:00Z","prev_end_date":"2025-01-18T00:00:00Z","prev30Days":null,"dates_filtering":true,"report_key":"reports:posts:20250118:20250218:[:prev_period]:50:4","primary_color":"rgba(113,184,254,1)","secondary_color":"rgba(113,184,254,0.1)","available_filters":[{"id":"category","type":"category","default":null}],"labels":[{"type":"date","property":"x","title":"Tag"},{"type":"number","property":"y","title":"Anzahl"}],"average":false,"percent":false,"higher_is_better":true,"modes":["chart","table"],"prev_period":0,"limit":50}]}

As this does not show anything, if I read this right, does the safe mode make sense?

1 Like

Okay thank you, that is helpful and it indicates that the data itself is missing, and not that there is some error on the frontend :thinking:

The SQL query that backs this report is fairly simple, if you have access to Data Explorer or directly to your DB you can try running and tweaking this and see if it will give you any data:

SELECT 
  COUNT(*) AS "count_all", 
  date(posts.created_at) AS "date_posts_created_at" 
FROM 
  "posts" 
  INNER JOIN "topics" ON "topics"."deleted_at" IS NULL 
  AND "topics"."id" = "posts"."topic_id" 
WHERE 
  "posts"."deleted_at" IS NULL 
  AND (
    topics.archetype <> 'private_message'
  ) 
  AND (
    posts.created_at >= '2025-02-01' 
    AND posts.created_at <= '2025-02-28'
  ) 
  AND "posts"."post_type" = 1 
GROUP BY 
  date(posts.created_at) 
ORDER BY 
  date(posts.created_at)

And here is the report code itself:

I’m afraid it’s kind of tricky to debug this further without having access to your site so I can dig around the database.

1 Like

The query in Data Explorer comes back with data: