# Messages with Images/Files prior to the update lost the text/comments

**URL:** <https://forums.rocket.chat/t/messages-with-images-files-prior-to-the-update-lost-the-text-comments/22851>\
**Category:** Upgrade Help\
**Created:** [May 11, 2026, 8:23am UTC](https://forums.rocket.chat/t/messages-with-images-files-prior-to-the-update-lost-the-text-comments/22851 "2026-05-11T08:23:28Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![wowa86](https://avatars.discourse-cdn.com/v4/letter/w/ba8739/32.png) [@wowa86](https://forums.rocket.chat/u/wowa86)\
**Post date:** [May 11, 2026, 8:23am UTC](https://forums.rocket.chat/t/messages-with-images-files-prior-to-the-update-lost-the-text-comments/22851/1 "2026-05-11T08:23:28Z")

</div>

## What version are you coming from?

Rocket.Chat 7.11.4

Bitnami MongoDB 5.0

## What version are you going to?

Rocket.Chat 8.4.1

MongoDB 8.2.7 wiredTiger

## What deployment method did you use to deploy?

Docker compose

## Did you follow a particular doc? Which one?

> **[Deploy with Docker and Docker Compose](https://docs.rocket.chat/docs/deploy-with-docker-docker-compose#update-rocketchat-on-docker)**
>
> Set up Rocket Chat using Docker and Docker Compose. Ensure secure communication, operational resilience, and scalable collaboration on self-hosted servers.

Mongodb:

> [@\[ACTION REQUIRED\] Docker Compose Moving from Bitnami to Official MongoDB Image](https://forums.rocket.chat/t/action-required-docker-compose-moving-from-bitnami-to-official-mongodb-image/22693):
>
> Upgrading Rocket.Chat Docker Compose to MongoDB 8.2 This guide explains how to migrate from the current Bitnami MongoDB 6.0 deployment to the official MongoDB 8.2 image. Background & Why This Upgrade Is Necessary Over the past several years, Bitnami has been the go-to provider for MongoDB images in our Docker Compose deployments. However, significant changes in the community have necessitated a shift in strategy: Recent Events: Bitnami Acquisition Impact: Bitnami was acquired by VMware (whi…

## What issues are you running into upgrading?

After the upgrade messages with attachments, like images, lost the comment/text to the file.

The text of older comments are used for the images alt attribute instead of a seperate textelement.

Newly added messages with images and comment/text are displayed normaly.

Tested on Rocket.Chat Electron and multiple browsers with disabled caching.

---

<div class="post-metadata">

**Author:** ![reetp](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/reetp/32/5546_2.png) [@reetp](https://forums.rocket.chat/u/reetp)\
**Post date:** [May 11, 2026, 8:55am UTC](https://forums.rocket.chat/t/messages-with-images-files-prior-to-the-update-lost-the-text-comments/22851/2 "2026-05-11T08:55:05Z")

</div>

Restore your backup. You can’t do these huge version jumps and expect it to work.

Before starting again I’d make sure you have stopped using GridFS and all your files/images are in local storage.

You need to migrate mongo one version at a time. 5 → 6 → 7-\> 8

Check each works.

(You should have been on Mongo 7.x a long time ago)

Check the Mongo “featurecompatibility” setting mentioned multiple times.

Then finally upgrade Rocket, and personally, as per their docs, I’d do it a version at a time eg 7.11.x → 7.12.x etc as their upgrade Q&A is pants.

---

<div class="post-metadata">

**Author:** ![wowa86](https://avatars.discourse-cdn.com/v4/letter/w/ba8739/32.png) [@wowa86](https://forums.rocket.chat/u/wowa86)\
**Post date:** [May 11, 2026, 10:14am UTC](https://forums.rocket.chat/t/messages-with-images-files-prior-to-the-update-lost-the-text-comments/22851/3 "2026-05-11T10:14:40Z")

</div>

Unfortunately, I cannot restore the backup without losing six hours’ worth of messages. The issue unfortunately went unnoticed during testing, and everything else works flawlessly.

The MongoDB upgrade was performed using dump/restore, which completed successfully. Therefore, it should hopfully not be related to this process.

Regrettably, I trusted the guideline stating that only major releases must not be skipped. Is there a way to run the migration scripts for the minor versions afterward? Alternatively, would it be advisable or even possible, without restoring a backup, to downgrade to version 7.11.4 and then sequentially upgrade through each minor version?

Btw. Thanks for the GridFS hint. Will rocket.chat automatically migrate the files to the filesystem or do i have to use a script like this one (last update a year ago - [GitHub - arminfelder/gridfsmigrate: RocketChat GridFS to filesytem migration script · GitHub](https://github.com/arminfelder/gridfsmigrate))?

---

<div class="post-metadata">

**Author:** ![reetp](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/reetp/32/5546_2.png) [@reetp](https://forums.rocket.chat/u/reetp)\
**Post date:** [May 11, 2026, 11:18am UTC](https://forums.rocket.chat/t/messages-with-images-files-prior-to-the-update-lost-the-text-comments/22851/4 "2026-05-11T11:18:53Z")

</div>

> [@wowa86](#):
>
> Unfortunately, I cannot restore the backup without losing six hours’ worth of messages. The issue unfortunately went unnoticed during testing, and everything else works flawlessly.

Oh ☹

> [@wowa86](#):
>
> The MongoDB upgrade was performed using dump/restore, which completed successfully. Therefore, it should hopfully not be related to this process.

Most likely it is to do with Mongo somewhere - that’s where all your info is stored…

> [@wowa86](#):
>
> Regrettably, I trusted the guideline stating that only major releases must not be skipped.

I think you missed this… (I wrote quite a bit of it years ago)

> **Avoid skipping versions**

> **[Guidelines for Updating Rocket.Chat Safely](https://docs.rocket.chat/docs/guidelines-for-updating-rocketchat)**
>
> Follow best practices for updating Rocket.Chat. Learn safe upgrade steps, minimise downtime, and keep your deployment secure with the latest features.

> [@wowa86](#):
>
> Is there a way to run the migration scripts for the minor versions afterward?

Not as far as I know - they should run each update but the Q&A is pants and I would not trust them to all run correctly over such huge changes., as per the above migration strategy.

> [@wowa86](#):
>
> Alternatively, would it be advisable or even possible, without restoring a backup, to downgrade to version 7.11.4 and then sequentially upgrade through each minor version?

Absolutely not. You will likely compound your problems - you can’t **safely** downgrade at all due to the way Rocket modifies the DB.

As I said originally, restore from backup and incremental upgrades and full testing is the correct way to avoid issues.

> [@wowa86](#):
>
> Thanks for the GridFS hint.

It’s been standard practice for as long as I have used Rocket - about v0.16 IIRC…

> [@wowa86](#):
>
> Will rocket.chat automatically migrate the files

No.

> [@wowa86](#):
>
> do i have to use a script like this one

Yes.

---

<div class="post-metadata">

**Author:** ![wowa86](https://avatars.discourse-cdn.com/v4/letter/w/ba8739/32.png) [@wowa86](https://forums.rocket.chat/u/wowa86)\
**Post date:** [May 11, 2026, 12:27pm UTC](https://forums.rocket.chat/t/messages-with-images-files-prior-to-the-update-lost-the-text-comments/22851/5 "2026-05-11T12:27:01Z")

</div>

> **Avoid skipping versions**

Sorry, I missed this part. I just looked at the example, which only lists the major versions.

Since this appears to be the only issue, I will attempt to fix it directly in MongoDB and hope that no further errors arise. Going forward, I will always upgrade through each version sequentially.

Thank you very much for your quick support.

---

<div class="post-metadata">

**Author:** ![reetp](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/reetp/32/5546_2.png) [@reetp](https://forums.rocket.chat/u/reetp)\
**Post date:** [May 11, 2026, 1:09pm UTC](https://forums.rocket.chat/t/messages-with-images-files-prior-to-the-update-lost-the-text-comments/22851/6 "2026-05-11T13:09:06Z")

</div>

NP.

Might not be all you want to hear… But don’t shoot the messenger - I don’t work here!!

---

<div class="post-metadata">

**Author:** ![wowa86](https://avatars.discourse-cdn.com/v4/letter/w/ba8739/32.png) [@wowa86](https://forums.rocket.chat/u/wowa86)\
**Post date:** [May 11, 2026, 6:47pm UTC](https://forums.rocket.chat/t/messages-with-images-files-prior-to-the-update-lost-the-text-comments/22851/7 "2026-05-11T18:47:24Z")

</div>

Quick update for everyone facing the same problem. The following process updates all messages with an attachment, where the attachment has a description, but the messagebody itself is empty.

1. Check if you are getting a result with following command

```sh
db.rocketchat_message.find({msg: "", "attachments.0.description": {$exists: true, $ne: ""}}).limit(10).pretty()

```

**If not, stop right here, you have another issue** 😃

1. Run this command for a specific message, knowing there should be a description for the image, to test if everything works like attempted.  
Replace the **\_id** in the command .  
You can find the id with the browser-devtools (see image below)

```sh
db.rocketchat_message.updateOne({_id: "ENTER_YOUR_ID_HERE", msg: "", "attachments.0.description": {$exists: true, $ne: ""}},
  [
    {
      $set: {
        msg: {
          $getField: {
            field: "description",
            input: { $arrayElemAt: ["$attachments", 0] }
          }
        },
        md: {
          $getField: {
            field: "descriptionMd",
            input: { $arrayElemAt: ["$attachments", 0] }
          }
        }
      }
    }
  ])

```

 ![image](https://us1.discourse-cdn.com/flex021/uploads/rocketchat/original/2X/8/8e6111e193922924dcb082ae3ba1099e41f57d29.jpeg)

1. If everthing worked so far, let’s update all other messages

```sh
  db.rocketchat_message.updateMany({msg: "", "attachments.0.description": {$exists: true, $ne: ""}},
  [
    {
      $set: {
        msg: {
          $getField: {
            field: "description",
            input: { $arrayElemAt: ["$attachments", 0] }
          }
        },
        md: {
          $getField: {
            field: "descriptionMd",
            input: { $arrayElemAt: ["$attachments", 0] }
          }
        }
      }
    }
  ])

```

---

<div class="post-metadata">

**Author:** ![reetp](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/reetp/32/5546_2.png) [@reetp](https://forums.rocket.chat/u/reetp)\
**Post date:** [May 11, 2026, 7:55pm UTC](https://forums.rocket.chat/t/messages-with-images-files-prior-to-the-update-lost-the-text-comments/22851/8 "2026-05-11T19:55:17Z")

</div>

Can you open an issue for this & post a link here please?

I can push the team to take a look as something has got missed.

---

<div class="post-metadata">

**Author:** ![reetp](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/reetp/32/5546_2.png) [@reetp](https://forums.rocket.chat/u/reetp)\
**Post date:** [May 12, 2026, 8:04am UTC](https://forums.rocket.chat/t/messages-with-images-files-prior-to-the-update-lost-the-text-comments/22851/9 "2026-05-12T08:04:35Z")

</div>

I have asked that this be looked at but zero guarantee on time scale.

---

<div class="post-metadata">

**Author:** ![reetp](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/reetp/32/5546_2.png) [@reetp](https://forums.rocket.chat/u/reetp)\
**Post date:** [May 24, 2026, 2:39pm UTC](https://forums.rocket.chat/t/messages-with-images-files-prior-to-the-update-lost-the-text-comments/22851/10 "2026-05-24T14:39:34Z")

</div>

Probably this:

> <https://github.com/RocketChat/Rocket.Chat/issues/40663>
>
> \### Description:
> 
> After upgrading to RC 8.4.2 we cannot see text part in message…s predating RC 8.4.x that have any attachments.
> 
> \### Steps to reproduce:
> 
> 1. Upgrade to RC 8.4.2
> 2. Check older messages with pictures on any channel that have them predating RC 8.4.0
> 
> \### Expected behavior:
> 
> Messages along with attachments should be visible when there have been any.
> 
> \### Actual behavior:
> 
> All messages with attachments have lost their visible text message part.
> 
> \### Server Setup Information:
> 
> \- Version of Rocket.Chat Server: 8.4.2
> \- License Type: Enterprise
> \- Number of Users: 500+
> \- Operating System: RHEL8
> \- Deployment Method: docker
> \- Number of Running Instances: 4
> \- DB Replicaset Oplog: Yes
> \- NodeJS Version: v22.22.2
> \- MongoDB Version: 8.2
> 
> \### Client Setup Information
> 
> \- Desktop App or Browser Version: Latest Chrome and Firefox
> \- Operating System: Any
> 
> \### Additional context
> 
> I've reported also this regarding mobile client posted attachments suffering from the same issue, but now the problem is in all attachment messages:
> https://github.com/RocketChat/Rocket.Chat.ReactNative/issues/7328
> 
> Downgrading back to RC 8.4.1 did not help with the issue. Also I cannot be completely certain the issue started in the upgrade to RC 8.4.2 because I had been linking our internal reports to that mobile issue and didn't pay attention to this web client issue earlier because of that.
> 
> I checked through the database and messages can be still found there in \`description:\` and \`descriptionMd:\` fields.
