FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » File attachments stops working
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
File attachments stops working [message #162657] Tue, 29 June 2010 15:38 Go to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
In my thread that serves as my news content, attached files stop working for some reason.

In the fud26_msg table, the attach_cnt is not updated and in fud26_attach it looks like this:
   id    location   original_name     owner   attach_opt   message_id   dlcount   mime_type   fsize
  9916             9767_2.jpg           4         0           0         0          10          7511
  9915             Mineral_01.png       1472       0           0         0          15          92221
  9914             lk_down_nord.jpg      4         0           0         11         10         156850


I enabled error reporting with
ini_set('display_errors',1);
error_reporting(E_ALL|E_STRICT);

but no errors are shown. The forums error log does not show any errors either and neither does my php/apache log.


As you can see, the location and message_id fields are empty, why can this be?

I got the error earlier in a long thread with around 100 replies and 1 attachment in each reply, more or less and I couldnt fix it, so I moved that thread somewhere else and started using this one as my "news item" instead, but now this one broke also and I cannot for the death of me figure out what is wrong.


[Updated on: Tue, 29 June 2010 16:45]

Report message to a moderator

Re: File attachments stops working [message #162658 is a reply to message #162657] Tue, 29 June 2010 15:41 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
It seems to only occur in forums where HTML posting is enabled, or well, only threads in the HTML enabled forum are affected, not all threads mind you, just a few of them.

[Updated on: Tue, 29 June 2010 15:42]

Report message to a moderator

Re: File attachments stops working [message #162659 is a reply to message #162658] Tue, 29 June 2010 16:38 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
fsize is also 0, which may indicate failed uploads. Just in case, please check if you haven't run out of space.
Re: File attachments stops working [message #162660 is a reply to message #162657] Tue, 29 June 2010 16:40 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
19750764544 bytes free space.

Re: File attachments stops working [message #162661 is a reply to message #162660] Tue, 29 June 2010 16:44 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
fsize is actually not 0, its an error in the formatting above. I'll try to clean it up.

There, formatting better.


[Updated on: Tue, 29 June 2010 16:45]

Report message to a moderator

Re: File attachments stops working [message #162662 is a reply to message #162661] Tue, 29 June 2010 16:54 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
mysqlcheck -e does not report any errors

Re: File attachments stops working [message #162663 is a reply to message #162661] Tue, 29 June 2010 17:07 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
You need to open post.php and add some echo statements to see the flow.

It seems that attach_add() was successfully called to INSERT the attachment record with empty location and message_id = 0.

However, attach_finalize() isn't called or somehow doesn't UPDATE the location and message_id.
Re: File attachments stops working [message #162664 is a reply to message #162663] Wed, 30 June 2010 06:24 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
I split off a bunch of the messages in the thread and now I can attach messages again.

Perhaps it has to do with my modified sort order and max messages shown per thread. I'll see if I can use @define to alter the search order instead of altering the SQL.


Re: File attachments stops working [message #162665 is a reply to message #162664] Wed, 30 June 2010 06:25 Go to previous message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
Doesn't make sense why I can't attach files in a 4 msg long thread though, there must be some corruption somewhere but by all the gods I cannot find out where or why

  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: post message fails
Next Topic: FUDapi - Wiki example
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat May 18 16:53:13 GMT 2024

Total time taken to generate the page: 0.03218 seconds