News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

invalid attachment

Started by brynn, August 19, 2018, 02:32:25 PM

Previous topic - Next topic

brynn

Hi Friends,
While I do not have my forum configured to moderate attachments, I've noticed every now and then, an attachment is identified as unapproved with an option to approve it.  Whenever that happens, I also notice that there's a little notation that the attachment is invalid.  But I don't know exactly what "invalid" means, in this case.

Here's a current example:  https://forum.inkscapecommunity.com/index.php?topic=1286.0  The last attachment in the first message (Selection_280.png) is the one identified as invalid.  At this point, I'm not sure who can see it and who can't.  I can see it, but I don't see any obvious problem with it.  (I've saved it and opened locally without any error message or other problems.)  At the moment, it says "viewed 9 times" underneath, although I'm not sure if that means someone has actually seen it, or only tried to see it.  I know our moderator was trying to approve it, without success (he left me a message), but I'm not in contact with him at the moment, to find out more.

The last time this happened, I just asked the member to upload the attachment again, which was successful.  Then I just deleted the invalid one.

I have tried searching both the online manual and forum,  for info about invalid attachments, but without success.

These are my questions:

1 -- If I can see the attachment, what makes it invalid?
2 -- Why are invalid attachments sent through moderation in the first place?
3 -- Why are they sent through moderation if they are not approvable?
4 -- Why doesn't the member get an error message if they have tried to upload an invalid image?  (Or maybe they did, I don't really know, but the error message apparently didn't block the attachment from being uploaded.)
5 -- Is there any other solution besides having it uploaded again?

Thank you very much :)

GigaWatt

Does this happen only with PNGs or with any type of an image file?
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

brynn

I haven't noticed that.  The current example is a PNG. 

This is probably only the 3rd time it's happened, maybe 4th (over 5 years since I started the forum).  The first 2 or 3, I don't remember what kind of image those were.

I do know they were all raster images, probably PNG or JPG.  If I had seen SVG or PDF, or other vector format called invalid, I would have investigated already (because the subject of the forum is vector graphics).

I'm just curious, are you able to see that attachment, as a visitor?

GigaWatt

Yep, no problem seeing the attachment.

This is a recompressed copy of the original image that says that it's invalid.

https://s15.postimg.cc/k7qiznvhn/Selection_280.png

There is no quality loss, only set the compression to Max (24-bit color depth is still preserved), so there is only a size difference between the original (larger) and this one (smaller).

Try uploading this image instead of the original one under the same name and see if SMF throw an "Invalid Image" error again ;).
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

brynn

Well if visitors can see it, why does it need to be approved?  And more than that, why can it not be approved?  (Maybe because it's not unapproved to begin with?)

Illori

do you somehow have permissions set that guests can approve posts/attachments pending approval?

what mods do you have installed? by default unless you set permissions to have attachments need to be approved SMF does not unapprove them. so maybe a mod did that for you.

also SMF by default does not use the phrase "invalid attachment".

brynn

Quotedo you somehow have permissions set that guests can approve posts/attachments pending approval?

Guests cannot post at all - only members.  Members' first 2 messages have to be approved.  The referenced message containing the invalid attachment was the first message of that member.  But only one of several attachments is ID'd as invalid.

Quotealso SMF by default does not use the phrase "invalid attachment"

Please see attached screenshot showing "invalid attachment".  The mods which I know involve attachments are SVG as Image Attachment Support and Post/PM Inline Attachments.  But my mod list is below, in case there are other mods which might have something to do with attachments, that I'm not aware of.

Inline attachments mod has an option to make unapproved attachments partially transparent.  Since this one never showed as partially transparent, it gives me the idea that the "invalid attachment" designation did not come from the inline mod.  But that's just my simple sense of logic, and not from any technical knowledge.  I don't think the other mod has any settings.

It doesn't look like the member used the inline attachment feature, and it was a PNG, so I don't immediately recognize any connection with those mods.  But see the list below.

Mod list

simipleColorizer -- 1.1
MultiLanguage Registration Agreement -- 1.0
Remove images from quotes -- 1.6
Forum Firewall -- 2.0.0
No Temp Directory Removal -- 1.1.8
dQuoteSelection -- 2.6.1
Enhanced PM System -- 3.1.1
6 Custom buttons / tabs with Sub Menus (4) -- 0.5
Tiny Portal -- 1.5.1
View Single Category -- 2.4
open mod reports -- 1.0
Set order for sticky topics -- 0.5
Extended Help -- 1.0
Country Flags -- 3.0
Modified No Topics Message (SMF 2.0+) -- 1.1
Integration Hooks Report -- 1.5.3
Signature Area BBCode Buttons -- 2.0.3
Simple Audio Video Embedder -- 4.0.2
SVG as Image Attachments Support -- 1.1
Arantor CAPTCHA -- 1.0.8
Global Headers Footers -- 2.0.1
Post and PM Inline Attachments -- 4.16
Indent BBC -- 1.0.1
More Spiders -- 1.2
Enhanced Dropdown -- 1.2
SMF Articles -- 3.0.2a
SMF 2.0.15 Update -- 1.0
Separate the sticky topics -- 1.0.1
Bad Behavior mod -- 1.5.19
Block Email Usernames -- 0.4.2
Sisyphus -- 2.0.1
Alt Characters v1.7 -- 1.7
Contact Page -- 3.2
Expanding & Collapsing Off-Topic Tag -- 3.2
SMFPacks Shoutbox -- 1.0.5
PM Quote -- 1.0
AWSP - Add Website Permission -- 1.4.3
SRAVC - Separate Replies and Views Column -- 1.9.4
Table Plus BBCodes -- 1.2
Users Online Today -- 2.1
Stop Spammer -- 2.3.9
Drafts -- 2.0.5
Add Stars to Profile -- 1.0.1
Sorted Package Manager Listing -- 1.2
DevCenter -- 0.4.1

Not Uninstallable:

SMF 2.0.14 Update -- 1.0
Reason for Editing M od -- 2.3.2

GL700Wing

I'm familiar with the Post and PM Inline attachments mod and, based on the screenshot image, it looks to me as if an attachment that is awaiting approval has been inserted inline into the post.  Have you tried approving the attachment?
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

brynn

As previously stated, attachments are not moderated in my forum.  No attachment should need approval, as far as I understand.  Yes, of course we've tried to approve, and it doesn't work.

When we try to approve, we get this error message - which makes no sense to me, as the owner/admin, who has access to everything.

"You are not allowed to access this section".

Plus, if it really is unapproved, why can everyone see it?  If it was unapproved, it would only be visible to me and my moderator.  There doesn't seem to be much about the image that really is invalid.  Maybe what GW suggested, but that doesn't seem all that serious to me.

I don't think the member attempted to use the inline feature, because all the attachments are at the bottom of the message, with no text inbetween.  What clue do you see that makes you think they used the inline feature?

So far, the only solution has been to delete the attachment from the server, and re-upload it.

But the most important thing, and the reason I've asked for help, is because I don't think this should be happening, and I want to figure out what's causing it, so it can be reported if necessary, and hopefully fixed, one way or another.

Edit
One more clue.  Despite the message saying it's invalid and needs to be approved, it does not show up in the Moderation Panel.  Probably because it's not really unapproved.  I think the whole thing is erroneous.  I just don't know how to fix it.

Illori

do you have post moderation enabled? once you do if you do not already then you can approve the attachment. only way this can happen if post moderation is not enabled if a mod caused it to be unapproved.

brynn

(sorry for delay)

Yes.

When we try to approve, we get this error message:

"You are not allowed to access this section"

Illori

as i said, do you have post moderation enabled? that has to be enabled before you can do anything else.

it sounds like you do not have it enabled under core features.

brynn

#12
As I said, yes, post moderation is enabled.  As I said before, we moderate the first 2 messages of every new member.

Attachments are not moderated separately.  They are viewable as soon as the message is approved.

However, this particular attachment, 1 of several in that message, showed up with the identification as "invalid attachment" with the buttons to approve or disapproved.  Clicking Approve brings the error message "You are not allowed to access this section".

Edit
Although note that the image is viewable by visitors and members alike, so apparently does not really need approval.  I can't figure out what's "invalid" about it.  And I can't find any way to clear out the "invalid attachment" or the approve/disapprove buttons.

Edit #2
Actually it's not approve/disapprove buttons, but Approve and delete buttons (also Approve All, except that there's only 1)

Advertisement: