Can't vote on missing images that have been flagged

ConversazioniBug Collectors

Iscriviti a LibraryThing per pubblicare un messaggio.

Can't vote on missing images that have been flagged

Questa conversazione è attualmente segnalata come "addormentata"—l'ultimo messaggio è più vecchio di 90 giorni. Puoi rianimarla postando una risposta.

1r.orrison
Set 25, 2012, 3:02 pm

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
Apr 30, 2014, 12:11 am

I don't see that. Any elaboration?

3r.orrison
Apr 30, 2014, 2:07 am

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

4timspalding
Mag 5, 2014, 11:13 pm

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
Mag 5, 2014, 11:13 pm

Okay, going to force it by deleting the image in the database.

6timspalding
Mag 5, 2014, 11:25 pm

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.

7r.orrison
Modificato: Mag 19, 2014, 5:50 am

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.

8.Monkey.
Mag 19, 2014, 4:33 am

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
Mag 19, 2014, 5:44 am

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.

10.Monkey.
Mag 19, 2014, 6:44 am

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
Ott 6, 2014, 7:40 am

Bump: There's a no-image link on the flagged gallery page right now:
https://www.librarything.com/gallery/flagged

12kristilabrie
Ott 21, 2014, 3:25 pm

Confirmed. There is still a no-image link on >11 r.orrison:'s link.

13timspalding
Dic 3, 2014, 2:25 pm

Given to Ammar. Ask Kristie for help understanding it.

14lt_ammar_test
Dic 11, 2014, 12:31 pm

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.

15LT_Ammar
Dic 11, 2014, 12:32 pm

woops, was signed into my test account.

16r.orrison
Dic 11, 2014, 6:20 pm

Thanks!

17timspalding
Dic 12, 2014, 1:24 pm

Solve it an easier way, as discussed.

18LT_Ammar
Dic 16, 2014, 1:48 pm

k, fixed it by giving min-height to anchor tag.

19timspalding
Dic 16, 2014, 8:44 pm

Thanks.