Fixed Legit attachments sometimes marked as "unassociated" and disappear after 24 hours

Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.2.4).

Change log:
Ensure multi-quote system does not overwrite unintended parts of the attachment upload request.
There may be a delay before changes are rolled out to the XenForo Community.
 
Ok. So it seems the two issues are connected after all and was related to a change between 2.2.2 and 2.2.3.

However, the change was related not to anything to do with attachments but, rather, our JavaScript that provides multi-quote sorting. It seems the issue only shows up when multi-quote is used, and wasn't directly related to attachments hence why it was tricky to track down and didn't obviously show up when we were reviewing changes between 2.2.2 and 2.2.3.

This is fixed in XF 2.2.4 but we acknowledge that this may be causing some fairly significant issues.

In the meantime, feel free to download our current copy of the fixed code which is available to download from here:
(Right click, save as, upload to your XF installation replacing the existing js/xf/nestable-compiled.js file.)
Note: If you are running your forum with $config['development']['fullJs'] = true; enabled then you will instead need to download and replace js/xf/nestable.js.

When you do this, XF will warn you on an ongoing basis that your nestable-compiled.js file has unexpected contents. This can be safely ignored and will go away once you have upgraded to XF 2.2.4.

Let us know if the fix works for you.
 
It's not exceeding the length
It was exceeding the length when that exception appeared. However, if it was short enough, there was no exception, and it ended up in the database. In the error log example just prior to your post, the value is [{"id":"4364803-0"},{"id":"4365070-0"}], which 39 characters, exceeding the 32-character limit.

Put me down for a request to ensure those exceptions properly bubble so it's easier to sort out any future bugs. :)
 
Thanks for sorting this out Chris. Really appreciate it. Cheers.
Agreed! I can only begin to imagine how tricky that was to track down... but SO glad it wasn't only just my site having the problem since I don't think we would have ever figured it out. LOL!
 
Ok. So it seems the two issues are connected after all and was related to a change between 2.2.2 and 2.2.3.

That's when the issue started for me, after upgrading to 2.2.3. . Thank you and everyone else that came together to help figure this out.
 
In the meantime, feel free to download our current copy of the fixed code which is available to download from here:
(Right click, save as, upload to your XF installation replacing the existing js/xf/nestable-compiled.js file.)
Note: If you are running your forum with $config['development']['fullJs'] = true; enabled then you will instead need to download and replace js/xf/nestable.js.

When you do this, XF will warn you on an ongoing basis that your nestable-compiled.js file has unexpected contents. This can be safely ignored and will go away once you have upgraded to XF 2.2.4.
has someone check this instructions?


Let us know if the fix works for you.
I have done it like you write:
didn't work for us.


Edit: did i forgot something simple?
 
has someone check this instructions?



I have done it like you write:
didn't work for us.


Edit: did i forgot something simple?
I took Chris's fix to mean that if you have that in your config.php, then you need the other file. However I don't see where to get that one :(
 
You will need to do a hard refresh for the changes to potentially be picked up. If you have a CDN, you may need to flush the cache there first as they may also be holding on to an older version of the file. (CloudFlare defaults to caching for 4 hours, for example.)
 
You will need to do a hard refresh for the changes to potentially be picked up. If you have a CDN, you may need to flush the cache there first as they may also be holding on to an older version of the file. (CloudFlare defaults to caching for 4 hours, for example.)
Ah ok, I try this, thank you @Mike
 
Please check the files on the file system (both nestable-compiled.js and nestable.js) contain this exact string within them:

Code:
'| input[type="hidden"]'

This will ensure the correct version of the files are on there. I'd probably ensure you replace both if you're using fullJs just in case. Although using fullJs is not recommended unless you're actively developing XenForo software, it's not really intended for staging environments so I'd remove that from the equation entirely and just use nestable-compiled.js ideally.

You should also be able to find the above exact string inside the file if loaded in the browser as well.

1614342843625.png


If it cannot be found but the contents are present in the file on the server then there's definitely some form of caching still involved.

Hopefully you will agree that the issue can no longer be reproduced here and this is the only file involved so if it isn't working for you then that would be highly peculiar.
 
Please check the files on the file system (both nestable-compiled.js and nestable.js) contain this exact string within them:

Code:
'| input[type="hidden"]'

This will ensure the correct version of the files are on there. I'd probably ensure you replace both if you're using fullJs just in case. Although using fullJs is not recommended unless you're actively developing XenForo software, it's not really intended for staging environments so I'd remove that from the equation entirely and just use nestable-compiled.js ideally.

You should also be able to find the above exact string inside the file if loaded in the browser as well.

View attachment 247430


If it cannot be found but the contents are present in the file on the server then there's definitely some form of caching still involved.

Hopefully you will agree that the issue can no longer be reproduced here and this is the only file involved so if it isn't working for you then that would be highly peculiar.

  • checked all steps you describe :
    • found '| input[type="hidden"]' nestable-compiled.js
    • found '| input[type="hidden"]' nestable.js
    • found on page loaded with browser
  • no cache active

Still "not working" , BUT thats only with a user, who is still in that "bug loop" and only if this user multiquote.
Without multiquote, all attachment insert methods works fine.
I tryed it with another user, who is not in that "bug loop", no problem! With and without multiquote.

I tryed coming out of the "bug loop", as following:
  • logout / login
  • placed a answer from another user between (we recognized here, to come out the loop)
  • clear all site data
...nothing works.

That's it i recognized and tested, so far.

WTF o_O 😭
 
Last edited:
and only if this user multiquote.
Without multiquote, all attachment insert methods works fine.
That's not correct, sorry.
If someone placed a post between, all attachments insert methods works, till you do another multiquote.

So its still the same bug as before the fixed JS.
Only difference, if you in the bug you don't come out, completely.

Someone an idea how I can get the user out of the "bug-loop"?
Folks, it's driving me crazy.
 
Replacing the file is all you need to do. I can do some more testing but I can’t currently envisage a scenario where replacing the file doesn’t work. Especially if the affected user has been logged out, logged back in, refreshed the page and so on.
 
Replacing the file is all you need to do. I can do some more testing but I can’t currently envisage a scenario where replacing the file doesn’t work. Especially if the affected user has been logged out, logged back in, refreshed the page and so on.
Thank you again, I'm going now in to the weekend.
I try it on monday again.
For now, I can only say, it's not working to us.
 
Top Bottom