Profile Show Drafts errors February 11, 2019, 01:58:29 am Login > Forum > Your Profile > Show DraftsMine shows errors in Attachments.subs.php and Attachment.controller.php files due to some undefined. I cannot confirm it as a bug yet since it could may be because of my tenancy own addons.The cause is said to be "Undefined variable: id_topic" in Attachment.controller.php lines 347 and 352.Anybody get this error may however help confirm this as a bug. Thanks.
Re: Profile Show Drafts errors Reply #1 – February 11, 2019, 01:19:12 pm hmm... are attachments saved for drafts? I forgot... If so, then it could be the preview that tries to show the attachment and fails because a draft doesn't have a $topic attached.
Re: Profile Show Drafts errors Reply #2 – February 11, 2019, 05:17:48 pm If you try to save a post with attachments as drafts you get a message:QuoteThis will save the text of your post, but it will not save attachments, poll or event information.
Re: Profile Show Drafts errors Reply #3 – February 11, 2019, 05:57:56 pm Quote from: emanuele – February 11, 2019, 01:19:12 pmhmm... are attachments saved for drafts? I forgot... If so, then it could be the preview that tries to show the attachment and fails because a draft doesn't have a $topic attached.Yes. There is attachment(s) in some of the drafts. So, this is common? Is it considered a bug and/or need fixing?
Re: Profile Show Drafts errors Reply #4 – February 13, 2019, 04:08:24 pm Bug indeed, just not sure what is actually broken.Well, okay, it is broken Attachment.controller.php at lines 347 and 352.Since attachments are not saved for drafts, then it should just bail out sometimes before reaching the point. At the moment I'm not sure where, though.
Re: Profile Show Drafts errors Reply #5 – February 13, 2019, 06:22:11 pm Would it be desirable to save attachments in drafts? If not, why?
Re: Profile Show Drafts errors Reply #6 – February 14, 2019, 04:54:42 am I prefer not. May be just replace it with its file name and make a note somewhere that draft feature does not save any attachments while the draft is saved. Does this make any sense?
Re: Profile Show Drafts errors Reply #7 – February 14, 2019, 05:55:19 am IIRC drafts should be able to save attachments in 2.0, unless I may have dreamed about having it, not sure honestly... fairly confused... lol
Re: Profile Show Drafts errors Reply #8 – March 27, 2019, 09:39:18 am I don't think this one is tracked yet for 1.1.6.
Re: Profile Show Drafts errors Reply #9 – April 01, 2019, 02:11:26 pm Tracked here: https://github.com/elkarte/Elkarte/issues/3294I think for 1.1 we "supress" the error and wait for 2.0 to consider saving of attachments in drafts.