This is already fixed on master
Right on! Thanks, @baris !
The uploads would reflect the new sub-path.
The uploads do not include the
/forums part of the path and therefore are giving 404s.
I have 120k uploads. I hope there's an easy fix for this. I looked through the settings but I didn't find anything useful but I might've missed something.
Wait, what? Attachments are just links?
Yeah, it's still a lot better than how older forums did it. And it kinda makes sense, then the file could live anywhere at the time of upload.
But this basically makes it impossible to move attachments unless you write a script to re-write all the URLs. And I can't do symlinks in this situation either. I'm just glad wordpress doesn't use an
nodebb-plugin-import plugin only works with 1.7.x and as mentioned in the steps, I'm currently on 1.10.x
Since it the import process set the url in the post, it's probably a bug there.
I could probably run a script to iterate over all the records and fix them and I probably will that but not today.
Turns out this is a bigger problem than I thought.
The only reason why you see images is because I manually changed the posts. Nearly every post in this topic has an image but it cannot be seen. I think this is a feature?
Here's an example:
Zuiho: ![DSCN1475.JPG](/uploads/_imported_attachments/migrated/595456_DSCN1475.JPG) ![DSCN1476.JPG](/uploads/_imported_attachments/migrated/595458_DSCN1476.JPG)
But it should be:
Zuiho: ![DSCN1475.JPG](/forums/assets/uploads/_imported_attachments/migrated/595456_DSCN1475.JPG) ![DSCN1476.JPG](/forums/assets/uploads/_imported_attachments/migrated/595458_DSCN1476.JPG)
It seems the forum is not displaying any images unless the
/forums is in the path. Normally not a problem unless you have a botched import like me.
I have 1.2M posts and over 250k attachments, I'm not looking to re-process all the posts in the DB.
Took me about an hour but I think I found the source of the issue:
What's happening is that if a relative path is detected in a markdown url, this code checks that the relative path prefix is there. I'm not really sure why this is the case. If I'm running Wordpres (I am) and upload images there, shouldn't I be able to use relative URLs without enforcing the relative_path?
(For my reference, the relative path is set based on the site url)