Skip to main content
Topic: [SOLVED]Email Attachments attached to Wrong Post.. (Read 1783 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[SOLVED]Email Attachments attached to Wrong Post..

In reference to the following quote/post (version 1.1.3)


One more thing -- and I'm so sorry to keep bugging you about all this!

I've tried replying by email with a file attachment and the attachments gets posted to the forum but gets attached to the wrong reply (see screenshot, the PDF file 'billing units' is supposed to be attached to the last reply.) The attachment doesn't seem to make it through by email.

Any suggestions? Known bug?

..apparently persists in the ElkArte version currently running as I post this. JPalmer reports HERE

@Spuds - did you find that as a bug back then, as you were going to investigate?

(I can't see emailed attachments posted anywhere in the thread here, or in my own forum, but that's a different problem..).

Update: once radu81 "approved" the attachment, I could see it in that thread, but in the post I replied to, not in the reply post the attachment was the payload of, which becomes, now, three issues:

1 - Like the email attachments appearing in edweis's forum v. 1.1.3 (in the wrong post), the problem of emailed attachments also appearing in the wrong post persists in this forum v. ? (once moderator approved).

2 - Emailed attachments do not show up in my forum v.1.1.6, at all, in spite of email attachments configured - Allow email file attachments to be posted is checked.
(I am using the cron job method, not the IMAP method - could that be the difference? I'm also using PHP 7.2. which I mention only because some behavior anomalies are now being observed and reported between 7.2 and 7.3 and 7.4)

3 - Last - (more a curiosity) why could JPalmer see the attachment in his post that I replied to, but not me, BEFORE it was approved by the moderator? (And then once moderator approved, I could see it...in the wrong post..)

I "really" need to get emailed attachments working, and working correctly, in my forum. Thoughts?

-Steeley
__________________________________________________________________________
// Deep inside every dilemma lies a solution that involves explosives //

Re: Email Attachments attached to Wrong Post..

Reply #1
Update: It turns out that attachments WILL go through in my forum (1.1.6) just like they do in 1.1.3 and ElkArtes 1.1.5, ..BUT...  the emailed attachment has to be in a reply to a reply..  Then the attachment posts in the message being replied to, not in the reply it was attached to.
If the emailed attachment email is starting a new topic, the attachment disappears completely (since there's no previous message to attach it to).

Another issue popped up during testing..  I'll post another bug report regarding starting a new topic via email by changing the subject.
__________________________________________________________________________
// Deep inside every dilemma lies a solution that involves explosives //

Re: Email Attachments attached to Wrong Post..

Reply #2
Could you please reply to this topic? I want to try posting an attachment by email.
Bugs creator.
Features destroyer.
Template killer.

Re: Email Attachments attached to Wrong Post..

Reply #3
Here's an email reply, with an attachment payload, emanuele.

(It will probably end up in your post, not mine..)

-Steeley


Did you exchange, a walk-on part in the war for a lead role in a cage? [~ Pink Floyd: "Wish You Were Here"]

On 6 Dec 2020 at 19:15, emanuele via ElkArte Community wrote:

> Could you please reply to this topic? I want to try posting an attachment by > email.

Bugs creator.

Features destroyer.
 Template killer.
__________________________________________________________________________
// Deep inside every dilemma lies a solution that involves explosives //

Re: Email Attachments attached to Wrong Post..

Reply #4
I'd need another, I forgot I turned notifications off. xD
Bugs creator.
Features destroyer.
Template killer.

Re: Email Attachments attached to Wrong Post..

Reply #5
OK, here's another...

And the attachments need to be moderator approved apparently (at least for me to see it)

-Steeley

Did you exchange, a walk-on part in the war for a lead role in a cage? [~ Pink Floyd: "Wish You Were Here"]

On 6 Dec 2020 at 19:35, emanuele via ElkArte Community wrote:

I'd need another, I forgot I turned notifications off. xD >

Bugs creator.

Features destroyer.
 Template killer.
__________________________________________________________________________
// Deep inside every dilemma lies a solution that involves explosives //

Re: Email Attachments attached to Wrong Post..

Reply #6
I'd need another, I forgot I turned notifications off. xD

BTW, I don't believe attachments posted in the forum will be included in email notifications sent out by Elk..
(And that's not a complaint. In my opinion, it's preferable - if they want to see it, click the link in the email and log in...)
__________________________________________________________________________
// Deep inside every dilemma lies a solution that involves explosives //

Re: Email Attachments attached to Wrong Post..

Reply #7
Testing out reply with attachments Steeley via ElkArte Community wrote on 12/6/20 9:23 PM:
Quote

Quote

On: Sun Dec 6, 2020 emanuele Wrote: I'd need another, I forgot I turned notifications off. xD

BTW, I don't believe attachments posted in the forum will be included in email notifications sent out by Elk..
// Deep inside every dilemma lies a solution that involves explosives //
Bugs creator.
Features destroyer.
Template killer.


Re: Email Attachments attached to Wrong Post..

Reply #9
Tracked:
https://github.com/elkarte/Elkarte/issues/3415

OK, I've created a github account. Should I participate further there or standby here?

I'm considering trying your suggested fix and see what happens..
I'm just not sure at what point the message with attachment is assigned a message ID (if message ID for the attachment is set to "0") and whether a subsequent message ID assignment will "lose" the attachment.
I think that's what happens if the email is a NEW topic.. (no message ID), and thusly it appears the attachment is "lost" (It doesn't end up in the attachments folder, at all)
I misspoke, the attachment ends up in the attachments folder (If I'm going to test the function, I should enable it first as emanuele said). The attachment and its thumbnail are registered in the db (table: eln0_attachments) and linked to message ID "0".
As there is no message id 0 "it just sits there".. .


It appears that new topic email posts with attachments mimic the proposed fix (setting message id to "0"). and when the message posts with it's new message ID, the attachment (or the database) isn't updated with the new message id, and gets orphaned.

__________________________________________________________________________
// Deep inside every dilemma lies a solution that involves explosives //

Re: Email Attachments attached to Wrong Post..

Reply #10
I'm slowly getting around to looking at this some more ... well at all.   I do feel what you found is correct, the attachment is getting its id from the reply and adding it there instead of the "new"post. which should be 0 nods

I've been in the middle of changing from my vagrant environment to a docker one and am still working things out.  At least I now have php7.4 and Elk 1.1.7 set up so can begin to fix some of those annoyances.  Setting up various php/db/elk stacks is very easy as well.

Trying out a mailhog container to help debug the PBE issues but still have work to do to make it useful, if it can even do what I want!
Be safe, Be kind, Happy Programing

Re: Email Attachments attached to Wrong Post..

Reply #11
I've been in the middle of changing from my vagrant environment to a docker one and am still working things out.

I'm retired, my dockers are in a bottom drawer somewhere and I've transitioned back to full vagrant caparison. People even hand me spare change.. Life is grand..
__________________________________________________________________________
// Deep inside every dilemma lies a solution that involves explosives //

 

Re: Email Attachments attached to Wrong Post..

Reply #12
Who can ever forget the era of fat arsed docker jeans :D
Be safe, Be kind, Happy Programing

Re: Email Attachments attached to Wrong Post..

Reply #13
Who can ever forget the era of fat arsed docker jeans :D
Speaking of which.. would someone please tell me what the "PBE" acronym stands for? I'm old-skewelled.. it's not in my leather-bound C/pm user manuals anywhere (although I did discover the C/pm command "ERA" worked in DOS too - Gates, you sneaky bas..rd.)
__________________________________________________________________________
// Deep inside every dilemma lies a solution that involves explosives //

Re: Email Attachments attached to Wrong Post..

Reply #14
Post By Email
Be safe, Be kind, Happy Programing