Global Administration - Images Missing

Might be happening other places, but this is the only place that I’ve noticed and has been broken for us for quite some time.
image

My guess is that you moved from attachments stored in the DB to FS-based attachments but you didn’t run the Attachment porter script. See https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Attachments#HFilesystemAttachmentStore

If we did, it was years ago, right after the initial install (I have a fundamental opposition against storing binary files in a database), and I’m pretty sure that these have not been broken for the life of the product, but sometimes I’m not that observant. Any harm in running that script now?

Actually would need to check with @tmortagne but I think that it you upgrade to XWiki 10.0 or later, XWiki is able to work with some attachments being in the DB while others are on the FS. Thomas please confirm if that’s the case. Thx

Just upgraded to 10.0 over the weekend.

I think that it you upgrade to XWiki 10.0 or later, XWiki is able to work with some attachments being in the DB while others are on the FS

Yes as indicated in the documentation the Filesystem Attachment Porter script should be used only versions older than 9.10RC1. But if this move was done a long time ago it was already too late.

Nice when we all have detailed records.

We switched to filesystem attachments on 11/21/2012. The page you are referring on that date (http://www.xwiki.org/xwiki/bin/viewrev/Documentation/AdminGuide/Attachments?rev=9.6) did not have anything about the “attachment porter script” back then (not even sure what version that was). We this conversion immediately after or as part of the initial install.

:slight_smile:

http://www.xwiki.org/xwiki/bin/viewrev/Documentation/AdminGuide/Attachments?rev=9.6#HUserswhoalreadyhavearunningwiki :wink:

I’m not sure what you mean. We were already using filesystem attachments (since 2012). Also, all “other” attachments are working fine - only these images as part of the Global Administration.

Ok, I see the note about the Porter script in that version, it was in a different location. We might have even run that script - my notes are a little sketchy there, but probably not as my notes do indicate that I thought “Users who already have a running wiki” was referring to attachments already stored by the users, which we did not have at that time (I asked the staff in a note “I assume nobody has stored any attachments so far?”).

On XWiki < 9.10RC1, if you already have a wiki and want to take advantage of the Filesystem Attachment Store, you should use the Filesystem Attachment Porter to move your existing attachments onto the filesystem.

Even if we were already using filesystem attachments?

This documentation is dedicated to switching to filesystem attachments. The script should have been used the first time the switch was made (and only if the switch was made before 9.10RC1 since it’s totally useless now).

I guess what I am asking is what is the scenario when you are not “switching”? Does that mean filesystem attachments was enabled from the first time XWiki was initialized?

Anyway, so what do I do now about these images missing? Not a big deal, but still annoying.

Again, all other attachments are working fine, these are the only ones that don’t.

I guess what I am asking is what is the scenario when you are not “switching”? Does that mean filesystem attachments was enabled from the first time XWiki was initialized?

You could enable filesystem attachments before importing the default UI yes. In which case the script would be useless.

Anyway, so what do I do now about these images missing? Not a big deal, but still annoying.

Since those looks like standard attachment the simplest is usually to go to Extension Manager, “Installed Extensions”, search for the “Standard Flavor” and ask to “Compute Changes”. You will get a complete diff between the standard flavor and what you have in your instance and a button to revert every change you don’t want to keep.

I’m not following. I thought by these comments that the issue is these images are stored in the database still but the page is created as though they are in the filesystem (but never got moved since I did not run the script)? Is that not correct? If so, can I not move those images to the filesystem?

I have no idea what is the issue exactly, I don’t have enough information to say anything.

If it was as simple as standard database attachments not moved to filesystem when the FS store was enabled the upgrade to 9.10+ should have “restored” them.

Ok…I’m willing to do some legwork, and I’m a web developer, but I’m not sure where to start. If these files were stored in their correct location on the file system, where would that be?

Something like `/storage/wiki/Space1/Space2/Page/~this/attachments/…̀ (with all special characters being URL escaped)

Ok, well, I don’t know why it’s not working. This image works fine:

image
image

But this one does not:
image
image

I also did Compute Changes vs the Standard Flavor and all I get for this section is this:

image

In your browser could you try to go to the URL of the non working images to see if you end up with some details error (like cannot find attachment content at location /some/location/on/the/drive).

1 Like

Nope.

image

Not sure what this black screen means, you actually get an image from browser point of view that look like this ? Maybe try with a different browser.