Imported Attachements not showing in IE

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • katoona
    Member
    • Mar 2008
    • 46
    • 4.0.0

    [Forum] Imported Attachements not showing in IE

    I have just imported from SMF 1.9 --> VB 4.1.12 and a lot of attachments are just showing as a red cross in IE 8 and IE 9. I have checked cookie settings and attachment settings (both jpg and jpeg are set to "Content-type: image/jpeg").

    I have transferred the attachments to file storage, and they are showing perfectly in every other browser.

    Should I start a ticket, or do anybody have any good ideas?
  • Trevor Hannant
    vBulletin Support
    • Aug 2002
    • 24325
    • 5.7.X

    #2
    I'm assuming they're showing OK in FF and Chrome etc? Can you give us a link to a thread that has these in so we can take a look?
    Vote for:

    - Admin Settable Paid Subscription Reminder Timeframe (vB6)
    - Add Admin ability to auto-subscribe users to specific channel(s) (vB6)

    Comment

    • katoona
      Member
      • Mar 2008
      • 46
      • 4.0.0

      #3
      Is there somewhere I can send the link - I'd rather not post it here. It is a beta site, and I don't want to reveal the link.
      Last edited by katoona; Tue 1 May '12, 5:03am. Reason: removed the link

      Comment

      • Matthew Gordon
        Senior Member
        • May 2002
        • 3243
        • 1.1.x

        #4
        You can edit it into your post and then edit it back out. Moderators will be able to view the edit history of the post to see the link.

        Comment

        • katoona
          Member
          • Mar 2008
          • 46
          • 4.0.0

          #5
          ok, i edited my last post - can you see it?

          Comment

          • katoona
            Member
            • Mar 2008
            • 46
            • 4.0.0

            #6
            I noticed that you looked at our site - do you see anything wrong? If you want admin rights or anything else, please let me know.

            Comment

            • Matthew Gordon
              Senior Member
              • May 2002
              • 3243
              • 1.1.x

              #7
              If you want to give me admin access I can look at it a little more closely.

              Comment

              • katoona
                Member
                • Mar 2008
                • 46
                • 4.0.0

                #8
                I have sent you a Pm on our forum with admin details.

                Comment

                • Matthew Gordon
                  Senior Member
                  • May 2002
                  • 3243
                  • 1.1.x

                  #9
                  That was a tough one to figure out, but it looks like I solved it. The extension in the filedata table somehow was in all caps ("JPG"), while vBulletin assumes it is all lowercase ("jpg"). Running this query solved it:

                  Code:
                  UPDATE filedata SET extension = LOWER(extension)

                  Comment

                  • katoona
                    Member
                    • Mar 2008
                    • 46
                    • 4.0.0

                    #10
                    Check this thread:

                    The first picture is still not showing.

                    A lot of other pictures are showing, so what you did helped, but we are not 100% finished.

                    But thank you so much for taking the time to help me.
                    Last edited by katoona; Tue 1 May '12, 7:38am. Reason: Removed link

                    Comment

                    • Matthew Gordon
                      Senior Member
                      • May 2002
                      • 3243
                      • 1.1.x

                      #11
                      Looks like the extensions are messed up even worse than just casing issues. I'm going to write a script to hopefully fix them.

                      Mind giving me FTP access? Would make it a lot easier for me.
                      Last edited by Matthew Gordon; Tue 1 May '12, 7:58am.

                      Comment

                      • katoona
                        Member
                        • Mar 2008
                        • 46
                        • 4.0.0

                        #12
                        The details for FTP is sent via PM on my forum.

                        Comment

                        • Michael König
                          Senior Member
                          • May 2001
                          • 461
                          • 3.6.x

                          #13
                          In most cases this query should be enough to fix it:

                          UPDATE filedata AS filedata
                          LEFT JOIN attachment AS attachment ON (attachment.filedataid = filedata.filedataid)
                          SET extension = LCASE(RIGHT(attachment.filename, LENGTH(attachment.filename) - LOCATE('.', attachment.filename, LENGTH(attachment.filename) - 4)));

                          But you of course should create a database backup before executing this query.

                          Comment

                          • Matthew Gordon
                            Senior Member
                            • May 2002
                            • 3243
                            • 1.1.x

                            #14
                            Alright, I think it should be fixed now.

                            If anyone has this in the future, I'm attaching the script I wrote to this post. Upload it to your forums directory, run it in your browser, and then delete it afterward.
                            Attached Files

                            Comment

                            • Matthew Gordon
                              Senior Member
                              • May 2002
                              • 3243
                              • 1.1.x

                              #15
                              Originally posted by Michael König
                              In most cases this query should be enough to fix it:

                              UPDATE filedata AS filedata
                              LEFT JOIN attachment AS attachment ON (attachment.filedataid = filedata.filedataid)
                              SET extension = LCASE(RIGHT(attachment.filename, LENGTH(attachment.filename) - LOCATE('.', attachment.filename, LENGTH(attachment.filename) - 4)));

                              But you of course should create a database backup before executing this query.
                              Nice.

                              Comment

                              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                              Working...