• Resolved davidproject123

    (@davidproject123)


    An error of type E_ERROR was caused in line 609 of the file /home/.com/wp-content/plugins/woocommerce/packages/woocommerce-admin/src/Features/Onboarding.php. Error message: Uncaught TypeError: Cannot access offset of type string on string in /home/.com/wp-content/plugins/woocommerce/packages/woocommerce-admin/src/Features/Onboarding.php:609
    Stack trace:
    #0 /home/.com/wp-content/plugins/woocommerce/packages/woocommerce-admin/src/Features/Onboarding.php(468): Automattic\WooCommerce\Admin\Features\Onboarding::append_product_data(Array)
    #1 /home/.com/wp-content/plugins/woocommerce/packages/woocommerce-admin/src/API/OnboardingProfile.php(294): Automattic\WooCommerce\Admin\Features\Onboarding::get_allowed_product_types()
    #2 /home/.com/wp-content/plugins/woocommerce/packages/woocommerce-admin/src/API/OnboardingProfile.php(479): Automattic\WooCommerce\Admin\API\OnboardingProfile::get_profile_properties()
    #3 /home/.com/wp-content/plugins/woocommerce/packages/woocommerce-admin/src/API/OnboardingProfile.php(59): Automattic\WooCommerce\Admin\API\OnboardingProfile->get_collection_params()
    #4 /home/.com/wp-content/plugins/woocommerce/packages/woocommerce-admin/src/API/Init.php(124): Automattic\WooCommerce\Admin\API\OnboardingProfile->register_routes()
    #5 /home/.com/wp-includes/class-wp-hook.php(303): Automattic\WooCommerce\Admin\API\Init->rest_api_init(Object(WP_REST_Server))
    #6 /home/.com/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters(NULL, Array)
    #7 /home/.com/wp-includes/plugin.php(470): WP_Hook->do_action(Array)
    #8 /home/.com/wp-includes/rest-api.php(537): do_action(‘rest_api_init’, Object(WP_REST_Server))
    #9 /home/.com/wp-includes/rest-api.php(495): rest_get_server()
    #10 /home/.com/wp-includes/rest-api.php(2832): rest_do_request(Object(WP_REST_Request))
    #11 [internal function]: rest_preload_api_request(Array, ‘/wc/v3’)
    #12 /home/.com/wp-content/plugins/woocommerce/packages/woocommerce-admin/src/Loader.php(1028): array_reduce(Array, ‘rest_preload_ap…’)
    #13 /home/.com/wp-includes/class-wp-hook.php(303): Automattic\WooCommerce\Admin\Loader::add_component_settings(Array)
    #14 /home/.com/wp-includes/plugin.php(189): WP_Hook->apply_filters(Array, Array)
    #15 /home/.com/wp-content/plugins/woocommerce/packages/woocommerce-admin/src/WCAdminSharedSettings.php(61): apply_filters(‘woocommerce_adm…’, Array)
    #16 /home/.com/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/Assets/AssetDataRegistry.php(230): Automattic\WooCommerce\Admin\WCAdminSharedSettings->Automattic\WooCommerce\Admin\{closure}()
    #17 /home/.com/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/Assets/AssetDataRegistry.php(334): Automattic\WooCommerce\Blocks\Assets\AssetDataRegistry->execute_lazy_data()
    #18 /home/.com/wp-includes/class-wp-hook.php(303): Automattic\WooCommerce\Blocks\Assets\AssetDataRegistry->enqueue_asset_data(”)
    #19 /home/.com/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters(”, Array)
    #20 /home/.com/wp-includes/plugin.php(470): WP_Hook->do_action(Array)
    #21 /home/.com/wp-admin/admin-footer.php(95): do_action(‘admin_print_foo…’)
    #22 /home/.com/wp-admin/edit.php(491): require_once(‘/home/…’)
    #23 {main}
    thrown

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Nawawi Jamili

    (@nawawijamili)

    Hi there,

    Seems like it is related to WooCommerce, json_decode can’t decode $woocommerce_products[‘body’] variable. Please report to the WooCommerce developer or try a workaround to fix it temporarily.

    Replace this code at line 609:

    
    $product_data = json_decode( $woocommerce_products['body'] );
    

    With:

    
    	if ( !empty($woocommerce_products) && is_array($woocommerce_products) && !empty($woocommerce_products['body']) ) {
                $product_data = json_decode( $woocommerce_products['body'] );
            }
    
    

    Thanks.

    Thread Starter davidproject123

    (@davidproject123)

    hello why do i get that i have opchace disabled?
    https://ibb.co/XL2KbvK

    Plugin Author Nawawi Jamili

    (@nawawijamili)

    Hi,

    Docket Cache will show “Not Available” when OPcache is not enabled in php configuration or “Zend OPcache” extension is not loaded.

    Please try updating to the latest version 21.08.03 .

    Thanks.

    Thread Starter davidproject123

    (@davidproject123)

    I have already installed the latest version of the plugin but it is still deactivated,

    I got this error when installing it
    PHP Error: DOMDocument::loadHTML(): Argument #1 ($source) must not be empty in /home/wp-content/plugins/ali2woo/includes/classes/model/A2W_Woocommerce.php:756
    Stack trace:
    #0 /home//wp-content/plugins/ali2woo/includes/classes/model/A2W_Woocommerce.php(756): DOMDocument->loadHTML(”)

    Plugin Author Nawawi Jamili

    (@nawawijamili)

    Hi,

    I have already installed the latest version of the plugin but it is still deactivated,

    You need to consult with your hosting provider. Some hosting does not enable OPcache by default.

    I got this error when installing it
    PHP Error: DOMDocument::loadHTML(): Argument #1 ($source) must not be empty in /home/wp-content/plugins/ali2woo/includes/classes/model/A2W_Woocommerce.php:756
    Stack trace:
    #0 /home//wp-content/plugins/ali2woo/includes/classes/model/A2W_Woocommerce.php(756): DOMDocument->loadHTML(”)

    It looks like the error from the ali2woo plugin. Please report the issue to the plugin developer.

    Thanks.

    Thread Starter davidproject123

    (@davidproject123)

    thank you very much it was solved

    Thread Starter davidproject123

    (@davidproject123)

    Hello I was told by the plugin support (ali2woo) that is conflicting the Docket Cache that I have to do to be Compatible?

    Thread Starter davidproject123

    (@davidproject123)

    or how can I stop caching a specific section?

    Plugin Author Nawawi Jamili

    (@nawawijamili)

    Hi,

    Hello I was told by the plugin support (ali2woo) that is conflicting the Docket Cache that I have to do to be Compatible?

    The error is because the DOMDocument loadhtml function can’t be empty, I don’t have ali2woo file (includes/classes/model/A2W_Woocommerce.php), but from ali2woo-lite (includes/classes/model/A2WL_Woocommerce.php) this is what the code looks like.

    	public function build_description($product_id, $product)
            {
                $html = $product['description'];
    
                if (function_exists('mb_convert_encoding')) {
                    $html = trim(mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8'));
                } else {
                    $html = htmlspecialchars_decode(utf8_decode(htmlentities($html, ENT_COMPAT, 'UTF-8', false)));
                }
    
                if (function_exists('libxml_use_internal_errors')) {
                    libxml_use_internal_errors(true);
                }
                if (class_exists('DOMDocument')) {
                    $dom = new DOMDocument();
                    @$dom->loadHTML($html);
                    $dom->formatOutput = true;
    

    You can try to edit the code at line 754:

    if (class_exists('DOMDocument')) {

    with:

    if (!empty($html) && class_exists('DOMDocument')) {

    or how can I stop caching a specific section?

    Docket Cache is an Object Cache plugin. The cache is based on group and key. You only can ignore it if you know the cache group, please refer to the documentation. https://docs.docketcache.com/constants

    Thanks.

    Thread Starter davidproject123

    (@davidproject123)

    how can i make ali2woo compatible with docket cache?

    Thread Starter davidproject123

    (@davidproject123)

    The one that is causing problems is Advanced Post Caching.

    Plugin Author Nawawi Jamili

    (@nawawijamili)

    Hi,

    Try disabling “Advanced Post Caching” at Configuration page.

    Thanks.

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