Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

Notice: Undefined index: content in qa-include/qa-theme-base.php on line 2104 - How To Fix?

+3 votes
832 views
asked Aug 16, 2014 in Q2A Core by Hando Kroon

When uploading an image I get the following notice: Undefined index: content in qa-include/qa-theme-base.php on line 2104 and image is not showing. How can I find out the problem? Thank You.

Q2A version: 1.6.3

1 Answer

0 votes
answered Aug 16, 2014 by pupi1985

This is the line that is causing trouble: https://github.com/q2a/question2answer/blob/master/qa-include/qa-theme-base.php#L2104

That is the content of an answer being displayed by the base theme. That is certainly not a Q2A core issue. Most likely there is a plugin or custom theme that is messing with how answers are being displayed before that function gets called.

How to diagnose: Remove the first plugin directory under the qa-plugin directory. Check if it still happening. If it is, do the same with the following directory until you run out of them or find out it is not happening anymore. If after removing all plugins this still happens it is considerably likely that a custom theme is responsible. You can switch to the Candy theme and test if this still happens. If it is still happening then you have performed a core hack.

If it is a plugin or a theme issue, you should stop using it and contact the developer. If it is a core hack, then roll it back.

commented Aug 17, 2014 by Hando Kroon
Thank you for your help, I did remove all the plugins and I did try with all the themes, Snow, Candy and Original but no luck. I did also try all the suggestions that q2apro.com suggested here: http://www.question2answer.org/qa/36413/new-premium-plugin-sceditor-here-we-go  as it is happening with SCEditor plugin and not with the other WYSIWYG editor, although he don’t think it is SCEditor issue.

What do you mean by roll it back?
commented Aug 17, 2014 by pupi1985
Welcome. I meant that if you have changed the core in any way then you should revert that change. As I'm not a native English speaker it is hard for me to draw the line between plain English and the IT jargon :)
...