3386: Comments on PNG images don't show the image.
- SetupIssue
- Review Board
pval****@gmai***** (Google Code) (Is this you? Claim this profile.) | |
July 11, 2014 |
What version are you running? 2.0.1 What's the URL of the page containing the problem? /r/323/ What steps will reproduce the problem? 1. Create a review with a PNG screenshot attached 2. Click on the "review" tag for that PNG 3. Select an area and type a comment 4. Submit your review 5. look at the reviews What is the expected output? What do you see instead? I guess that I should see the selected portion of the image in the review, but I just see an empty box that has the same size as my selected area with the ALT message. The HTML shows that: <img class="modified-image" src="" width="880" height="207" alt="Don't you want to hide them if they are skipped?"> See the empty src? I've put the screenshot in attachment. By the way, is it not supposed to show the image thumbnail in the top area of my screenshot? This HTML area looks weird as well: <a href="/r/323/file/4/" class="file-thumbnail-overlay" alt="Click to review" title="Click to review"> </a> <img src="" data-at2x="" class="file-thumbnail" alt="Screen Shot 2014-05-27 at 20.28.55.png"> What operating system are you using? What browser? Ubuntu 14.04 with Chrome 35.0.1916.114 Please provide any additional information below.
Argh, forgot the attachment.
-
+
It's possible there was a problem writing the thumbnail. Can you check and verify that $sitedir/htdocs/media/files/, and all directories and files within it, are writable by the web server?
-
+ NeedInfo
The server logs were showing no error. My media directory was looking like that: # ls -la htdocs/media total 20 drwxr-xr-x 4 root root 4096 Feb 5 11:21 . drwxr-xr-x 4 root root 4096 May 27 08:52 .. -rw-r--r-- 1 root root 522 May 27 08:52 .htaccess drwxr-xr-x 2 www-data root 4096 Feb 5 11:21 ext drwxr-xr-x 4 www-data root 4096 Feb 6 16:00 uploaded Can it be a migration issue (I upgraded from 1.7)? I do have a weird error messages in apache's logs: Traceback (most recent call last): File "/usr/lib/python2.7/logging/__init__.py", line 851, in emit msg = self.format(record) File "/usr/lib/python2.7/logging/__init__.py", line 724, in format return fmt.format(record) File "/usr/lib/python2.7/logging/__init__.py", line 467, in format s = self._fmt % record.__dict__ KeyError: u'request_info' Logged from file djblets_images.py, line 125 Which is the place where it tries to log an error when building the thumbnail. I guess the logging is having setup problems... I'll continue investigating how to fix that.
Sorry, I meant htdocs/media/uploaded/files/. That error message may be the cause. However, the change that would have caused that has been around for some time. I wouldn't expect it. Just to be sure, is there only one consumer of mod_wsgi on your server, and was Apache restarted since upgrading to 2.0?
OK, adding code to djblets_images.py to get the actual exception, I found that error: decoder zip not available Looking on the web, I removed PIL and installed some -dev packages, easy_install pillow and the stuff works, now. There is really a problem when Djblets or some other package tries to log (KeyError: u'request_info'), though. I would have had no problem debugging this setup problem if I had proper logs.
Yes, I've fixed my setup and there is only one consumer of mod_wsgi (I've put in place a redirect for the other hostname) and my apache/cached were restarted.
By the way, during my tests I was adding and image, deleting it, adding, deleting... Looks like when the image is deleted, the matching file is not deleted from the filesystem in htdocs/media/uploaded/files/2014/05/28/. I can see all the ones I've deleted.