Disapearing attachments after update to 3.2.2

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
User avatar
Tarantino
Registered User
Posts: 673
Joined: Sat Feb 18, 2012 1:51 pm
Contact:

Re: Disapearing attachments after update to 3.2.2

Post by Tarantino » Tue Jan 09, 2018 8:18 pm

Thanks for all the info. My problem was worse xD After update to 3.2.1, the attachments were deleted from the files folder :(

And I didnt make a backup :lol:

1024KBUser
Registered User
Posts: 34
Joined: Mon Dec 23, 2013 1:18 pm

Re: Disapearing attachments after update to 3.2.2

Post by 1024KBUser » Wed Jan 10, 2018 3:45 pm

EXACT same bug here too!

Relatively new setup (1 week old), was on 3.2.1 and upgraded to 3.2.2.

Saw this bug when I edited a post with attachments. Preview shows them but they then disappear.

1024KBUser
Registered User
Posts: 34
Joined: Mon Dec 23, 2013 1:18 pm

Re: Disapearing attachments after update to 3.2.2

Post by 1024KBUser » Thu Jan 11, 2018 1:03 pm

Any update on this ? How long for a fix ?

mrix2000
Registered User
Posts: 591
Joined: Sun Dec 03, 2006 2:23 pm

Re: Disapearing attachments after update to 3.2.2

Post by mrix2000 » Thu Jan 11, 2018 1:30 pm

Hello yes had what I thought was a totally faultless upgrade to now get the issue from more then one member that when they upload more than one image attachment only 1 remains :? I have set in admin to allow 4 image attachments but when I upload more than one myself only one remains.
Hope this can be fixed as my site is image attachment heavy.
Thanks all
mrix

Bab72de
Registered User
Posts: 1
Joined: Thu Jan 11, 2018 4:03 pm

Re: Disapearing attachments after update to 3.2.2

Post by Bab72de » Thu Jan 11, 2018 4:07 pm

This also seems to affect post editing. When you edit a post with multiple attachments only one attachment is shown in the Attachments tab.

User avatar
thecaretaker1
Registered User
Posts: 46
Joined: Tue Dec 30, 2014 8:38 pm

Re: Disapearing attachments after update to 3.2.2

Post by thecaretaker1 » Thu Jan 11, 2018 4:32 pm

Temporarily, I've reverted back to the previous version of my forum until a fix is found. Checking the bug tracker, it says unassigned. So I assume that until somebody picks this job up, it will remain a problem. Maybe if you all vote for this issue it will get noticed sooner. Only 3 votes so far and 4 watching :roll:
https://tracker.phpbb.com/browse/PHPBB3-15506

User avatar
WelshPaul
Registered User
Posts: 252
Joined: Tue Aug 19, 2014 2:09 pm

Re: Disapearing attachments after update to 3.2.2

Post by WelshPaul » Thu Jan 11, 2018 4:55 pm

See post below...
Last edited by WelshPaul on Thu Jan 11, 2018 5:32 pm, edited 1 time in total.

User avatar
WelshPaul
Registered User
Posts: 252
Joined: Tue Aug 19, 2014 2:09 pm

Re: Disapearing attachments after update to 3.2.2

Post by WelshPaul » Thu Jan 11, 2018 5:19 pm

The cause is actually in the includes/functions_posting.php file:

Find:

Code: Select all

$attachrow_template_vars = array();
Replace with:

Code: Select all

// $attachrow_template_vars = array();
Seems to be working now! Can anyone test this please?

User avatar
Tarantino
Registered User
Posts: 673
Joined: Sat Feb 18, 2012 1:51 pm
Contact:

Re: Disapearing attachments after update to 3.2.2

Post by Tarantino » Thu Jan 11, 2018 5:32 pm

Great job! That fix it indeed! :)

User avatar
Marc
Development Team Leader
Development Team Leader
Posts: 5341
Joined: Tue Oct 30, 2007 10:57 pm
Location: Munich, Germany
Name: Marc
Contact:

Re: Disapearing attachments after update to 3.2.2

Post by Marc » Thu Jan 11, 2018 8:08 pm

Thanks for the input. The actual fix is slightly different from the temporary fix but the pointer certainly helped with tracking this down.

Pull request that will go into 3.2.3:
https://github.com/phpbb/phpbb/pull/5082

User avatar
canonknipser
Registered User
Posts: 1711
Joined: Thu Sep 08, 2011 4:16 am
Location: Germany
Name: Frank Jakobs
Contact:

Re: Disapearing attachments after update to 3.2.2

Post by canonknipser » Thu Jan 11, 2018 8:27 pm

Official solution: https://github.com/phpbb/phpbb/pull/5082/files

Edit: Marc was quicker ;)
Greetings, Frank
phpbb.de support team member
English is not my native language - no support via PM or mail
New arrival - Extensions and scripts for phpBB

User avatar
thecaretaker1
Registered User
Posts: 46
Joined: Tue Dec 30, 2014 8:38 pm

Re: Disapearing attachments after update to 3.2.2

Post by thecaretaker1 » Thu Jan 11, 2018 10:03 pm

Fantastic job. That did indeed fix it. Thanks to everyone involved.

1024KBUser
Registered User
Posts: 34
Joined: Mon Dec 23, 2013 1:18 pm

Re: Disapearing attachments after update to 3.2.2

Post by 1024KBUser » Thu Jan 11, 2018 11:02 pm

OK since I dont have shell access I manually changed functions_posting.php, Is this correct ?

Code: Select all

		($config['display_order']) ? krsort($attachment_data) : ksort($attachment_data);

		$attachrow_template_vars = [];

		foreach ($attachment_data as $count => $attach_row)
		{
			$hidden = '';
			// $attachrow_template_vars = array();
			$attach_row['real_filename'] = utf8_basename($attach_row['real_filename']);

			foreach ($attach_row as $key => $value)
			{
				$hidden .= '<input type="hidden" name="attachment_data[' . $count . '][' . $key . ']" value="' . $value . '" />';
			}

User avatar
</Solidjeuh>
Registered User
Posts: 1154
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

Re: Disapearing attachments after update to 3.2.2

Post by </Solidjeuh> » Thu Jan 11, 2018 11:22 pm

1024KBUser wrote:
Thu Jan 11, 2018 11:02 pm
OK since I dont have shell access I manually changed functions_posting.php, Is this correct ?

Code: Select all

		($config['display_order']) ? krsort($attachment_data) : ksort($attachment_data);

		$attachrow_template_vars = [];

		foreach ($attachment_data as $count => $attach_row)
		{
			$hidden = '';
			// $attachrow_template_vars = array();
			$attach_row['real_filename'] = utf8_basename($attach_row['real_filename']);

			foreach ($attach_row as $key => $value)
			{
				$hidden .= '<input type="hidden" name="attachment_data[' . $count . '][' . $key . ']" value="' . $value . '" />';
			}
No, see: https://github.com/phpbb/phpbb/pull/5082/files

Code: Select all

		// We display the posted attachments within the desired order.
		($config['display_order']) ? krsort($attachment_data) : ksort($attachment_data);
		$attachrow_template_vars = [];

		foreach ($attachment_data as $count => $attach_row)
		{
			$hidden = '';
			$attach_row['real_filename'] = utf8_basename($attach_row['real_filename']);

			foreach ($attach_row as $key => $value)
			{
				$hidden .= '<input type="hidden" name="attachment_data[' . $count . '][' . $key . ']" value="' . $value . '" />';
			}
We offer fun HTML5 games for young and old.
Register a free account & enjoy all functions!
Save your score, challenge other members or play along with our tournaments.


~~~ https://www.solidjeuh.be ~~~

1024KBUser
Registered User
Posts: 34
Joined: Mon Dec 23, 2013 1:18 pm

Re: Disapearing attachments after update to 3.2.2

Post by 1024KBUser » Fri Jan 12, 2018 12:33 am

Looks the same to me.

Post Reply

Return to “[3.2.x] Support Forum”

Who is online

Users browsing this forum: appnews, janus_zonstraal, Lumpy Burgertushie, stevemaury and 30 guests