Support Forum

Add Topic Problem

31 Answers

New Answer

LM Ludovic METZKER
Ludovic METZKER
Member

I have send the original theme without modification to upload.com and if you want help me, you can find this one here : 

gamespeed-full-version.zip – 1.7 MB

I am really sorry for the inconvenience but if you can really help me, it would be really really nice of you. The creator of the theme did not seem to understand the worries and gives me the wrong information. 

YS Yellow Swordfish
Yellow Swordfish
Member

OK – I have the files and I can see the problem areas. I have to say this theme is very badly constructed. But we can fix it. Will get back to you later today at some point – as soon as I can.

YS Yellow Swordfish
Yellow Swordfish
Member

Right – below are the changes needed. These work fine on my test systems. As always we recommend you make safety copies of the files before you change them and store them locally.

header.php

At line 19 locate these two lines of code:

<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/scripts/jquery.min.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/scripts/jquery-ui.min.js" ></script>

and remove them.

functions.php

Following the three ‘include_once’ statements at the top of the file, add this code black:

add_action( 'wp_enqueue_scripts', 'gamespeed_load_scripts', 1 );
function gamespeed_load_scripts() {
    wp_enqueue_script( 'jquery' );
    wp_enqueue_script( 'jquery-ui-core' );
}

and further down locate this section of code:

if (is_admin() && $_GET['page']=='options') {
    wp_deregister_script( 'jquery' );
    wp_register_script('jquery', get_bloginfo('template_directory').'/scripts/jquery-1.6.1.js');
    wp_enqueue_script('jquery');
    add_action('wp_print_scripts', 'loadGlobalVariableJs');
}

and change it to:

if (is_admin() && $_GET['page']=='options') {
//    wp_deregister_script( 'jquery' );
//    wp_register_script('jquery', get_bloginfo('template_directory').'/scripts/jquery-1.6.1.js');
    wp_enqueue_script('jquery');
    add_action('wp_print_scripts', 'loadGlobalVariableJs');
}

and that should do the trick. If not – then let me know please.

JH Joanne Hayes
Joanne Hayes
Member

Hi there,

I loaded Simple: Press yesterday am having the same issue with the topic. When I try to add a topic I can only type in the subject line and the comment box is grayed. Then if I hit submit, it doesn’t add the topic.

I read through this post and checked the link in codex on jQuery conflict, read it, then checked my source code and it is set up properly with:

<script type='text/javascript' src='http://mydomain.com/wp-includes/js/jquery/jquery.js?ver=1.7.1'></script>

I am using Socrates theme and S2member plug in for our membership and I used the default theme for Simple: Press, 
but I made it my own by copying and making the changes you outline in the codex paper on themes.

Everything else seemed to load in properly and easily. 

I love the layout for Simple: Press.

Can you help me fix this?

thank you,

Joanne
YS Yellow Swordfish
Yellow Swordfish
Member

Sounds like something is clearly amiss then, but I will probably need more information. In the first instance – for the sake of elimination – would it be possible for you very briefly switch your site to use the WP default theme to find out if things then work. It’s a good starting point. And a link to your forum age would be good to have so that I can take a look at it.

JH Joanne Hayes
Joanne Hayes
Member

Hello,

I was really nervous about switching the theme, but I backed everything up and switched to the WP default theme and it did the same thing.

 

Would it help if I gave you admin status to access the site? I could pm the info to you .

here is the forum page:

 

http://taxpreparerconnections.com/forum/

thanks for your help.

LM Ludovic METZKER
Ludovic METZKER
Member

Hello Yellow Swordfish, i thank you very so much. You modification are very nice and all functions are OK. 

Thank you thank you 🙂 

YS Yellow Swordfish
Yellow Swordfish
Member

Let me first explain the problem then we can make plans on how to deal with it.

Your site has the problem explained in this article: http://codex.simple-press.com/codex/faq/troubleshooting/what-is-this-jquery-conflict/

In your case there are 2 separate copies the main jQuery library and 2 of the jQuery UI Library being loaded. I believe one is coming from the WP theme and the other I suspect from the ‘visual form builder’ plugin. Although I cn not be sure about either of these suspicions.

It might be possible to solve these via the WP admin interface and we are certainly willing to give it a try but we may ned to have a copy of the theme ans the plugin so we can ascertain what needs to change. These changes are usually very small and very simple.

Let’s start with an admin account if that is OK with you. Please PM credentials to both myself and to ‘Mr Papa’. Please include in the PM a link to your site, a link to this thread and brief reminder of the problem. And one of us will take a look for you.

MP Mr Papa
Mr Papa
Member

following up on Andy’s note…

it appears your wp theme socrates is loading a very, very old version of jquery with:

<script type=”text/javascript” src=”http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js”></script>

this will conflict with the version of jquery that wp loads…

additionally, the something else is loading a version of jquery from googleapis instead of using the version of jquery ui that comes with wp… 

<script type=’text/javascript’ src=’https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js?ver=7496′></script>

it could be the form builder plugin Andy referred to our could be the theme…

Unfortunately, you made the temp account you created for us a wp admin account, but not an sp admin account… could you go to forum – admins – manage admins and add all the sp admin capabilities to this account…

btw, your version of the socrated theme is out of date…  newer version are available as displayed on the dashboard…  dont know if upgrading would help or not…

So, I went ahead and modified your wp theme to not improperly load js (ref: http://codex.simple-press.com/codex/faq/troubleshooting/what-is-this-jquery-conflict/ and http://codex.wordpress.org/Function_Reference/wp_enqueue_script)…  things seem to be working now… 

so if you update the socrates theme, you will lose the changes… so briefly, the singular change was in the theme header.php file to change

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>

to

<?php wp_enqueue_script( 'jquery' ); ?>

Please check it out and see if everything else is working since the jquery ui is still not right but may not be an issue…

JH Joanne Hayes
Joanne Hayes
Member

Okay,first, sorry about not making you admin on forum. I forgot about that, but I corrected it. You now have access.

I upgraded the socrates theme. I had held off because they have a big revision coming out, but that’s okay, this was good practice. 🙂

Anyway I upgraded and made the jquery change in the header. Then I went to the forums page and still had the same problem.

I clicked one of the sub groups (which currently say “no topic”) and then clicked “add topic”. The topic box shows up, but I can only type in the subject line. The box where the comment goes is grayed and I cannot type in it.

I tried checking the visual form builder plug in but it has several sections of code. I’m not sure if there is a certain section I should look in.

In the form builder plug I found:

public function form_css() {
       
        echo apply_filters( ‘vfb-date-picker-css’, ‘<link media=”all” type=”text/css” href=”http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.6/themes/base/jquery-ui.css” rel=”stylesheet” />’ );
    }
   

in the visual-form-builder/visual-form-builder.php (the first file).

But I wasn’t sure how to fix that.

MP Mr Papa
Mr Papa
Member

interesting as I have no problem posting on your site via add topic..

http://taxpreparerconnections.com/forum/1040-questions/test/

so try clearing your browser cache since the js changed… and see if any better… 

if not, are you using tinymce as the editor?  which browser?

JH Joanne Hayes
Joanne Hayes
Member

I see your post! But now I’m really confused. I still can’t seem to post a topic.

I deleted cache, changed from FireFox to Explorer, logged in using my husbands log in and still get the same thing.

I’m going to play with some other things here. Obviously there is a “communication” problem somewhere in these various plug ins.  Life’s issues always seem to boil down to communication issues!   🙂

I’ll check back in a bit and let you know. 

Thanks so much for the help so far and your patience. You guys are great!

YS Yellow Swordfish
Yellow Swordfish
Member

Could there be something being loaded that is only loaded when an admin is loading the pages? Maybe some theme or plugin option only applicable to admins?

JH Joanne Hayes
Joanne Hayes
Member

Hmmm….you could be on to something.  I just created a member named Patty Tester and posted a topic. It worked!

But I have you listed as an administrator not a regular member and you were able to post.

I can hear the Twilight music in the background…  🙂

JH Joanne Hayes
Joanne Hayes
Member

Okay, now Patty Tester cannot add topics and I did not make any changes.

I went through the plug ins to see if anything would seem unusual. I discovered I had loaded two sitemap builders so I deactivated one. (so I guess I did make a change).

I think I am going to delete it all and reload. Maybe I made a critical error when I set it up.