Attached patch gives users an idea why the tables they are looking at are empty. (Patch applies against comment, node, taxonomy, tracker.module).
This is an issue on http://urlgreyhot.com/wiki/pmwiki.php/Usability/Drupal4-4-1System
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | tracker-no-posts_1.patch | 896 bytes | webchick |
| #13 | tracker-no-posts_0.patch | 897 bytes | webchick |
| #2 | tracker-no-posts.patch | 903 bytes | webchick |
| usability-avoid-empty-tables.patch | 2.97 KB | Stefan Nagtegaal |
Comments
Comment #1
coreb commentedMoving from x.y.z queue to 6.x-dev.
Comment #2
webchickActually I just checked HEAD and all of these except tracker.module look to be already in core.
Here's a re-roll of tracker module.
This is more of a bug than a feature request, so moving to 5.x queue and re-filing as such.
Comment #3
webchickahem. :P
Comment #4
RobRoy commentedI noticed a lot of tables wrap em tags outside of the t() for empty table messages like
I kinda like the em better. You guys agree? If so we should re-roll so they are all consistent.
Comment #5
webchickWas this a reply to the wrong patch? There are no
<em>tags in this patch, nor are there any in any of the other "No X available" messages that I could see (watchdog, taxonomy, system, path....)Comment #6
RobRoy commentedThat code above is from user module. Maybe it was a lot of contrib using em, I just feel like I've seen inconsistencies. So maybe the majority don't as I could only find that one in HEAD. Well, let's scrap that one that does use em in user.module then if we're going the sans-em route. Just wanted to bring up the consistency issue. So if you feel that deserves its own issue, let me know and I'll open a patch for removing that em separately.
Comment #7
webchickYeah, let's do that maybe (separate issue). This one is just a quick no-brainer. I agree though that it should be consistent, whatever it is.
Comment #8
neclimdulThis seems like a good patch but wanted to bring #94019 to the attention of this thread. It suggests changing "post" to "content" which would apply to the string in this patch as well. Chicken and egg as to which patch goes in first but I wanted to bring it to the attention of this thread.
Comment #9
webchickThis patch is currently consistent with what's displayed at admin/content/node. If you plan to change the word "post" to "content" throughout Drupal, that should also probably be a separate issue.
Comment #10
neclimdulNevermind, I think this is the right fix. Applied, works and looks good. RTBC
Comment #11
dries commentedElsewhere in the code we write "if (!$rows)" rather than "if (!count($rows))". Maybe that could be used here as well? Would give you a bonus point for consistency. :)
Comment #12
neclimdul@Dries would work except we should either do it as it is or use !isset($rows) and not initialize $rows for E_ALL reasons. Maybe even empty($rows)... if ($rows) in this case could lead to an initialized variable warning as mentioned in our coding standards. In fact, empty might be cheaper since we aren't actually using the number of rows for anything.
Comment #13
webchickOh! Looks like
if (!$rows)does work, even if $rows was initialized first (as it should be :P). Well that's cool.Here's a re-roll.
Comment #14
webchickHow about one without a parse error this time? :D
Comment #15
neclimdulI'll be a monkey's uncle. Sorry Dries, didn't realize array() == false. Our E_ALL docs are misleading in this respect. Learn something new everyday.
Works fine in php4 and php5
Comment #16
dries commentedComment #17
(not verified) commented