• Resolved freekwp

    (@freekwp)


    Hi,

    Really great work on the plugin. It has made dealing with the VAT laws much easier!

    The plugin works as expected, but I’m noticing an error in my log that I wanted to run by you:

    2019/11/12 10:46:02 [error] 24075#24075: *1610 FastCGI sent in stderr: “PHP message: WordPress database error Unknown column ‘TR.tax_payable_to_country’ in ‘field list’ for query
    SELECT
    TR.tax_rate_id
    ,TR.tax_rate
    ,TR.tax_rate_class
    ,TR.tax_rate_country
    ,COALESCE(TR.tax_payable_to_country, TR.tax_rate_country) AS tax_payable_to_country
    FROM
    wp_woocommerce_tax_rates TR
    WHERE
    (TR.tax_rate_id IN (54))
    made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), do_action(‘template_redirect’), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::do_wc_ajax, do_action(‘wc_ajax_checkout’), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::checkout, WC_Checkout->process_checkout, WC_Checkout->create_order, do_action(‘woocommerce_checkout_update_order_meta’), WP_Hook->do_action, WP_Hook->apply_filters, Aelia\WC\EU_VAT_Assistant\WC_Aelia_EU_VAT_Assistant->woocommerce_checkout_update_order_meta, Aelia\WC\EU_VAT_Assistant\WC_Aelia_EU_VAT_Assistant->save_eu_vat_data, Aelia\WC\EU_VAT_Assistant\Order->update_vat” while reading response header from upstream, client: 85.203.44.72, server: staging-domain.kinsta.cloud, request: “POST /?wc-ajax=checkout HTTP/1.0”, upstream: “fastcgi://unix:/var/run/php7.3-fpm-domain.sock:”, host: “staging-domain.kinsta.cloud”, referrer: “https://staging-domain.kinsta.cloud/enroll/”

    Any idea what might be causing this?

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Diego

    (@daigo75)

    The EU VAT Assistant used to have an extra column added to the tax rates table, which could be used to track the country to which taxes had to be paid. That was used in an edge case scenario, in which taxes were collected for one country, but had to be paid to another.

    That column is not active at the moment, but it’s still part of the plugin’s code, as we might need it again in the future. In normal circumstances, the EU VAT Assistant adds the column automatically the first time it runs. However, the error message you see just indicates that such column is not present in the database (it might have been removed).

    Fixing the issue
    To fix the missing column, you can just add it to the database manually. The following command should do:

    
    ALTER TABLE wp_woocommerce_tax_rates 
    ADD COLUMN tax_payable_to_country VARCHAR(50)
    

    The column will just “sit there”, without causing any issue.

    Important
    We strongly recommend to take a backup of your database, before running the SQL command, and to test the site after running it. The command I just posted is safe, but we won’t be able to provide assistance if something unexpected should occur.

    Thread Starter freekwp

    (@freekwp)

    Thanks for the explanation Diego! Good to know what’s going on. I guess it’s not really an issue at all, but it’s nice to have a completely clean error log ??

    I’ll give this a try soon.

    Thanks again!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Error in log’ is closed to new replies.