Login > Forum > Your Profile > Show Drafts
Mine 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.
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.
If you try to save a post with attachments as drafts you get a message:
Yes. There is attachment(s) in some of the drafts. So, this is common? Is it considered a bug and/or need fixing?
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.
Would it be desirable to save attachments in drafts? If not, why?
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?
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
I don't think this one is tracked yet for 1.1.6.
Tracked here: https://github.com/elkarte/Elkarte/issues/3294
I think for 1.1 we "supress" the error and wait for 2.0 to consider saving of attachments in drafts.