XF 2.2 Post upgrade some embeded images not showing up

zeus3005

New member
We recently upgraded from XF 1.5 to 2.2 and noticed a lot of posts have image attachments that no longer embed into the post.

Example: https://tf2maps.net/threads/craggy-coast.40778/#post-465870

Note all the "View Attachment ####". The attachments do indeed exist and can be opened by clicking the link.

I can replicate this issue (sort of) by embedding an image in a post: https://tf2maps.net/threads/bb-code-test-thread.45903/#post-489372
Then trying to do the same in the following post using the exact same BB code for it: https://tf2maps.net/threads/bb-code-test-thread.45903/#post-489373

There are also some posts that cannot find the image at all; even though I can confirm we do indeed have the image on our disk: https://tf2maps.net/threads/guide-lets-talk-about-lighting.19133/#post-259999

This affects thousands of posts so fixing it manually will not be possible. This doesn't seem to affect every pre-migration post, and we're not sure what the common dominator is.

If it helps, we used to run these plugins but had disabled them long before our move:


Any help would be appreciated.
Thanks!
 

zeus3005

New member
Update:

We discovered that there is another table involved in allowing something to embed.

https://tf2maps.net/downloads/craggy-coast.8912/updates?page=2#resource-update-22191
https://tf2maps.net/threads/craggy-coast.40778/#post-465870

These posts are the same update, one is in the "updates" tab of XFRM and the other is cloned to the forums.

Code:
select * from xf_attachment where attachment_id = 115559 order by attachment_id desc limit 100;

+---------------+---------+-----------------+------------+-------------+-----------+--------------+------------+
| attachment_id | data_id | content_type    | content_id | attach_date | temp_hash | unassociated | view_count |
+---------------+---------+-----------------+------------+-------------+-----------+--------------+------------+
| 115559        | 141318  | resource_update | 22191      | 1576609425  |           | 0            | 163        |
+---------------+---------+-----------------+------------+-------------+-----------+--------------+------------+

Indeed the embeds work fine in the resource page but not in the discussion page.
Does this mean that this table is just missing the ones for the discussion posts?
 

zeus3005

New member
We fixed one of these issues by running this plugin: https://xenforo.com/community/resources/remove-attach-limits.5618/

We still don't understand why attachments aren't rendering for posts like this one:

We also note that embeded images from Resource Manager posts that are transfered to the discussion post; when they are deleted from the RM post it does not render in the discussion post. Not so much a bug as much as a bit of a confusing edge case. It would be nice if we could somehow keep the original post in the discussion and the RM post in sync.
 

Hristo Avramov

Active member
The links to the images in that thread look like this - tf2maps.net/attachments/dustbowl3-jpg.21262/

EDIT: My mistake, it's the normal structure for image
 
Last edited:

zeus3005

New member
The links to the images in that thread look like this - tf2maps.net/attachments/dustbowl3-jpg.21262/

The bb code in the post is literally just this
Code:
[ATTACH=full]21261[/ATTACH]

we are 100% sure that file it references does indeed exist. Is there some reason this would not be able to dereferenced by XF?
 
Top