| Author |
Message |
JLA Board Member

Joined: 30 Apr 2009
 Posts: 89 Location: Raleigh, NC

|
Posted: Sat Jul 03, 2010 5:56 am Post subject: Strange old Attachment mod issue |
|
|
An old issue that has been open - thought I we would run it by you all here regarding attachment mod
When setting in config.php the database type to MYSQL4 from MYSQL we found the following behavior
1. When a user posts a new topic with an attachment, the attachment shows up in the post no problem
2. When a user edits the post and deletes the attachment and uploads a new attachment during editing the new attachment is posted to the file system and updated properly in the phpbb_attachments table but the attachment = 1 is NOT updated in the phpbb_posts table for the post. This also happens if edits the post and adds an attachment when there was no attachment during the initial posting.
3. When changing config.php back to MYSQL this does not happen.
Any ideas? _________________ http://www.jlaforums.com |
|
| Back to top |
|
 |
JLA Board Member

Joined: 30 Apr 2009
 Posts: 89 Location: Raleigh, NC

|
Posted: Sat Jul 03, 2010 6:14 am Post subject: Re: Strange old Attachment mod issue |
|
|
Ok, even stranger behavior discovered during some testing.
This was the process
1. Posted a topic with 1 attachment. After posting attachment is showing with no problems
2. Post a reply with 1 attachment. After posting, attachments in both post 1 and 2 of the topic are showing.
3. Edit post 2. During editing, delete attachment, upload different attachment and submit. After posting, attachment not showing for post 2
4. Edit post 1. During editing, delete attachment, upload different attachment and submit. After posting attachment not showing for post 1 but NOW attachment for post 2 is showing.
5. Edit post 2. During editing, delete attachment, upload different attachment and submit. After posting attachment not showing for post 2 but NOW attachment is showing for post 1 _________________ http://www.jlaforums.com |
|
| Back to top |
|
 |
Dog Cow Board Member

Joined: 18 Nov 2008
 Posts: 342

|
Posted: Tue Jul 06, 2010 3:43 pm Post subject: Re: Strange old Attachment mod issue |
|
|
I'm planning on taking a look at the Attachment MOD code later this week. I'm not really familiar with it, but I can probably find the problem. _________________ Moof! |
|
| Back to top |
|
 |
JLA Board Member

Joined: 30 Apr 2009
 Posts: 89 Location: Raleigh, NC

|
Posted: Tue Jul 06, 2010 3:52 pm Post subject: Re: Strange old Attachment mod issue |
|
|
| Dog Cow wrote: | | I'm planning on taking a look at the Attachment MOD code later this week. I'm not really familiar with it, but I can probably find the problem. |
Thanks. Another thing to add. Noticed the follow behavior
If you have a topic that the 1st post or 2nd, 3rd, etc were posted with no attachments (meaning that topic attachment in DB is 0 and all 3 posts have post attachment 0) then someone posts a 4th post with no attachment then edits that post adding an attachment. At this point, topic attachment stays 0 and post attachment for that 4th post stays 0 too.
When switching in DB config from MYSQL4 to MYSQL then everything functions fine as would be expected. _________________ http://www.jlaforums.com |
|
| Back to top |
|
 |
JLA Board Member

Joined: 30 Apr 2009
 Posts: 89 Location: Raleigh, NC

|
Posted: Wed Jul 07, 2010 4:58 pm Post subject: Re: Strange old Attachment mod issue |
|
|
Also getting more into it noticed that some of the update sql when editing posts was not functioning as intended when using the MYSQL4 file in lieu of the MYSQL file _________________ http://www.jlaforums.com |
|
| Back to top |
|
 |
Dog Cow Board Member

Joined: 18 Nov 2008
 Posts: 342

|
Posted: Tue Jul 13, 2010 7:05 pm Post subject: Re: Strange old Attachment mod issue |
|
|
I grepped through the code a few days ago and also looked at the SQL for updating the posts table. I wasn't able to find anything definitive. The fact that MySQL versus MySQL 4 database driver causes the problem suggests that the Attachment MOD has a $dbms switch in it. I checked for this, and didn't find anything that appeared to be the cause. _________________ Moof! |
|
| Back to top |
|
 |
JLA Board Member

Joined: 30 Apr 2009
 Posts: 89 Location: Raleigh, NC

|
Posted: Wed Jul 14, 2010 4:14 am Post subject: Re: Strange old Attachment mod issue |
|
|
| Dog Cow wrote: | | I grepped through the code a few days ago and also looked at the SQL for updating the posts table. I wasn't able to find anything definitive. The fact that MySQL versus MySQL 4 database driver causes the problem suggests that the Attachment MOD has a $dbms switch in it. I checked for this, and didn't find anything that appeared to be the cause. |
Not sure but it seems that it is not only related to updates for attachment mod but other updates during post editing too.
We have went back to MYSQL in the meantime and it is all working fine. Is there a reason we should be looking to make the mysql4 file work? _________________ http://www.jlaforums.com |
|
| Back to top |
|
 |
|