Attachment Issue

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
HiFiKabin
Community Team Member
Community Team Member
Posts: 6673
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Attachment Issue

Post by HiFiKabin »

One member has reported the following issue, that I can not recreate or solve.

When on the Posting page, everything looks normal (see below)
screenshot_50.jpg
but when an attachment is attached he gets the following
screenshot_51.jpg
The delete works on the 'new' image, but doesn't work on the image that isn't there. When the new image is deleted the 'non' image information remains. The status bar is always grey, and non of the other information that should be with the attachment ever appears.

There are no orphaned attachments in the ACP or in the database. I have replaced files, purged cache, refreshed browser, tried another PC and repaired the database (although it did not show any errors)

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

Re: Attachment Issue

Post by canonknipser »

looks like a mix of old (classic 3.0) attachment upload method and plupload function. Maybe javascript plupload.min.js is not loading correctly for the user and thus is the reason for a fallback on the classic upload function?
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
HiFiKabin
Community Team Member
Community Team Member
Posts: 6673
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Re: Attachment Issue

Post by HiFiKabin »

I haven't used 3.0.x since the day 3.1.x was released, and all of the files have been changed several times since then anyway.
User avatar
canonknipser
Registered User
Posts: 2096
Joined: Thu Sep 08, 2011 4:16 am
Location: Germany
Name: Frank Jakobs
Contact:

Re: Attachment Issue

Post by canonknipser »

I don't mean you have a mixed up installation. Maybe that was a misunderstanding because i mentioned 3.0.
In 3.1, a new function for upload attachments was introduced using the (3rd-party) plupload-library (having multi-file-upload, drag-n-drop, image resizing etc.) based on javascript and / or html5.
But the "classic" function as from 3.0 is still part of the core and used in case of a fallback when plupload is unavailable, even in 3.2 (moved to a separate class, but is still there, should be removed in 3.4 according the source comments).

So, your screenshots show following:
the first is the "old" attachment form know from 3.0, not the normal for 3.2, this should look like this:
screen35.jpg
In the colums "Status", first is a grey bar, changing from left to right to green during upload, after upload changing to a green tickmark:
screen36.jpg
the second is a mix, in the upper part the "old" form, in the lower part the "new" plupload form.

So, if you having the issue with default prosilver, maybe your user has a script blocker active blocking the plupload function. Otherwise, the style maybe not fully 3.2 compatible.
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
HiFiKabin
Community Team Member
Community Team Member
Posts: 6673
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Re: Attachment Issue

Post by HiFiKabin »

Its default unedited prosilver.

I have logged on to his account and get the same issue, but only on his account. It does not happen when I attach an image to my account.

He uses an iPhone, and I have tested ton 2x W10 computers using both FF and IE with and without ad/script blockers.

My account is fine, his gives the error.

EDIT:- Fixed it (I think) I ran the DB updater again and I do not get the error on his account. Just got to wait for him to report back that its OK at his end.
User avatar
canonknipser
Registered User
Posts: 2096
Joined: Thu Sep 08, 2011 4:16 am
Location: Germany
Name: Frank Jakobs
Contact:

Re: Attachment Issue

Post by canonknipser »

Hmmm, the relevant template is posting_attach_body.html, which sends everytime both forms to the browser, one as a fieldset with id "attach-panel-basic" (the "old" one), second as a div with id "attach-panel-multi" (the plupload one).
So, somewhere is a switch which sets one id to hidden and the other to display, depending on the browsers and / or users settings.

Need to scan the code for that when i'm back home
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
HiFiKabin
Community Team Member
Community Team Member
Posts: 6673
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Re: Attachment Issue

Post by HiFiKabin »

Nope, it didn't solve his issue. My brain is about to explode so I am logging off to tomorrow
User avatar
canonknipser
Registered User
Posts: 2096
Joined: Thu Sep 08, 2011 4:16 am
Location: Germany
Name: Frank Jakobs
Contact:

Re: Attachment Issue

Post by canonknipser »

Are you sure assets/javascript/plupload.js loads correct in his browser? That script is responsible for hiding the old upload form and activating the new one:

Code: Select all

phpbb.plupload.initialize = function() {
	// Initialize the Plupload uploader.
	phpbb.plupload.uploader.init();

	// Set attachment data.
	phpbb.plupload.setData(phpbb.plupload.data);
	phpbb.plupload.updateMultipartParams(phpbb.plupload.getSerializedData());

	// Only execute if Plupload initialized successfully.
	phpbb.plupload.uploader.bind('Init', function() {
		phpbb.plupload.form = $(phpbb.plupload.config.form_hook)[0];
		phpbb.plupload.rowTpl = $('#attach-row-tpl')[0].outerHTML;

		// Hide the basic upload panel and remove the attach row template.
		$('#attach-row-tpl, #attach-panel-basic').remove();
		// Show multi-file upload options.
		$('#attach-panel-multi').show();
	});
...
So, when he has disabled javascript or phpbb.plupload.uploader.bind('Init', function() fails, your first screenshot and the upper attachment part of the second screenshot ("classic" attachments view) is the expected result.

And for rest of the second screenshot, the "plupload"-box shows everytime on editing a post when there are attachments (see posting_editor.html)


The weird thing is, that you could prove that behaviour using his account on your computer - i expect loading javascript or not is a browser setup thing and no user setup thing
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
HiFiKabin
Community Team Member
Community Team Member
Posts: 6673
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Re: Attachment Issue

Post by HiFiKabin »

Some more info for you.

I have given him access to the test conversion I did prior to converting the 'real' forum. Thus (with the exception of the post content) it is exactly the same as the real forum in terms of settings, files and extensions.

He does not get this error using his account on the test conversion. Thus there has to be something on his account on the real forum causing his error.

There is absolutely no other common factor.

... BUT I get his error when logged in as him, even though I didn't when logged in as me. Therefore its not the computer, or the forum, or the browser addons. So it has to be something on his account, but what?

The following screenshots are from his devices. (both Apple)
image.png
image2.png
EDIT:- Out of interest I just disabled JS in my browser, logged in on my account obviously I get the non plupload page. I re enabled JS, and now I get his error on my account.

Is there a switch in one of the user tables?
User avatar
canonknipser
Registered User
Posts: 2096
Joined: Thu Sep 08, 2011 4:16 am
Location: Germany
Name: Frank Jakobs
Contact:

Re: Attachment Issue

Post by canonknipser »

Just checked the table structure of potential candidate tables with phpMyAdmin. I didn't find a column which seems to hold any "javascript", "js", "plupload" etc. data.

Did you clear your board cookies? Did you make a browser cache refresh (Ctrl-F5)?
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
HiFiKabin
Community Team Member
Community Team Member
Posts: 6673
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Re: Attachment Issue

Post by HiFiKabin »

canonknipser wrote: Thu Jan 19, 2017 11:50 am
Did you clear your board cookies? Did you make a browser cache refresh (Ctrl-F5)?

yes to both

also happens in a previously unused browser and in private browsing
User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 6673
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Re: Attachment Issue

Post by HiFiKabin »

Right, some more info.

2 forums using the same server and the same php version. Both running 3.2.0 and both were conversions of the same 3.1.x database so therefore have the same members at the time of conversion.

I have disabled js in the browser, attached an image in forum 1 and disabled js and attached another image. Previously everything was correct but now I get the error
hifikabin.jpg
on forum 2, where I have never attached an image with JS disabled, all works correctly.
kabin.jpg
The only common factor is when an account has attached an image with JS disabled at some point.

Somehow the forum is remembering this and getting confused.

I have purged cache, deleted cookies, hard refreshed the browser, cleared the forum cache, re run the update file until I can do it in my sleep.

Weird is not even get close to what is happening.
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Attachment Issue

Post by david63 »

HiFiKabin wrote: Thu Jan 19, 2017 1:02 pm Both running 3.2.0 and both were conversions of the same 3.1.x database
Not sure if it is any help - are the two sets of files the same - both clean 3.2 or is one an updated set of files?
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 6673
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Re: Attachment Issue

Post by HiFiKabin »

david63 wrote: Thu Jan 19, 2017 1:08 pm
HiFiKabin wrote: Thu Jan 19, 2017 1:02 pm Both running 3.2.0 and both were conversions of the same 3.1.x database
Not sure if it is any help - are the two sets of files the same - both clean 3.2 or is one an updated set of files?
The one that shows the error is a 'clean' install. The other I am not sure, but probably 3.1.10 files>3.2.0 rc1 files>3.2.1 rc2 files>3.2.0 gold files.

Just tried on my local test forum and switching js off>attach image>off>attach image and there is no error shown. (clean files installed with quickinstall on XAMPP)

Might it be a php7 issue? I'll go and change the version and see if that does anything

EDIT both forums running php 7.0.14

I have reverted to 5.6.29 and will let you know what happens with him later as it all seems OK with me
User avatar
canonknipser
Registered User
Posts: 2096
Joined: Thu Sep 08, 2011 4:16 am
Location: Germany
Name: Frank Jakobs
Contact:

Re: Attachment Issue

Post by canonknipser »

Yes, really weird ....
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
Post Reply

Return to “[3.2.x] Support Forum”