• Hi, this is a neat plugin. I activated it on one of my sites and it worked just fine. However, when I activated it on a second site and tried to generate an invoice for an order, I got a fatal error:
    Fatal error: Uncaught exception ‘MpdfException’ with message ‘Can’t open file <my site>/wp-content/uploads/sites/<blog ID>/woocommerce-pdf-invoices/mpdf/ttfontdata/dejavusanscondensedB.GSUBGPOStables.dat’ in <my site>/wp-content/plugins/woocommerce-pdf-invoices/vendor/mpdf/mpdf/classes/otl.php:297 Stack trace: #0 <my site>/wp-content/plugins/woocommerce-pdf-invoices/vendor/mpdf/mpdf/mpdf.php(16211): otl->applyOTL(‘<site name>’, 255) #1 <my site>/wp-content/plugins/woocommerce-pdf-invoices/vendor/mpdf/mpdf/mpdf.php(15104): mPDF->WriteHTML(‘\r\n<table cellpa…’, 4) #2 <my site>/wp-content/plugins/woocommerce-pdf-invoices/vendor/mpdf/mpdf/mpdf.php(14970): mPDF->_getHtmlHeight(‘\r\n<table cellpa…’) #3 <my site>/wp-content/plugins/woocommerce-pdf-invoices/includes/abstracts/abstract-document.php(183): mPDF->SetHTMLHeader(‘\r\n<table cellpa…’) #4 <my site>/wp-content/plugins/woocommerce-pdf-invoices/includes/ab in <my site>/wp-content/plugins/woocommerce-pdf-invoices/vendor/mpdf/mpdf/classes/otl.php on line 297

    I also get a similar error when trying to checkout:
    Can’t open file <my site>/wp-content/uploads/sites/<blog ID>/woocommerce-pdf-invoices/mpdf/ttfontdata/dejavusanscondensedB.GSUBGPOStables.dat

    This is my WooCommerce System Status.

    
    ### WordPress Environment ###
    
    Home URL: https://test.devboostorder.com
    Site URL: https://test.devboostorder.com
    WC Version: 2.6.14
    Log Directory Writable: ?
    WP Version: 4.7.2
    WP Multisite: ?
    WP Memory Limit: 1 GB
    WP Debug Mode: ?
    WP Cron: ?
    Language: en_US
    
    ### Server Environment ###
    
    Server Info: Apache/2.4.7 (Ubuntu)
    PHP Version: ? 5.5.30-1+deb.sury.org~trusty+1 - We recommend a minimum PHP version of 5.6. See: How to update your PHP version
    PHP Post Max Size: 8 MB
    PHP Time Limit: 30
    PHP Max Input Vars: 1000
    cURL Version: 7.35.0
    OpenSSL/1.0.1f
    
    SUHOSIN Installed: –
    MySQL Version: ? 5.5.46 - We recommend a minimum MySQL version of 5.6. See: WordPress Requirements
    Max Upload Size: 1 MB
    Default Timezone is UTC: ?
    fsockopen/cURL: ?
    SoapClient: ?
    DOMDocument: ?
    GZip: ?
    Multibyte String: ?
    Remote Post: ?
    Remote Get: ?
    
    ### Database ###
    
    WC Database Version: 2.6.14
    : 
    woocommerce_sessions: ?
    woocommerce_api_keys: ?
    woocommerce_attribute_taxonomies: ?
    woocommerce_downloadable_product_permissions: ?
    woocommerce_order_items: ?
    woocommerce_order_itemmeta: ?
    woocommerce_tax_rates: ?
    woocommerce_tax_rate_locations: ?
    woocommerce_shipping_zones: ?
    woocommerce_shipping_zone_locations: ?
    woocommerce_shipping_zone_methods: ?
    woocommerce_payment_tokens: ?
    woocommerce_payment_tokenmeta: ?
    MaxMind GeoIP Database: ?
    
    ### Settings ###
    
    Force SSL: –
    Currency: MYR (RM)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 2
    
    ### API ###
    
    API Enabled: ?
    
    ### WC Pages ###
    
    Shop Base: #5 - /
    Cart: #6 - /cart/
    Checkout: #7 - /checkout/
    My Account: #8 - /my-account/
    
    ### Taxonomies ###
    
    Product Types: bundle (bundle)
    composite (composite)
    external (external)
    grouped (grouped)
    mix and match (mix-and-match)
    simple (simple)
    variable (variable)
    
    WooCommerce Support: ?
    
    ### Templates ###
    
    Overrides: storefront/woocommerce/emails/customer-processing-order.php
    

    This is a great plugin otherwise.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter enexwhy

    (@enexwhy)

    I found out why.
    Because you are doing this:

    $current_version = get_site_option( 'bewpi_version' );
    
    if ( false === $current_version ) {
        WPI()->setup_directories();
        // ...
    } elseif ( WPI_VERSION !== $current_version ) {
        WPI()->setup_directories();
        // ...
    }

    So no directories will be created for other sites on a multi-site WordPress installation. That’s quite silly though.

    Currently I also have trouble with templates on a multisite.

    Would be great if the directory topic could be looked at.

    Greetings
    derRALF

    Plugin Author Bas Elbers

    (@baaaaas)

    Hi,

    We are busy adding multisite support to the plugin at the moment. Will update plugin shortly.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Not working with multi-site WordPress’ is closed to new replies.