BookStack icon indicating copy to clipboard operation
BookStack copied to clipboard

can't search and export images in old pages after restoring data

Open shmbatom opened this issue 1 month ago • 6 comments

Describe the Bug

When I restore my data using old backuping file, I searched key word in order to find my old book or old page, but I saw 'No item found'. and I export old pages to PDF file, all images in the page losted. How can I do now?

Steps to Reproduce

  1. use search box
  2. use export to PD

Expected Behaviour

Is it a bug?

Screenshots or Additional Context

No response

Browser Details

No response

Exact BookStack Version

v25.07.2

shmbatom avatar Nov 20 '25 02:11 shmbatom

another trouble is : the attachment file stay in directory 'storage/uploads/' even I delete the pages where those attachment files in So my backup ZIP always keep large size

shmbatom avatar Nov 20 '25 04:11 shmbatom

Hi @shmbatom,

When I restore my data using old backuping file

Can you explain exactly what process you followed for this?

I searched key word in order to find my old book or old page, but I saw 'No item found'.

Can you still find that old book/page if you navigate through the books manually? Does search work for text in new pages?

ssddanbrown avatar Nov 21 '25 00:11 ssddanbrown

Sorry for this, I found it is my fault, I changed permission of .env when I restored data. Keep old permission of .env, All things will OK. @ssddanbrown But anothing trouble I met is :

  1. I uploaded attachments (mp4) or insert images in page, unlinked attachments、deleted them and cleared recycle box ;
  2. I backuped my data , those files still stay in directory 'data/storage/uploads/'.

shmbatom avatar Nov 23 '25 02:11 shmbatom

Good to hear you found the cause of the original issue.

those files still stay in directory

Page content images will stay around since they could potentially be used in other content. There's a cleanup maintenance action to help with this.

Attachments should be deleted when pages are deleted from the recycle bin.

  • What exactly do you mean by unlinked attachments?
  • Does this happen for new pages and attachments created since you fixed the original issue?

ssddanbrown avatar Nov 23 '25 12:11 ssddanbrown

Q1: original issue--I can search what I expect in new page. I can't seach correct result in restored pages although I restore permission of .env file. It puzzled me. Q2:I empty the recycle bin,those files still stay directory 'data/storage/uploads/'. @ssddanbrown I insert attachment file as below:

  1. select upload file such as xls by clicking 'upload file' button
  2. click link icon to put the selected file in page I delete attachment file as below:
  3. select the file name with link address
  4. click 'remove link' button of folat bar which appear above then file name (unlinked attachments)
  5. click 'X' button in right of the page to delete attachment file

shmbatom avatar Nov 23 '25 14:11 shmbatom

Q1: original issue--I can search what I expect in new page. I can't seach correct result in restored pages although I restore permission of .env file. It puzzled me.

PS: After EDITing the old restored page, I can seach correct result in the edited page. I have lots of restored page, So I can't edit each page again.

shmbatom avatar Nov 23 '25 14:11 shmbatom