• Hello,

    Since the version 2.8 of WP, the plugin WP-Affiliate (wordpress.org/extend/plugins/wp-affiliate/) doesn’t work, i’ve try to desactivate, re-activated, etc.

    Do you have the same problem ?
    Do you know how to fix it ?

    The website of the plugin is down and it’s the same for the creator.

    Thank’s for your reply !

Viewing 7 replies - 1 through 7 (of 7 total)
  • just tagging on..having the same issue….anything new links created don’t work..but looks like older links are still working….

    I have found that the problem is with this line :

    wp_print_scripts( array( ‘sack’ ));

    When WP-Affiliate adds the SACK js lib to the page, a bunch of JS errors appear. Is there an incompatibility with SACK and 2.8, it does come with WP 2.8, should I use the .dev version instead?

    add_action('admin_print_scripts', 'wp_affiliate_js_admin_header' );
    
    function wp_affiliate_js_admin_header() // this is a PHP function
    {
      // use JavaScript SACK library for Ajax
      wp_print_scripts( array( 'sack' ));
    
      // Define custom JavaScript function
    ?>
    <script type="text/javascript">
    //<![CDATA[
    function wp_affiliate_ajax_add_link( link, text, category )
    {
       var mysack = new sack( "<?php bloginfo( 'wpurl' ); ?>/wp-admin/admin-ajax.php" );    
    
      mysack.execute = 1;
      mysack.method = 'POST';
      mysack.setVar( "action", "wp_affiliate_add_link" );
      mysack.setVar( "link", link.value );
      mysack.setVar( "text", text.value );
      mysack.setVar( "category", category );
      mysack.encVar( "cookie", document.cookie, false );
      mysack.onError = function() { alert('Ajax error in adding affiliate link' )};
      mysack.runAJAX();
    
      return true;
    
    } // end of JavaScript function
    //]]>
    </script>
    <?php
    } // end of PHP function myplugin_js_admin_header

    This outputs the following:

    <script type='text/javascript' src='http://bloguedegeek.net/wp-includes/js/tw-sack.js?ver=1.6.1'></script>
    <script type="text/javascript">
    //<![CDATA[
    function wp_affiliate_ajax_add_link( link, text, category )
    {
    [...]

    Just found the solution!

    You have to re-save the permalink structure so that WP refreshes its cached list of permalinks.

    Just to to Settings > Permalinks and hit Save.

    I have this same problem, its stopped working now soon after I upgraded. Old links that were already saved are working but any new links show 404 error.

    I tried permalinks suggestion above, but doesnt work. I use custom structure:

    %postname%

    it works, you just have to hit save and edit .htaccess 666 permision if it hasn’t the write permissions.

    i have the same permalinks structure

    Could you be a bit more specific? What file needs 666 permission?

    Tried to do the “Just to to Settings > Permalinks and hit Save. ” and I can’t even find a ‘Settings’ link.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: WP-Affiliate] plugin doesn’t work anymore with WP 2.8’ is closed to new replies.