stream
stream copied to clipboard
Item count above table cuts off commas when updated via JS
Bug Report
Expected Behavior
The item count should accurately reflect how many records are in Stream after it is updated with Javascript.
Actual Behavior
The item count is cut off at the first[^1] comma when it is updated with Javascript.
Steps to Reproduce the Problem
- Open the main Stream page (/wp-admin/admin.php?page=wp_stream) on a site with more than 999 items
- Look at the number next to the pagination buttons. (ex.: 21,403 items)
- Wait for something to happen elsewhere on the site that creates a record and updates the table.
- Look at the number again. It will be quite a bit smaller than it was in step 2.
Screenshots
I observed this on two different sites[^2]:
https://github.com/xwp/stream/assets/1672206/896c4b91-4113-4129-b56b-c6d8fbb190af
https://github.com/xwp/stream/assets/1672206/8d1b1c58-e855-4e52-843a-def8d24d5fa6
System Information
- Stream plugin version: 4.0.0
- WordPress version: 6.4.3
- PHP version: observed on both 7.4 and 8.x
- Browser: Firefox
- Computer operating system: MacOS
[^1]: I guess technically I don't know if it is the first or second comma since I don't have a site with 1,000,000 records handy. 🙃 [^2]: Both of these show exactly 165 pages, so I just double checked to verify that there is not also a problem with the "page X of Y" count. That number is working as expected on other sites, and these both being 165 is a ridiculous coincidence.