Pay With a Like

The plugin only seems to halfway work. By that, I mean that it will open up the interface for both Facebook and Twitter. It will allow me to share content and like content that is outside of the bracket, but it doesn't display the rest of the content that it is supposed to inside of the brackets. Instead, there is an error message that reads, "oops... something went wrong. Please refresh your browser and try again."

  • aecnu

    Greetings Takiyah Noble,

    This is the first time I have ever heard of this issue.

    Since this is the case please perform standard trouble shooting protocol because it appears there may be some conflict here and one way to find out conclusively.

    Standard plugin trouble shooting protocol - first to switch to the Twenty Eleven theme just long enough to check for the problem - if the problem still exists next involves deactivating all plugins except the plugin in question and then see if the issue still exists.

    If it does not, then you want to activate plugins one at a time testing in between to see if the issue returns. Even when you find one plugin, it may be in your interest to deactivate the problem plugin and continue testing the rest of the plugins to insure no others are also conflicting.

    You will know the conflict when the issue returns and which plugin(s) you activated that cause the issue.

    Please advise if there are any plugin conflicts and if so what the plugins are that are conflicting.

    Cheers, Joe

  • Hakan

    Hi,

    You have a jQuery problem on your theme. Now two different versions of jQuery are being loaded. Both of them are called by your theme and they are old:

    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script>
    <script type='text/javascript' src='http://biznizwhiz.com/wp-content/themes/brave/js/jquery-1.7.min.js?ver=1.7'></script>

    This issue will affect not only pay With a Like, but any other plugin that uses jQuery. In addition to that, with each update of Wordpress, your jQuery version will become older and older.

    To fix this issue search and find the above lines, or parts of it in your theme files and remove them. Instead add this in functions.php of the theme:

    add_action( "wp_enqueue_scripts", "biznizwhiz_add_script");
    function biznizwhiz_add_script() {
    wp_enqueue_script( "jquery" );
    }

    This will load the latest version of jQuery coming with Wordpress and maintain that it will always be the latest version.

    Please feel free to ask if anything is unclear.

    Cheers,
    Hakan

  • TakiyahNoble

    Hello again,
    I apologize if this next post is going to display my obvious ignorance... but, I found the script last night... the path itself is: themes\brave\js\jquery-1.7.min.js.

    However, this is the script itself, and is 98 kb.

    Did you actually want me to delete this actual file? I did this as a test and it made the entire website go blank.

    I thought in the second reference, it was a file that actually contained the text <script type='text/javascript' src='http://biznizwhiz.com/wp-content/themes/brave/js/jquery-1.7.min.js?ver=1.7'></script>"

    That was the case with the first scenario. The header.php file contained the text "<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script>"

    So, I just deleted that block of text out of the header.php file, but I didn't have to delete the entire file.

  • TakiyahNoble

    Hakan,
    I just sent over a copy of the theme for a few reasons
    1. All of the wp_enqueue_script commands are found in one main file called theme_js. (themes/brave/functions/template/theme_javascript.php)
    2. In this file, this where the other mention of jquery 1.7 is made. It specifically reads, "wp_deregister_script('jquery');
    wp_register_script('jquery', BRAVE_JAVASCRIPT .'/jquery-1.7.min.js', false, '1.7');
    wp_enqueue_script('jquery');"
    3. In the main functions.php file, there is a line in there that reads "require_once(BRAVE_FUNCTIONS . '/theme_javascript.php');"
    4. In the main functions.php file, there is a line in there that reads "define('BRAVE_JAVASCRIPT', get_template_directory_uri() . '/js');"

    I have already torn up this site enough... and that is simply because I have no clue what I'm doing! LOL!

  • Hakan

    Hi,

    Do the followings:

    1. Remove these lines from functions.php:

    wp_deregister_script('jquery');
    wp_register_script('jquery', BRAVE_JAVASCRIPT .'/jquery-1.7.min.js', false, '1.7');

    2. Remove these lines from your other theme files:

    <script type='text/javascript' src='http://biznizwhiz.com/wp-content/themes/brave/js/jquery-1.7.min.js?ver=1.7'></script>
    
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script>

    You don't need to delete any files. You don't need to touch any .js files.

    As a result of these changes, you will have this line left in functions.php

    wp_enqueue_script('jquery');

    This will load the jQuery included in Wordpress. Thus it will always be the latest version and compatible with Wordpress.

    Cheers,
    Hakan

  • TakiyahNoble

    I promise you that I'm not as clueless (on most days) as I sound right now. LOL!!! So, I deleted the mention of the first <script> command because that was found in the header.php file.

    I also deleted the wp_deregister and wp_register lines that mention jquery. I just cannot find the file that contains the language

    <script type='text/javascript' src='http://biznizwhiz.com/wp-content/themes/brave/js/jquery-1.7.min.js?ver=1.7'></script>

    for the life of me. So, I'm going to comb through each file to see where this pesky little thing is located.

    In the meantime, I will just post the two files that clearly make up the entire theme. These are the main functions file and the theme_javascript file.

  • TakiyahNoble

    Here are the contents of the main functions.php file:

    <?php
    define('BRAVE_FUNCTIONS', TEMPLATEPATH . '/functions/template');
    define('BRAVE_JAVASCRIPT', get_template_directory_uri() . '/js');

    /* Core Theme Functionality */
    require_once(BRAVE_FUNCTIONS . '/theme_fonts.php');
    require_once(BRAVE_FUNCTIONS . '/theme_support.php');
    require_once(BRAVE_FUNCTIONS . '/theme_functions.php');
    require_once(BRAVE_FUNCTIONS . '/theme_pagination.php');
    require_once(BRAVE_FUNCTIONS . '/theme_pluginsnotice.php');

    /* JavaScripts, Widgets, Sidebars, Shortcodes */
    add_action( "wp_enqueue_scripts", "biznizwhiz_add_script");
    function biznizwhiz_add_script() {
    wp_enqueue_script( "jquery" );
    }
    require_once(BRAVE_FUNCTIONS . '/theme_javascript.php');
    require_once(BRAVE_FUNCTIONS . '/theme_widgets.php');
    require_once(BRAVE_FUNCTIONS . '/theme_sidebars.php');
    require_once(BRAVE_FUNCTIONS . '/theme_sidebars_functions.php');
    require_once(BRAVE_FUNCTIONS . '/theme_shortcodes.php');

    /* Post Comments, Custom Post Types */
    require_once(BRAVE_FUNCTIONS . '/theme_post_comments.php');
    require_once(BRAVE_FUNCTIONS . '/theme_post_customtypes.php');
    require_once(BRAVE_FUNCTIONS . '/theme_portfolio_functions.php');

    /* Page Options */
    require_once(BRAVE_FUNCTIONS . '/theme_page_options.php');

    /* Theme Language */
    require_once(BRAVE_FUNCTIONS . '/theme_language.php');
    ?>

  • TakiyahNoble

    Here are the contents of the theme_javascript.php file: **** this is after deleting the items you said:

    <?php
    /* ------------------------------------- */
    /* LOAD JAVASCRIPTS */
    /* ------------------------------------- */

    function loadJS() {
    if (!is_admin()) {

    wp_enqueue_script('jquery');

    wp_enqueue_script( 'jqueryeasing', BRAVE_JAVASCRIPT .'/jquery.easing.1.3.js', false);
    wp_enqueue_script( 'jqueryanimatecolors', BRAVE_JAVASCRIPT .'/jquery.animate-colors-min.js', false);
    wp_enqueue_script( 'jqueryddsmoothmenu', BRAVE_JAVASCRIPT .'/ddsmoothmenu.php', false);
    wp_enqueue_script( 'jquerycssanimate', BRAVE_JAVASCRIPT .'/jquery.cssAnimate.mini.js', false);
    wp_enqueue_script( 'jqueryfitvids', BRAVE_JAVASCRIPT .'/jquery.fitvids.js', false);
    wp_enqueue_script( 'jqueryflexslider', BRAVE_JAVASCRIPT .'/jquery.flexslider-min.js', false);
    wp_enqueue_script( 'prettyphoto', BRAVE_JAVASCRIPT .'/jquery.prettyPhoto.js', false);
    wp_enqueue_script( 'mediaelement', BRAVE_JAVASCRIPT .'/mediaelement-and-player.min.js', false);
    wp_enqueue_script( 'templatejs', BRAVE_JAVASCRIPT .'/templatejs.php', false);
    }
    }
    add_action('init', 'loadJS');
    ?>

  • Hakan

    Hi TakiyahNoble,

    The problem looks like a theme issue, because when I try to edit Social Settings on Theme options page, I get a warning "Theme options could not be saved". Also there is a javascript error after selecting Twitter widget:

    Uncaught jQuery UI Tabs: Mismatching fragment identifier.

    I tried to find if theme is up to date, but I couldn't see the current version number. Your installed version is 1.0.2

    Can you please check if this is the latest one? This is the note of the author in Themeforest:

    You can receive an update by redownloading the theme from your downloads tab on envato.

    Cheers,
    Hakan

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.