Can't vote on missing images that have been flagged
ConversazioniBug Collectors
Iscriviti a LibraryThing per pubblicare un messaggio.
Questa conversazione è attualmente segnalata come "addormentata"—l'ultimo messaggio è più vecchio di 90 giorni. Puoi rianimarla postando una risposta.
1r.orrison
In the "Flagged gallery" if a non-image gets flagged, presumably for not being an image, it's impossible to vote on it. See: http://www.librarything.com/gallery/flagged
2timspalding
I don't see that. Any elaboration?
3r.orrison
The problem only arises when there's something on the list that doesn't have an image. In that case, there's nothing to click on, so you can't vote on it. From memory the HTML looks like <a href="/pic/4367172"><a> without an img tag inside it.
I don't know how such images got into the system, and couldn't duplicate it with a bit of testing; I keep getting appropriate error messages about no image or unable to process the image.
It might be worth looking at the code that generates that list, and sticking a bit of text inside the link if there if no img tag is generated.
Of not, if it's never going to happen again...
There was a talk thread where a couple users would get the link from the Flagged Gallery HTML and post the direct links to the image pages, so that the images could be voted on: https://www.librarything.com/topic/146125
I don't know how such images got into the system, and couldn't duplicate it with a bit of testing; I keep getting appropriate error messages about no image or unable to process the image.
It might be worth looking at the code that generates that list, and sticking a bit of text inside the link if there if no img tag is generated.
Of not, if it's never going to happen again...
There was a talk thread where a couple users would get the link from the Flagged Gallery HTML and post the direct links to the image pages, so that the images could be voted on: https://www.librarything.com/topic/146125
4timspalding
Hmmm. I need a current example of this. The "simple" way of doing this didn't work--it doesn't accept images that aren't images. I could see it happen if somehow it could parse an image in one way, but not in another. And I could see it if the database removed an image without removing the links to it. But I'm at something of a loss.
5timspalding
Okay, going to force it by deleting the image in the database.
6timspalding
Okay, I can't even force it—fake numbers, dead numbers, inconsistent deletion, etc.
I'm closing. If someone can show it to me happening, we can reopen.
I'm closing. If someone can show it to me happening, we can reopen.
7r.orrison
Ok, here's a new case, which will lead to this bug. Right now on the recent gallery https://www.librarything.com/gallery/recent/authors there's a blank image, that's going to be difficult to flag. You can also get to it from the author page: https://www.librarything.com/gallery/author/queenkhadijah. If someone rummages through the HTML to flag it, you'll have a blank image on the voting page per this bug. (I've fished out the image page from the HTML: https://www.librarything.com/pic/4390377 but please leave it for Tim to investigate.)
Minor nit: it's not actually a non-image, it's a 1x1 clear gif that was grabbed from the author's website, presumably to prevent people from grabbing the real image. It might be possible to click on the image itself if you can find it, but it looks like in many cases it appears under the snag gadget.
Edited for clarity.
Minor nit: it's not actually a non-image, it's a 1x1 clear gif that was grabbed from the author's website, presumably to prevent people from grabbing the real image. It might be possible to click on the image itself if you can find it, but it looks like in many cases it appears under the snag gadget.
Edited for clarity.
8.Monkey.
Can't you just click "flag this image" on the sidebar of https://www.librarything.com/pic/4390377 ? Does the problem come once it's already been flagged, or...?
9r.orrison
How did you get to that page? You can't click on the image in either the author gallery or the recent authors page. (I got the link by rummaging in the HTML, but not everyone can do that.)
If you do get to the picture page, and flag it, it will show up on the flagged gallery, but others will then have the same problem getting to the picture page to vote on it.
This particular problem is slightly different from my original report, in that there have been cases where there was no image at all. But I think this is sufficiently similar that a fix could handle both. Basically there needs to be some text to click on to get to the image page in cases where there isn't enough image to click on.
If you do get to the picture page, and flag it, it will show up on the flagged gallery, but others will then have the same problem getting to the picture page to vote on it.
This particular problem is slightly different from my original report, in that there have been cases where there was no image at all. But I think this is sufficiently similar that a fix could handle both. Basically there needs to be some text to click on to get to the image page in cases where there isn't enough image to click on.
10.Monkey.
You linked it in >7 r.orrison: so I assumed there was a way to get to it w/o much trouble. If that's not the case, then yeah, that's an issue. Even if many of us (especially the folks who do most of the voting on stuff) have the know-how, I can't say I'd want to bother going through that hassle to locate it.
11r.orrison
Bump: There's a no-image link on the flagged gallery page right now:
https://www.librarything.com/gallery/flagged
https://www.librarything.com/gallery/flagged
12kristilabrie
Confirmed. There is still a no-image link on >11 r.orrison:'s link.
13timspalding
Given to Ammar. Ask Kristie for help understanding it.
14lt_ammar_test
Fixed.
Finding where/why this problem was occurring was simple.
The hard part was designing a solution that was the least coupled to other aspects of gallery.
I didnt want my solution to break anything else.
For now, I simply calculate how much of a height gap there is between the image and the cell and
proceed to expand the 'clickable' area. So, even if the image is '1px' the remaining area is filled with
the anchor regardless.
Tim, we should decide on a more robust solution for the long run. Perhaps defaulting the anchor size to the td(table-cell)
or checking back-end for ridiculously small or even no images.
Finding where/why this problem was occurring was simple.
The hard part was designing a solution that was the least coupled to other aspects of gallery.
I didnt want my solution to break anything else.
For now, I simply calculate how much of a height gap there is between the image and the cell and
proceed to expand the 'clickable' area. So, even if the image is '1px' the remaining area is filled with
the anchor regardless.
Tim, we should decide on a more robust solution for the long run. Perhaps defaulting the anchor size to the td(table-cell)
or checking back-end for ridiculously small or even no images.
17timspalding
Solve it an easier way, as discussed.