Forum Replies Created

Viewing 12 replies - 1 through 12 (of 12 total)
  • Excellent! That works a charm!

    I am also having this issue. I have just over 320 terms and about two thirds of them display on the User edit page.

    There appears to be no predictable pattern to terms not displaying – they are random term ids, and not cut off at a certain letter of the alphabet.
    I have had to manually match up Users with their terms but the term does not automatically pick up that I’ve associated them and if a User is saved after this then the taxonomy relationship drops off again.

    Thread Starter Creative Marketing

    (@creativemnz)

    I concede the point that the die is killing the output.

    I still believe there has been a change somewhere that has affected the ability to debug without sending emails unless JSON is new to the checkout since 2.3.8. However at this point I am simply arguing a point that is more convenient for myself so I will close this ticket.

    Thread Starter Creative Marketing

    (@creativemnz)

    Speaking to another developer they said that it sounded like a JS error. Sure enough if I check the console when this issue shows I get a JSON error in the console: http://i.imgur.com/EpIHWK3.jpg

    Hopefully some more insight into the issue.

    Thread Starter Creative Marketing

    (@creativemnz)

    I use die because I want to output the variables without sending the email because the more I can fiddle around with variables without getting an email each debug the better.

    The issue I am having isn’t even around the die. It’s the fact that the moment I put any print statement in my code now that the first character of that print statement is listed as a syntax error. As I have shown above I have removed my code from the play and I still get the syntax error in the core email template when I print anything.

    If, as in my example I have already put to you, I put print '<pre>'; I will get Syntax error: unexpected token <. If I put print 'Hi'; I will get Syntax error: unexpected token H.

    Previously I have been able to output variables (as in the screenshots in the imgur album in my previous post) and they would print out fine but now they don’t and I only get syntax errors.

    As in my previous post I updated the site to the latest WooCommerce and WordPress without changing the code snippet above. This is now the output in checkout: http://i.imgur.com/L4BrUXO.jpg

    Thread Starter Creative Marketing

    (@creativemnz)

    Sorry about the lapse in time here – I have been too busy to pick this back up.

    I found and restored a very old copy of my site to prove to myself that I was able to get an output. This website is WordPress 4.2.7 and WooCommerce 2.3.8

    Sure enough at the same point as my above examples on clean sites I put a set of print statements with a die statement that produced a print out of the variables instead of the syntax error I am now experiencing: http://imgur.com/a/owqpI (please note that the output is shortened in my screenshot).

    I also took the opportunity to update the site’s WordPress and WooCommerce and the same code now produces a syntax error. I am not sure if I can try updating WooCommerce without updating WordPress (and vice versa) but am willing to try if you think it will provide more insight.

    Thread Starter Creative Marketing

    (@creativemnz)

    Hi thanks for the reply.

    In my empty site I have removed my code from the equation and am literally using a copy of the admin-new-order.php file with a print statement to the same effect:

    <?php
    /**
     * Admin new order email
     *
     * This template can be overridden by copying it to yourtheme/woocommerce/emails/admin-new-order.php.
     *
     * HOWEVER, on occasion WooCommerce will need to update template files and you (the theme developer).
     * will need to copy the new files to your theme to maintain compatibility. We try to do this.
     * as little as possible, but it does happen. When this occurs the version of the template file will.
     * be bumped and the readme will list any important changes.
     *
     * @see 	    http://docs.woothemes.com/document/template-structure/
     * @author WooThemes
     * @package WooCommerce/Templates/Emails/HTML
     * @version 2.5.0
     */
    
     if ( ! defined( 'ABSPATH' ) ) {
     	exit;
     }
    
     print '<pre>';
     print 'Hi';
     print '</pre>';
     die( 'test' );
    
     /**
      * @hooked WC_Emails::email_header() Output the email header
      */
     do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
    
     <p><?php printf( __( 'You have received an order from %s. The order is as follows:', 'woocommerce' ), $order->get_formatted_billing_full_name() ); ?></p>
    
     <?php
    
     /**
      * @hooked WC_Emails::order_details() Shows the order details table.
      * @since 2.5.0
      */
     do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
    
     /**
      * @hooked WC_Emails::order_meta() Shows order meta data.
      */
     do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
    
     /**
      * @hooked WC_Emails::customer_details() Shows customer details
      * @hooked WC_Emails::email_address() Shows email address
      */
     do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
    
     /**
      * @hooked WC_Emails::email_footer() Output the email footer
      */
     do_action( 'woocommerce_email_footer', $email );

    I have left this in the empty site which I linked above which produces the same PHP error I have been seeing on my production site.
    I have set wp_debug to true and have no errors coming up through this.

    This is a change that happened when I updated. The last time I edited the code I was able to do prints and a die on the template with ease. When I came back to make updates after the update to 2.5 I was no longer able to use a print as this syntax error kept occurring. I had to debug by adding my print to the content of the email notification.

    Thread Starter Creative Marketing

    (@creativemnz)

    Nothing different, no. All the sites using this plugin are all on the same dedicated server and have had similar set ups.
    One of the sites we are running fine was initially a clone of the faulty site. The only difference now between those two sites are a couple of plugins and copy.

    Thread Starter Creative Marketing

    (@creativemnz)

    Yes that directory exists. I had backups into there successfully until the 23rd Aug. Since that time I have not had any emails (the backups are set to email) with a backup for this site. We have multiple sites set up with aiowps successfully working and backing up but this site is the only one not backing up.

    Thread Starter Creative Marketing

    (@creativemnz)

    We have looked at these and there’s nothing.

    We have duplicated the site onto local host, removed ALL plugins bar aiowps with no success on a manual backup.

    We have even tried doubling the memory and changing file permissions all while monitoring the logs. There’s nothing coming up – it looks like it’s going through the action of backing up the database but isn’t saving it.

    Thread Starter Creative Marketing

    (@creativemnz)

    No I had not.

    I took a look and I get this error after trying a manual backup:

    FAILURE : Error inserting record into *prefix*_aiowps_login_activity

    However this looks like an error for my login to the site.

    Thread Starter Creative Marketing

    (@creativemnz)

    I went back through my records and on Aug 22 I added a plugin called Category Order and Taxonomy Terms Order which adds a cell to a table in the database – could this be a conflict?

    This plugin was one of the ones I deactivated before trying a manual backup through the aiowps dashboard.

Viewing 12 replies - 1 through 12 (of 12 total)