Skip to main content
Topic: Profile Show Drafts errors (Read 6929 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Profile Show Drafts errors

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.

Re: Profile Show Drafts errors

Reply #1

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.
Bugs creator.
Features destroyer.
Template killer.

Re: Profile Show Drafts errors

Reply #2

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.
 
 

sorry for my bad english

Re: Profile Show Drafts errors

Reply #3

Quote from: emanuele – 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.

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

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.
Bugs creator.
Features destroyer.
Template killer.

Re: Profile Show Drafts errors

Reply #5

Would it be desirable to save attachments in drafts? If not, why? 

Re: Profile Show Drafts errors

Reply #6

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

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
Bugs creator.
Features destroyer.
Template killer.

Re: Profile Show Drafts errors

Reply #8

I don't think this one is tracked yet for 1.1.6.

Re: Profile Show Drafts errors

Reply #9

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.