Oops, I think I broke the attachment system somehow...

Discuss anything that is not related to Drakan and Blade of Darkness here.

Moderators: Mechanist, Arokhs Twin, yangez93

User avatar
Mechanist
Dragon
Posts: 269
Joined: Wed Mar 07, 2018 7:27 pm
Location: Poland

Oops, I think I broke the attachment system somehow...

Postby Mechanist » Sat Apr 28, 2018 11:13 am

I've been having serious trouble trying to upload 2 small image files into a single post.

It all started when I selected 2 files at the same time in the "Add file" dialog box, and then everything went to Hell in a handcart.
Between all the madness, and the never-before-seen "you have no permission to delete this file" errors when trying to delete the offending attachment(s), I'm at a loss.

Now the files in question have become duplicated somehow, and the duplicates can't be deleted? :shock:
AT, please take a look at this... and I'm sorry for accidentally messing up your forum :oops:

User avatar
Arokhs Twin
Site Admin
Posts: 1189
Joined: Wed Jul 18, 2001 9:36 pm
Location: United Kingdom
Contact:

Re: Oops, I think I broke the attachment system somehow...

Postby Arokhs Twin » Sat Apr 28, 2018 6:33 pm

I've fixed it; looks like the same files were uploaded twice. I've removed the duplicate files but I don't know what happened there. Let me know if any more problems. Only administrators and moderators can delete attachments; it does not seem that standard users can delete their own which is odd. Seems to be an issue with the forum software as I've been through all the permission settings and can't see anything amiss.
By fire and by blood I join with thee in the Order of the Flame!
Webmaster of Arokh's Lair

User avatar
Mechanist
Dragon
Posts: 269
Joined: Wed Mar 07, 2018 7:27 pm
Location: Poland

Re: Oops, I think I broke the attachment system somehow...

Postby Mechanist » Sat Apr 28, 2018 6:54 pm

Hey, thanks a bunch! 8)

At least now I know to never select multiple files for upload in a single dialog box again...

As for the whole deleting thing, it was very weird, and seemingly random.
Sometimes it would let me delete the files (but it would then delete all 4, despite only listing 1 entry!), but other times it would take me to an internal server error page instead - that "lack of permission" error.

I happen to know for a fact that an attachment can be deleted if the post hasn't been submitted yet; but I don't think I've tried deleting an already-posted attachment yet, at least not before this incident.

Ah, and one more thing - it might be somehow relevant:
When I tried editing that doomed post after uploading the 2 files, one of the attachments would tend to disappear for no reason, whether by opening the post for editing, or by using the preview function. :?

User avatar
Mechanist
Dragon
Posts: 269
Joined: Wed Mar 07, 2018 7:27 pm
Location: Poland

Re: Oops, I think I broke the attachment system somehow...

Postby Mechanist » Sat May 05, 2018 8:02 am

Ah, I've unwittingly managed to replicate the problem. Again. :|
At least this time I've recognized what was happening in time, and stopped before any further damage occured.

AT, you might want to take another stab at this.
It appears that this issue is somehow linked to using the "preview" functionality after uploading the attachments.
Also, this time I have been careful not to select multiple files in a single window, so I think we can safely rule that out as a possible cause.

Steps to replicate:
1. Click to create a new topic, or reply to an existing one.
2. Upload at least 2 valid attachments, one after the other. I've tested this with JPEG images, which allow inline placement.
3. Place both of the images inline. Adding any extra text to the post may be needed to trigger this problem, but I haven't tested for that.
4. Click "Preview" - and watch the insanity unfold.

Expected outcome: loads a page which displays a preview of the new post, with the 2 images visible inline, and both of the previously-uploaded attachments still in the list of attachments.

Actual outcome: loads a page which displays a preview of the new post, with the 2 images visible inline, but with one of the previously-uploaded attachments gone from the list of attachments!

After clicking on "Preview" the second time, without changing anything else, the new preview now displays "The attachment {name of missing attached file} is no longer available"; the remaining attachment appearing to be unaffected.

However, attempting to delete the attachment which remained causes unexpected results!
For a regular user, this tends to result in that "internal server error" page being displayed, stating that they lack the permissions required to delete this file.
As a mod, I don't seem to get that error anymore - but the file still doesn't get deleted regardless; the status "throbber" simply never stops spinning, and pressing "Preview" again shows the offending file still very much present in the list of attachments.

Interestingly, when uploading multiple attachments without ever using the preview function in that post, everything seems to work perfectly fine instead.

User avatar
Arokhs Twin
Site Admin
Posts: 1189
Joined: Wed Jul 18, 2001 9:36 pm
Location: United Kingdom
Contact:

Re: Oops, I think I broke the attachment system somehow...

Postby Arokhs Twin » Sat May 05, 2018 12:05 pm

Thanks for letting me know. I've had a dig around on the PHPBB support forums and others have reported this bug which has appeared since the last update. There's a temp fix I can do till they fix it. Seems the update after that broke something else so we will have to wait till the next release.
By fire and by blood I join with thee in the Order of the Flame!
Webmaster of Arokh's Lair

User avatar
Mechanist
Dragon
Posts: 269
Joined: Wed Mar 07, 2018 7:27 pm
Location: Poland

Re: Oops, I think I broke the attachment system somehow...

Postby Mechanist » Sat May 05, 2018 12:14 pm

No problem.

And for now, I've also found a viable workaround on my side: when I want to post something with more than 1 attachment in it, postpone appending the attachments until the last possible moment, and do not preview the post any more after that. Not elegant, but it works.

BTW, while we're at it - there's also another minor issue with the attachment system, which I forgot to mention earlier. It's not a bug, just a graphical thing.
In the WoWDraenor theme, when an attachment is uploaded, its filename and size shows up in the attachment list as a grayish text on a whitish background, making it hard to read.

User avatar
Arokhs Twin
Site Admin
Posts: 1189
Joined: Wed Jul 18, 2001 9:36 pm
Location: United Kingdom
Contact:

Re: Oops, I think I broke the attachment system somehow...

Postby Arokhs Twin » Sat May 05, 2018 12:19 pm

Test - seems to be working after I've edited one of the files. I'll hold off updating to the latest version as that breaks even more things.

Yeah that issue is with the theme. I've messed with the .css files and changed some of the colours.

2 of the moons.jpg
2 of the moons.jpg (76.8 KiB) Viewed 612 times
About to be toasted.jpg
About to be toasted.jpg (35.57 KiB) Viewed 612 times
By fire and by blood I join with thee in the Order of the Flame!
Webmaster of Arokh's Lair

User avatar
Mechanist
Dragon
Posts: 269
Joined: Wed Mar 07, 2018 7:27 pm
Location: Poland

Re: Oops, I think I broke the attachment system somehow...

Postby Mechanist » Sun May 20, 2018 10:02 am

Hmm, have you changed anything with how "Place inline" works recently?

I edited one of my posts, added a 2nd attachment (JPG file), placed it inline, and it only shows a link, not the image? :?
Is it because of its large resolution, possibly?

User avatar
Arokhs Twin
Site Admin
Posts: 1189
Joined: Wed Jul 18, 2001 9:36 pm
Location: United Kingdom
Contact:

Re: Oops, I think I broke the attachment system somehow...

Postby Arokhs Twin » Sun May 20, 2018 9:00 pm

Yeah inline images are limited to 1280x1024
By fire and by blood I join with thee in the Order of the Flame!
Webmaster of Arokh's Lair


Return to “Arokh's Lair Forums”

Who is online

Users browsing this forum: No registered users and 1 guest

cron