Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
1.8k views
in Themes by

I'm creating a theme and I've created question view, but instead of content i get 

[no viewer found for format: markdown]

Any idea why. I did no core hacking, just overriding theme-base.php

Also, when I look at console, I see this: 

Uncaught RangeError: Maximum call stack size exceeded

This error occurs here: 

<script>
            var qa_root = '..\/';
            var qa_request = '127272\/what-affect-do-ethanol-detergent-and-have-the-cell-membranes';
            var qa_oldonload = window.onload;
            window.onload = function() {
                if (typeof qa_oldonload == 'function')
                    qa_oldonload();
                
                document.getElementById('anew').qa_focus=function() { document.getElementById('a_content').focus(); };
                
                qa_element_revealed=document.getElementById('anew');
                
                document.getElementById('c127272').qa_focus=function() { document.getElementById('c127272_content').focus(); };
            };

</script>

1 Answer

+2 votes
by
selected by
 
Best answer

The reason why you the "no viewer found for format" error is that you have installed the Markdown plugin. Then created some posts using that plugin. Then removed that plugin. So you now have posts in a format that Q2A on its own is not able to handle. This error appears when you try to display those posts.

The most appropriate solution would be to add the Markdown plugin again. You could also use some tool to turn markdown into HTML (maybe this one http://dillinger.io ?), edit each of the posts replacing the markdown with HTML and, finally, update all posts created with the markdown plugin turning them into HTML by means of the following SQL query:

UPDATE qa_posts SET format='html' WHERE format='markdown'

NOTE: You should backup all data before running SQL queries that modify data

by
If it is not in the plugin list then Q2A is not able to read the qa-plugin.php file. A permission error could certainly be the cause
by
Any idea on maximum call stack size exceeded?
I have almost no custom javascript at all. How come this comes up?
by
That's a separate issue unrelated to Q2A. I don't know what it could be as the cause seem to be custom code but smells like you are in an infinite loop that the browser cancels in order to recover from an excess of memory usage.
BTW, regarding the "almost no custom javascript at all", take into account that you can create an infinite loop with just this code: while (true) {}
by
Fixed it. It was caused by calling a qa_html_theme_base::head_script();
...