Forum Replies Created

Viewing 15 replies - 16 through 30 (of 155 total)
  • Lester.. an update maybe good news.

    I saw that your function rate_post_success never executes in my env

    So I created an error: function for your ajax get call.

    The error I got was an invalid json char. hmmmm? so I noticed that the success function loads the respose data as html!

    I have other ajax functionality on most of my pages and I used the .ajaxSetup to set dataType: ‘json’.

    So I added dataType: ‘html’ to your ajax get and it worked… the loading animation went away and the success function executed.

    So my solution is to eliminate my (not recommended) “global” json datatype from my ajax code and let your run normally. I’ll let you know how that works.

    And maybe a suggestion to make your code more idiot proof (from guys like me) is to add the argument dataType: ‘html’ to your ajax calls

    Thanks, Ron

    Hi Lester,

    I’m sorry that I confused the issue with that jqmigrate warning … forget that.

    The point I was trying to make is that my pages DO make the call to wp_head() and wp_footer(). They have get_header() which includes header.php and that file executes wp_head(). Similarly for wp_footer(). I removed the echo now, but outputting some test text to the screen immediately before and after the call to wp_head() and wp_footer(), shows that they ARE executing on my test page.

    Also a view source for the page which has the ratings on it shows the loading of this:

    <link rel='stylesheet' id='wp-postratings-css'  href='https://testyng.com/wp-content/plugins/wp-postratings/postratings-css.css?ver=1.63' type='text/css' media='all' />

    and this:

    <script type='text/javascript'>
    /* <![CDATA[ */
    var ratingsL10n = {"plugin_url":"http:\/\/testyng.com\/wp-content\/plugins\/wp-postratings","ajax_url":"http:\/\/testyng.com\/wp-admin\/admin-ajax.php","text_wait":"Please rate only 1 post at a time.","image":"stars","image_ext":"gif","max":"5","show_loading":"1","show_fading":"1","custom":"0"};
    var ratings_mouseover_image=new Image();ratings_mouseover_image.src=ratingsL10n.plugin_url+"/images/"+ratingsL10n.image+"/rating_over."+ratingsL10n.image_ext;;
    /* ]]> */
    </script>
    <script type='text/javascript' src='https://testyng.com/wp-content/plugins/wp-postratings/postratings-js.js?ver=1.63'></script>

    Besides the dev version, the above is the only frontend js file in the plugin, so what other “Javascript/CSS files of WP-PostRatings” am I not loading?

    The ratings are saved by post and everything works fine except the loading gif stays there. Refreshing the page shows the number of ratings incremented by one.

    Is there a way to load the un-minimized version of the plugin js and insert some console.log statement to see where the conflict is and what’s making it hang up at that point? I’m sure it’s not your plugins’ fault but something in my environment that I can eliminate.

    Thanks if you still want to help.

    Thread Starter Ron Strilaeff

    (@ronstrilaeff)

    Hmmm Justin, need help here.

    Referring to the category widget, the old plugin used to have a dropdown list to include or exclude terms by ctrl-clicking their names from the list. Now it seems the only way to specify which terms I want is to enter a comma separated list of term ids (numbers!?) which is much less intuitive. If I enter names they get erased, leaving only the commas.

    Is this on purpose or is mine broken?

    Sorry.. I was not aware of forum specifically for MS… thanks and good luck!

    I’ll be following this closely since I screwed up my multi-site during the update to 3.6.1

    I cannot get to the dashboard (or frontend) for the primary site (white screen, no debug info, view source just shows 5 blank lines. grrr

    So I’ll be copying in all the files except the wpms and site specific ones too.

    Good luck!

    Yes I did check for wp_head() and wp_footer() and they are in the canvas wootheme header.php and footer.php files

    I have child theme but have not overridden those two files.

    That specific test page I referred to uses a page template file named single-recipe.php and that file has get_header() and get_footer() which according to the wp codex will execute the header.php and footer.php

    How did you determine that I am not executing the wp_head and wp_footer functions?

    I have just now put an echo in immediately after those calls in the canvas theme files. For a few minutes I had deactivated all plugins and went back to the default canvas theme, and the loading gif went away as hoped. There was another minor issue with borders on the star images but that can be solved later. Maybe you looked while it was in transition and a page was broken.

    For now I will not touch my config so if you wanted to investigate it is much appreciated.

    It may be related but I started getting this warning a couple of months ago ( I use jquery for other things on that page, like the favorite icon). I don’t know how to fix that.

    JQMIGRATE: Logging is active
    jquery...r=1.2.1 (line 21)
    JQMIGRATE: jQuery.browser is deprecated
    jquery...r=1.2.1 (line 41)
    migrateWarn(msg="jQuery.browser is deprecated")

    Ok, progress! This seems to work (not loading gif forever) on a simpler site.

    So I’ll have to do the drill to find out what plugin/childtheme/code is conflicting. grrrr…

    Thanks Lester,

    I read that just now…
    1. I have wpsupercache and disabled it.
    2. Not using .htpasswd
    3. Not using https / ssl

    It looks like some kind of js conflict but I get no errors in my firebug console. The only line in the All tab is this:

    GET https://testyng.com/wp-admin/admin-ajax.php?actio...tratings_101841_nonce=1004565e55&_=1381933578038

    … and this is the response (looks normal to me (one line per star the description after))

    <img src="https://testyng.com/wp-content/plugins/wp-postratings/images/stars_crystal/rating_on.gif" alt="17 votes, average: 2.88 out of 5" title="17 votes, average: 2.88 out of 5" class="post-ratings-image" />
    <img src="https://testyng.com/wp-content/plugins/wp-postratings/images/stars_crystal/rating_on.gif" alt="17 votes, average: 2.88 out of 5" title="17 votes, average: 2.88 out of 5" class="post-ratings-image" />
    <img src="https://testyng.com/wp-content/plugins/wp-postratings/images/stars_crystal/rating_half.gif" alt="17 votes, average: 2.88 out of 5" title="17 votes, average: 2.88 out of 5" class="post-ratings-image" />
    <img src="https://testyng.com/wp-content/plugins/wp-postratings/images/stars_crystal/rating_off.gif" alt="17 votes, average: 2.88 out of 5" title="17 votes, average: 2.88 out of 5" class="post-ratings-image" />
    <img src="https://testyng.com/wp-content/plugins/wp-postratings/images/stars_crystal/rating_off.gif" alt="17 votes, average: 2.88 out of 5" title="17 votes, average: 2.88 out of 5" class="post-ratings-image" />
    (<em><strong>17</strong> votes, average: <strong>2.88</strong> out of 5, <strong>rated</strong></em>)

    I’m following this thread with a similar problem …

    When I click on a star, the stars disappear and the loading gif stays forever. Refeshing the page shows that the ratings were increased by one vote so it appears to be working behind the scenes.

    Here is my test/dev site and the post I’m trying to rate.

    I will tidy up the css after I get this to work.

    Please help of you can Lester ??

    I just installed this plugin and get this forever loading gif after I rate a post.

    But i do not see any reference to wp-admin in my .htaccess file. However, that file is huge and complicated because of wpsupercache.

    Any ideas to resolve this?

    Thread Starter Ron Strilaeff

    (@ronstrilaeff)

    Well I guess that’s good to know that it works for someone.

    I’m using the name it is registered as.

    Using a new unused array var like $ta makes no difference.

    My register_taxonomy args are this

    $args = array (
      'labels' => $labels, // defined above
      'public' => true, //defaults to true
      'show_ui' => true, //defaults to public
      'show_in_nav_menus' => true,  //defaults to public
      'show_tagcloud'  => true, //defaults to show_ui
      'show_admin_column' => false, // defaults to false
      'hierarchical' => true, //defaults to false
      'query_var' => true, // default is true which is the taxonomy name
    );
    register_taxonomy('ingredient', array('recipe','ad','post','page'), $args);

    At this point it is archeology so maybe someone who has the same symptoms will dig this up and discover that is was simply a major case of dumbass with an “obvious” error. ??

    Maybe it is something outside of wordpress like some php or mysql config that says “do weird stuff with array arguments”.

    Thread Starter Ron Strilaeff

    (@ronstrilaeff)

    Yes, $pid = 12 has terms in the tax ‘ingredient’

    Here is the result of:

    $terms = get_the_terms($pid,'ingredient');
    print_r($terms);
    Array ( 
    
    [2285] => stdClass Object (
    [term_id] => 2285
    [name] => avocado
    [slug] => avocado
    [term_group] => 0
    [term_order] => 0
    [term_taxonomy_id] => 2400
    [taxonomy] => ingredient
    [description] =>
    [parent] => 0
    [count] => 486
    [object_id] => 81085 ) 
    
    [2286] => stdClass Object (
    [term_id] => 2286
    [name] => bacon
    [slug] => bacon
    [term_group] => 0
    [term_order] => 0
    [term_taxonomy_id] => 2401
    [taxonomy] => ingredient
    [description] =>
    [parent] => 2610
    [count] => 733
    [object_id] => 81085 ) 
    
    [2610] => stdClass Object (
    [term_id] => 2610
    [name] => pork
    [slug] => pork
    [term_group] => 0
    [term_order] => 0
    [term_taxonomy_id] => 2728
    [taxonomy] => ingredient
    [description] =>
    [parent] => 0
    [count] => 1561
    [object_id] => 81085 ) 
    
    [2622] => stdClass Object (
    [term_id] => 2622
    [name] => prawns
    [slug] => prawns
    [term_group] => 0
    [term_order] => 0
    [term_taxonomy_id] => 2740
    [taxonomy] => ingredient
    [description] =>
    [parent] => 0
    [count] => 308
    [object_id] => 81085 )
    
    )

    Interestingly, the array structure resulting from using the simple string argument is one level less deep.

    My workaround (2 months ago, and again now) is exactly what you suggested. I put get_the_terms inside a loop for each taxonomy name and reassembled the results.

    Don’t worry about it, it may be a wp bug so I’m moving on ??

    Thanks for your efforts, Ron

    Thread Starter Ron Strilaeff

    (@ronstrilaeff)

    executing this:

    $taxarray = array ('ingredient','cuisine');
    $terms = get_the_terms($pid,$taxarray);
    print_r($terms);

    I get this (no errors):

    Array ( 
    
    [0] => stdClass Object (
    [term_id] => 2053
    [name] => dairy-free
    [slug] => dairy-free
    [term_group] => 0
    [term_order] => 0
    [term_taxonomy_id] => 2167
    [taxonomy] => diet
    [description] =>
    [parent] => 0
    [count] => 5134 ) 
    
    [1] => stdClass Object (
    [term_id] => 2056
    [name] => gluten free
    [slug] => gluten-free
    [term_group] => 0
    [term_order] => 0
    [term_taxonomy_id] => 2170
    [taxonomy] => diet
    [description] =>
    [parent] => 0
    [count] => 8469 ) 
    
    [2] => stdClass Object (
    [term_id] => 2035
    [name] => mexican
    [slug] => mexican
    [term_group] => 0
    [term_order] => 0
    [term_taxonomy_id] => 2149
    [taxonomy] => cuisine
    [description] =>
    [parent] => 2011
    [count] => 411 ) 
    
    [3] => stdClass Object (
    [term_id] => 2228
    [name] => seafood
    [slug] => seafood
    [term_group] => 0
    [term_order] => 0
    [term_taxonomy_id] => 2343
    [taxonomy] => dishtype
    [description] =>
    [parent] => 0
    [count] => 1248 ) 
    
    [4] => stdClass Object (
    [term_id] => 2086
    [name] => whole30
    [slug] => whole30
    [term_group] => 0
    [term_order] => 0
    [term_taxonomy_id] => 2200
    [taxonomy] => diet
    [description] =>
    [parent] => 0
    [count] => 2964 )
    
    )

    Notice that it has terms in cuisine, and other taxonomies that were not asked for but never ingredient.

    Also, some of the returned terms are from hierarchical taxonomies and some are not so that is not the issue.

    I’m sure ingredient is spelled right and the $pid is valid.

    Bizarre as it seems, executing this (with different, but valid taxonomy name values) gives the exact same results for that $pid (different results on a different $pid) … so where it the world is it getting the $taxarray values from?!

    $taxarray = array ('diet','dishtype');
    $terms = get_the_terms($pid,$taxarray);
    print_r($terms);
    Thread Starter Ron Strilaeff

    (@ronstrilaeff)

    This issue read it head again.

    Breaking it down even further using this example:

    //$taxarray[] = '';
    //$taxarray = array();
    //$taxarray[] = 'cuisine';
    //$taxarray = array ('ingredient','cuisine');
    //$taxarray = array ('ingredient');
    //$taxarray = 'ingredient';
    $taxarray = 'cuisine';
    
    $terms = get_the_terms($pid,$taxarray);

    The only variations that works properly are the last two, simply assigning a single string to the 2nd argument.

    Using any of the previous formats (an array of strings or an empty array) give the same wrong results which are some terms that are partly in and partly out of the taxonomies in the array. That’s what I mean by “unpredictable” … the result are not related to input.

    For proof that $taxarray really is being used, assigning this $taxarray = ”; gives no results … as expected.

    So it seems that an array of strings is the incorrect format and the inefficient workaround I came up with is to loop through the taxarray, calling get_the_terms for each taxonomy and appending the resulting $terms to a yet another array.

    Are there any working examples of how to use an array of taxonomies as the 2nd argument to get_the_terms() ?

    Thread Starter Ron Strilaeff

    (@ronstrilaeff)

    hmmm, I saw the mention of issues similar to “complex bugs” on the media temple forum (my host). The installation was difficult and introduced new errors when used on an account with multiple sites.

    I do not need unstable system sofware, so I think I will put that off for now.

    Thanks, Ron

Viewing 15 replies - 16 through 30 (of 155 total)