Support Forum

No dropdown in backend : can

UN
Unknown
Member

Hi,

I need to add a forum to an already existing wordpess-based site.

 

I installed the plugin, but in the backend the menus don’t expand nor collapse. I can access the general menus (Forums, Options, Components…) by clicking on the wordpress toolbar, clicks on individual categories (Smileys, Login and registration…) have no effect.
Here’s a screenshot showing my SP backend : http://uppix.net/8/4/7/a2941453e914059d1ac405f9872db.jpg

At first I thought it was a jquery conflict, so I checked the header of my pages. On the backend part, all .js included come from the wp-include folder of my website, so no problems here. On the frontend though, there’s a nasty include from google’s servers. Is it possible it has an effect on the frontend not working properly ?

On a secondary note (didn’t investigate it yet, I’m mentioning it just in case it’s linked with the main problem), the forum isn’t displaying in the page it created. I checked that the slug was correct, but it’s just a blank frame (and empty html-wise).

 

The wordpress theme is a heavily-modified raindrop, and the simple-press is currently vanilla (just freshly installed).

Cheers !

16 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

On the admin side I would still think it likely to be a script issue. Can you check if any errors show up in the error console or Firebug when you load a forum admin page?

On the blank page I assume you mean you get the header, title etc but no content. Go to the Integration > Page and permalink panel and try turning in the options at the bottom one at a time (Multiple and Loop options). See if that helps.

UN
Unknown
Member

After using Firebug  :

wpa2a is not defined

wpa2a.script_load();

 

Then tried again on different pages, and I got this error :

“$ is not a function”

In every spa-XXX.php file.

Which indeed suggests that this is a jquery problem

 

As for the blank page, I just tried checking and unchecking both options, one at a time, both of them, none of them, and nothing changed. There is indeed the header and footer, the only thing missing is the content.

YS Yellow Swordfish
Yellow Swordfish
Member

Odd – we don’t use $ in our jQuery… unless there is some embedded script doing so which is a possibility.
Ok – admin first. What is wpa2a? is that another plugin? Can you deactivate it briefly to see if that is the conflict? Or other plugins that might be loading scripts in the admin side?

UN
Unknown
Member

It actually was a mistake on my part. The wpa2a error was not on the admin side, but on the frontend. It looks like it came from a wordpress plugin called Add2Any, which I disabled.

It didnt change anything on the frontend (still the blank space), but removed the wpa2a error when loading it.

As for the admin side, I looked into the “$ is not a function”, and it came from a fep.js file in a plugin called frontend-edit-profile.
I replaced every $() with jQuery() in the file and it’s now working correctly !

YS Yellow Swordfish
Yellow Swordfish
Member

So we are half way there! Excellent.
For the front end side can you give me a link to what should be the forum page?

UN
Unknown
Member

I followed the steps explained here (I don’t know if it’s not obsolete as it comes from the old wiki)

There was no call to wp_head() nor wp_footer().

The functions were there, but commented (and not at the place indicated in the wiki).

 

There’s no sign of anything close to _content() in either the page.php or index.php /

 

After adding the footer and head functions, my layout is now totally broken but the forum is showing (remember I did not make the website, I’m just integrating the forum, so I’m a bit limited in what I can do)

It’s currently looking like this

YS Yellow Swordfish
Yellow Swordfish
Member

hang on…. there were NO calls to wp_head() and wp_footer() ?

These are mandatory calls. They are two of the main arteries by which WordPress allows plugins to interact and work. If turning them on – i..e to the state required – breaks the site then you have a seriously bad WP theme there. I think this is something you need to take up with the theme author to be honest as you will find that huge numbers of plugins are reliant on these functions being in place and being in place at the right point of processing.

UN
Unknown
Member

Ok that’s very weird…

There are several plugins installed that already need wp_head() and wp_footer()  and they all are functioning correctly.

I tried to check where they were defined, and I can find 3 instances :

– In the twentyten and twentyeleven wordpress themes, which are not used.

– In wp-include/theme-compat/, there are header.php and footer.php files with wp_head() and wp_footer()

When I commented these two lines, nothing changed.

I sent an email to the person who made the wordpress website in the first place, but I’m really puzzled : why are other modules working, when I can’t find a trace of the hooks being in place ?

 

Apart from those hooks, is there any other possibility of why it wouldn’t work ?

YS Yellow Swordfish
Yellow Swordfish
Member

Well looking at your site at the moment both the wp_head() and the wp_footer() are being called OK.

One issue I do see idf that your theme is incorrectly loading the jQuery library from Google (and an old version) and without using the WP API to do so. That results in two copies being loaded. You can read up on that issue here:” http://codex.simple-press.com/codex/faq/troubleshooting/what-is-this-jquery-conflict/

UN
Unknown
Member

First, thank you for all your answers and your time.

 

The wp_head() and wp_footer() are currently present because I manually added them.

Without them the forum page is blank

With them the forum is displaying, but the style is all broken.

 

Apparently there are a header.php fand and a headers.php, the header one is used by Simplepress and the headers one by the other pages. If I add wp_head() in the headers.php file, it breaks the layout on all the other pages too.

I looked at the jQuery library problem, it is indeed included twice on each page, one coming from the local server, one from google’s CDN.

If the local version is the one to keep (because it’s newer and added with wp_enqueue), why is my layout more broken when I simply delete the google one ? (the colored buttons on the top lose their style).

I contacted the person who made the website, who will look at the theme I guess, but I have no idea how this website was working if they had both hooks problems and jquery problems, even with multiple plugins…

YS Yellow Swordfish
Yellow Swordfish
Member

The head/foot issue is indeed strange.

The jQuery one is not, however. What you are seeing is that your theme is loading the ‘bad’ jQuery and SP is loading the ‘good’ jQuery. But SP will only load jQuery on the forum page. So if you just remove the theme jQuery load then on all non-forum pages there will be no jQuery loaded at all so things will break.
If the theme is changed to use wp_enqueue_script() AND is set to load the WP version of jQuery correctly then you will then achieve the right copy on all pages.

But the head/foot issue is something else and most puzzling.

UN
Unknown
Member

The jQuery thing is actally a little more complicated than that.

Due to the strange two header files thing, any change I make in the file used by SP has no impact on the rest of the pages.

On the SP page both wp’s and google’s jquery are included, but I can remove google’s in header.php : it doesn’t change anything, but breaks the page even more (and the rest of the website remains unchanged.)

On any other page, only google’s is called. All pages are working fine, but are broken if I remove the line in headers.php (makes sense, there is no jQuery anymore), except the forum, which is still broken, but not more than before.

 

I really have no idea on how and why things are this way. If enqueueing and hooks are so important to themes, why didn’t the theme authors include them ? And how are other modules working when the theme is obviously so flawed ?

YS Yellow Swordfish
Yellow Swordfish
Member

Im my experience theme authors leave out the header and footer hooks through ignorance and lack of understading of their importance. The wp devs are so concerned with this they have been thinking of coding in checks although they have not gone this far yet.

Lot’s of plugins will not need them just plugins that need to add something to one of those areas.

As to using thevgoogle cdn for jqyery then read our codex article. They do this in the belief that it is quicker – it is a techie thing but still a bad idea.