1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.5 Many older attachments now 404 but see them in file store

Discussion in 'XenForo Questions and Support' started by Mouth, Oct 9, 2016.

  1. Mouth

    Mouth Well-Known Member

    After a few post reports, it seems my site has a fairly consistent issue with attachments in some older posts (12+ mths) where clicking on the attachment link gives a 404 error, but I can see the file within the attachments\ file store.

    For example, I have a link such as;
    ...  which is [ATTACH=full]39394[/ATTACH] when editing the post
    ... which gives a 404 error.

    When I look at the file store/structure, the file appears to be there though;
  2. Chris D

    Chris D XenForo Developer Staff Member

    In BB code and URLs we reference the attachment_id from the xf_attachment table.

    On the file system, the ID used is the data_id from the xf_attachment_data table.

    You need to look up the attachment_id (39394) in the xf_attachment table and that will tell you what the data_id is.
  3. Mouth

    Mouth Well-Known Member

    mysql> select * from xf_attachment where attachment_id = 39394;
    Empty set (0.00 sec)
    ... suggests that something removed it from the xf_attachment table at some stage?

Share This Page