php artisan bookstack:update-url breaks paths due to omitting a "/" #5554

Closed
opened 2026-02-05 10:10:06 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @msrv on GitHub (Dec 26, 2025).

Describe the Bug

Hi all,
i've maybe discovered a bug. I just migrated my self hosted installation at home (http://IP-Adress, no URL) to a VPS (https://url.example.com).

Everything gets restored, but the image paths are broken because the php artisan command restores the paths from:

http://192.168.2.224/uploads/images/gallery/2025-10/RAMDOM-STRING-example.png
to:
https://bookstack.example.comuploads/images/gallery/2025-10/RAMDOM-STRING-example.png

Note the missing "/" between the url and uploads.

Things i tried:

restored again, updated url again - no effect.

How can i fix this? Maybe someone has an idea?

Thank you very much :)

Edit:

If i enter the "/", e.g. https://bookstack.example.com**/**uploads/images/gallery/2025-10/RAMDOM-STRING-example.png, the image loads correctly.

Edit2:
Fixed it by updating the tables in bookstack database.

Steps to Reproduce

  1. create Bookstack install with ip adress as base url instead of a fqdn
  2. migrate to a new server with fqdn
  3. restore data
  4. paths are broken

Expected Behaviour

paths migrated correctly

Screenshots or Additional Context

No response

Browser Details

Brave latest, Macos latest (26)

Exact BookStack Version

BookStack v25.12, Ubuntu 24.04.03

Originally created by @msrv on GitHub (Dec 26, 2025). ### Describe the Bug Hi all, i've maybe discovered a bug. I just migrated my self hosted installation at home (http://IP-Adress, no URL) to a VPS (https://url.example.com). Everything gets restored, but the image paths are broken because the php artisan command restores the paths from: http://192.168.2.224/uploads/images/gallery/2025-10/**RAMDOM-STRING**-example.png to: https://bookstack.example.comuploads/images/gallery/2025-10/**RAMDOM-STRING**-example.png Note the missing "/" between the url and uploads. Things i tried: restored again, updated url again - no effect. How can i fix this? Maybe someone has an idea? Thank you very much :) Edit: If i enter the "/", e.g. https://bookstack.example.com**/**uploads/images/gallery/2025-10/**RAMDOM-STRING**-example.png, the image loads correctly. Edit2: Fixed it by updating the tables in bookstack database. ### Steps to Reproduce 1. create Bookstack install with ip adress as base url instead of a fqdn 2. migrate to a new server with fqdn 3. restore data 4. paths are broken ### Expected Behaviour paths migrated correctly ### Screenshots or Additional Context _No response_ ### Browser Details Brave latest, Macos latest (26) ### Exact BookStack Version BookStack v25.12, Ubuntu 24.04.03
OVERLORD added the 🐛 Bug label 2026-02-05 10:10:06 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Dec 26, 2025):

Hi @msrv,
I'd only expect that to occur if the two values provided to the update-url command used two different format of slashes (one with and one without slashes). Do you know if that was the case in your scenario?

@ssddanbrown commented on GitHub (Dec 26, 2025): Hi @msrv, I'd only expect that to occur if the two values provided to the `update-url` command used two different format of slashes (one with and one without slashes). Do you know if that was the case in your scenario?
Author
Owner

@msrv commented on GitHub (Dec 27, 2025):

Hi @ssddanbrown thank you for your reply, sadly i dont remember if the previous URL was entered as 192.168.2.224 or 192.168.2.224/ - i just wasn't paying attention to this part - but its definitely possible. I fixed the problem by updating the urls in the database and so far bookstack runs fine as always. Maybe in a future update of the documentation, it could be mentioned that the url format must match exactly, incluging the shlashes.

@msrv commented on GitHub (Dec 27, 2025): Hi @ssddanbrown thank you for your reply, sadly i dont remember if the previous URL was entered as 192.168.2.224 or 192.168.2.224/ - i just wasn't paying attention to this part - but its definitely possible. I fixed the problem by updating the urls in the database and so far bookstack runs fine as always. Maybe in a future update of the documentation, it could be mentioned that the url format must match exactly, incluging the shlashes.
Author
Owner

@ssddanbrown commented on GitHub (Dec 31, 2025):

Okay, thanks for confirming.

Since this has not really been raised before, as far as I can remember, I'm going to just close this out, but I'll try to keep this in mind so that, if it becomes a common occurrence, I know we'd need to provide more explicit guidance to this in particular.

@ssddanbrown commented on GitHub (Dec 31, 2025): Okay, thanks for confirming. Since this has not really been raised before, as far as I can remember, I'm going to just close this out, but I'll try to keep this in mind so that, if it becomes a common occurrence, I know we'd need to provide more explicit guidance to this in particular.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#5554