• Running an e-com site which seems okay until I try to update products or images using AliDropship Woo. At this point, it shows to go down and reports HTTP 500 or 503 briefly before allowing me to access again. I reinstalled WP, deactivated all plug-ins and set a default theme and found this repeating in the debug.log:

    [11-Dec-2019 02:10:47 UTC] PHP Notice: Undefined index: host in /var/www/wordpress/wp-includes/canonical.php on line 528
    [11-Dec-2019 02:10:47 UTC] PHP Notice: Undefined index: host in /var/www/wordpress/wp-includes/canonical.php on line 528
    [11-Dec-2019 02:10:47 UTC] PHP Notice: Undefined index: host in /var/www/wordpress/wp-includes/canonical.php on line 530

    After reactivating all my settings, debug.log looks like:

    [11-Dec-2019 02:33:09 UTC] PHP Notice: Undefined index: scheme in /var/www/wordpress/wp-includes/canonical.php on line 554
    [11-Dec-2019 02:33:09 UTC] PHP Notice: Undefined index: host in /var/www/wordpress/wp-includes/canonical.php on line 528
    [11-Dec-2019 02:33:09 UTC] PHP Notice: Undefined index: host in /var/www/wordpress/wp-includes/canonical.php on line 528
    [11-Dec-2019 02:33:09 UTC] PHP Notice: Undefined index: host in /var/www/wordpress/wp-includes/canonical.php on line 530
    [11-Dec-2019 02:33:09 UTC] PHP Notice: Undefined index: host in /var/www/wordpress/wp-includes/canonical.php on line 533
    [11-Dec-2019 02:33:09 UTC] PHP Notice: Undefined index: scheme in /var/www/wordpress/wp-includes/canonical.php on line 554

    • This topic was modified 4 years, 11 months ago by whitewolfha.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 16 through 19 (of 19 total)
  • You can share line 0 var/www/wordpress/wp-content/plugins/alidswoo/includes/adsw/update/uploadExternalImages.php on line 0 ?

    Thread Starter whitewolfha

    (@whitewolfha)

    Not sure I understand. When I open uploadExternalImages.php it is encoded and garbled.

    Still seeing these in debog.log:

    PHP Notice:  Undefined index: _sku in /var/www/wordpress/wp-content/plugins/alidswoo/includes/Ali/AliImport.php on line 0
    [12-Dec-2019 03:26:11 UTC] PHP Warning:  _() expects exactly 1 parameter, 2 given in /var/www/wordpress/wp-content/plugins/alidswoo/includes/adsw/update/uploadExternalImages.php on line 0

    it is practical to obfuscate the source code, but let’s see if we can recover this code.
    Add into (end loop) functions.php your theme or create nameplugin.php extra code for plugin:

    <?php
    /**
     * Plugin Name: autodebug
     * Plugin URI: https://www.mywebsite.com/my-first-plugin
     * Description: The very first plugin that I have ever created.
     * Version: 1.0
     * Author: Your Name
     * Author URI: https://www.mywebsite.com
     */

    It functions.php or nameplugin.php

    if(strpos(__FILE__,'uploadExternalImages.php')) {
    error_log(file_get_contents('/var/www/wordpress/wp-content/plugins/alidswoo/includes/adsw/update/uploadExternalImages.php',3,'/var/www/wordpress/file.txt');
    }
    Thread Starter whitewolfha

    (@whitewolfha)

    Got your email but cannot see your post here…

    I may not have added it in the right place as I get an error. I added it to the else //do nothing area. I am getting this error:

    Your PHP code changes were rolled back due to an error on line 231 of file wp-content/themes/best-ecommerce/functions.php. Please fix and try saving again.
    
    syntax error, unexpected ';', expecting ',' or ')'
    <?php
    
    /**
     * [best_ecommerce_enqueue_style description]
     * @return [type] [description]
     */
    function best_ecommerce_enqueue_style() {
    	// Parent theme CSS.
        wp_enqueue_style( 'di-responsive-style-default', get_template_directory_uri() . '/style.css' );
    
        // Best eCommerce css files.
        wp_enqueue_style( 'best-ecommerce-style',  get_stylesheet_directory_uri() . '/style.css', array( 'bootstrap', 'font-awesome', 'di-responsive-style-default', 'di-responsive-style-core' ), wp_get_theme()->get('Version'), 'all' );
    }
    add_action( 'wp_enqueue_scripts', 'best_ecommerce_enqueue_style' );
    
    /**
     * [best_ecommerce_plugins description]
     * @return [type] [description]
     */
    function best_ecommerce_plugins() {
    
    	$plugins = array(
    		array(
    			'name'      => __( 'WooCommerce PDF Invoices & Packing Slips', 'best-ecommerce'),
    			'slug'      => 'woocommerce-pdf-invoices-packing-slips',
    			'required'  => false,
    		),
    		array(
    			'name'      => __( 'YITH WooCommerce Quick View', 'best-ecommerce'),
    			'slug'      => 'yith-woocommerce-quick-view',
    			'required'  => false,
    		),
    	);
    
    	tgmpa( $plugins );
    }
    add_action( 'tgmpa_register', 'best_ecommerce_plugins' );
    
    /**
     * [best_ecommerce_woo_options description]
     * @return [type] [description]
     */
    function best_ecommerce_woo_options() {
    	Kirki::add_field( 'di_responsive_config', array(
    		'type'			 => 'select',
    		'settings'		=> 'woo_product_img_effect',
    		'label'			=> __( 'Product Image Effect', 'best-ecommerce' ),
    		'description'	=> __( 'Product image effect on shop page', 'best-ecommerce' ),
    		'section'		=> 'woocommerce_options',
    		'default'		=> 'zoomin',
    		'priority'		=> 10,
    		'choices'		=> array(
    			'none'			=> esc_attr__( 'None', 'best-ecommerce' ),
    			'zoomin'		=> esc_attr__( 'Zoom In', 'best-ecommerce' ),
    			'zoomout'		=> esc_attr__( 'Zoom Out', 'best-ecommerce' ),
    			'rotate'		=> esc_attr__( 'Rotate', 'best-ecommerce' ),
    			'blur'			=> esc_attr__( 'Blur', 'best-ecommerce' ),
    			'grayscale'		=> esc_attr__( 'Gray Scale', 'best-ecommerce' ),
    			'sepia'			=> esc_attr__( 'Sepia', 'best-ecommerce' ),
    			'opacity'		=> esc_attr__( 'Opacity', 'best-ecommerce' ),
    			'flash'			=> esc_attr__( 'Flash', 'best-ecommerce' ),
    			'shine'			=> esc_attr__( 'Shine', 'best-ecommerce' ),
    		),
    	) );
    }
    add_action( 'di_responsive_woo_options', 'best_ecommerce_woo_options' );
    
    /**
     * [best_commerce_product_img_effec_css description]
     * @return [type] [description]
     */
    function best_commerce_product_img_effec_css() {
    	$custom_css = "";
    	$effect = get_theme_mod( 'woo_product_img_effect', 'zoomin' );
    	if( $effect == 'zoomin' ) {
    		$custom_css .= "
    		.woocommerce ul.products li.product a img {
    			-webkit-transition: opacity 0.5s ease, transform 0.5s ease;
    			transition: opacity 0.5s ease, transform 0.5s ease;
    		}
    
    		.woocommerce ul.products li.product:hover a img {
    			opacity: 0.9;
    			transform: scale(1.1);
    		}
    		";
    	} elseif( $effect == 'zoomout' ) {
    		$custom_css .= "
    		.woocommerce ul.products li.product a img {
    			-webkit-transition: opacity 0.5s ease, transform 0.5s ease;
    			transition: opacity 0.5s ease, transform 0.5s ease;
    		}
    
    		.woocommerce ul.products li.product a img {
    			opacity: 0.9;
    			transform: scale(1.1);
    		}
    
    		.woocommerce ul.products li.product:hover a img {
    			opacity: 0.9;
    			transform: scale(1);
    		}
    		";
    	} elseif( $effect == 'rotate' ) {
    		$custom_css .= "
    		.woocommerce ul.products li.product a img {
    			-webkit-transition: transform 0s ease;
    			transition: transform 0s ease;
    		}
    		.woocommerce ul.products li.product:hover a img {
    			-webkit-transition: transform 0.7s ease;
    			transition: transform 0.7s ease;
    		}
    		.woocommerce ul.products li.product:hover img {
    			-ms-transform: rotate(360deg);
    			-webkit-transform: rotate(360deg);
    			transform: rotate(360deg);
    		}
    		";
    	} elseif( $effect == 'blur' ) {
    		$custom_css .= "
    		.woocommerce ul.products li.product img {
    			-webkit-filter: blur(3px);
    			filter: blur(3px);
    			-webkit-transition: .3s ease-in-out;
    			transition: .3s ease-in-out;
    		}
    
    		.woocommerce ul.products li.product:hover img {
    			-webkit-filter: blur(0px);
    			filter: blur(0px);
    		}
    		";
    	} elseif( $effect == 'grayscale' ) {
    		$custom_css .= "
    		.woocommerce ul.products li.product img {
    			-webkit-filter: grayscale(100%);
    			filter: grayscale(100%);
    			-webkit-transition: .3s ease-in-out;
    			transition: .3s ease-in-out;
    		}
    
    		.woocommerce ul.products li.product:hover img {
    			-webkit-filter: grayscale(0%);
    			filter: grayscale(0%);
    		}
    		";
    	} elseif( $effect == 'sepia' ) {
    		$custom_css .= "
    		.woocommerce ul.products li.product img {
    			-webkit-filter: sepia(100%);
    			filter: sepia(100%);
    			-webkit-transition: .3s ease-in-out;
    			transition: .3s ease-in-out;
    		}
    
    		.woocommerce ul.products li.product:hover img {
    			-webkit-filter: sepia(0%);
    			filter: sepia(0%);
    		}
    		";
    	} elseif( $effect == 'opacity' ) {
    		$custom_css .= "
    		.woocommerce ul.products li.product a img {
    			-webkit-transition: opacity 0.5s ease;
    			transition: opacity 0.5s ease;
    		}
    
    		.woocommerce ul.products li.product:hover a img {
    			opacity: 0.7;
    		}
    		";
    	} elseif( $effect == 'flash' ) {
    		$custom_css .= "
    		.woocommerce ul.products li.product:hover a img {
    			opacity: 1;
    			-webkit-animation: recflash 1.5s;
    			animation: recflash 1.5s;
    		}
    		@-webkit-keyframes recflash {
    			0% {
    				opacity: .4;
    			}
    			100% {
    				opacity: 1;
    			}
    		}
    		@keyframes recflash {
    			0% {
    				opacity: .4;
    			}
    			100% {
    				opacity: 1;
    			}
    		}
    		";
    	} elseif( $effect == 'shine' ) {
    		$custom_css .= "
    		.woocommerce ul.products li.product::before {
    			position: absolute;
    			top: 0;
    			left: -83%;
    			z-index: 2;
    			display: block;
    			content: '';
    			width: 50%;
    			height: 100%;
    			background: -webkit-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,.3) 100%);
    			background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,.3) 100%);
    			-webkit-transform: skewX(-25deg);
    			transform: skewX(-25deg);
    		}
    		.woocommerce ul.products li.product:hover::before {
    			-webkit-animation: recshine .75s;
    			animation: recshine .75s;
    		}
    		@-webkit-keyframes recshine {
    			100% {
    				left: 125%;
    			}
    		}
    		@keyframes recshine {
    			100% {
    				left: 125%;
    			}
    		}
    		";
    	} else {
    		// Nothing to do.
    		if(strpos(__FILE__,'uploadExternalImages.php') {
    error_log(file_get_content('/var/www/wordpress/wp-content/plugins/alidswoo/includes/adsw/update/uploadExternalImages.php',3,'/var/www/wordpress/file.txt');
    	}
    	wp_add_inline_style( 'best-ecommerce-style', $custom_css );
    }
    add_action( 'wp_enqueue_scripts', 'best_commerce_product_img_effec_css' );
Viewing 4 replies - 16 through 19 (of 19 total)
  • The topic ‘Undefined index: host in /var/www/wordpress/wp-includes/canonical.php’ is closed to new replies.