Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-16721

Wrong order display of inline attachments in "topic review" when using multiple uploads

    XMLWordPrintable

Details

    • Bug
    • Status: Awaiting Information (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 3.3.2, 3.3.3
    • None
    • None
    • PHP 7.1.33

    Description

      The bug occurs in "topic review" : the order of displayed attachments doesn't correspond anymore to that of the original post.

      For example : Someone uploads multiple files at the same time when writing a post and chooses to display them like this in their post :

      • 1 : File A
      • 2: File B
      • 3: File C

      Everything is ok is viewtopic.

      BUT, when you reply to this post and look at the display of inline attachments in the "topic review", then the files are displayed in a different order. They can be displayed like this for example :

      • 1 : File C
      • 2 : File B
      • 3 : File A

       

      It occurs only when using multiple uploads. If you upload files one by one, it doesn't seem to create this bug.

      Someone (one of my forum members) advised me to check the filetime of the uploaded files, and I realised that multiple uploads result in giving the same "filetime" to all the files that are uploaded at the same time.

      This person suggested that the problem was linked to this code in "includes/functions_posting.php" (around the line 1077) :

       

      ORDER BY filetime DESC, post_msg_id ASC';
      

      As several files have the same filetime when you use multiple uploads, then it creates the random display in topic review.

      This person suggested that it should be replaced with :

       

      ORDER BY attach_id DESC, post_msg_id ASC';
      

       

      This seems to work because someone tested it successfully on a test forum.

      I mentioned that it affected phpBB 3.3.3 and 3.3.2 but maybe it affects more previous versions too, because it's a bug that I've been encountering for a long time on my forum (but I don't remember when exactly)

       

      Could you please check if this is a common bug in phpBB and confirm if the fix is ok? If yes, could it be included in further versions/updates of phpBB ?

       

      Thank you.

       

      PS : sorry if my English isn't perfect, it's not my native language.

      Attachments

        Activity

          People

            Unassigned Unassigned
            didou116 didou116 [X] (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: