Support » Plugin: Relative URL » Notice: Undefined index: host

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Tunghsiao Liu

    (@sparanoid)

    Just updated this plugin, could you help me test if it worked for you? thanks!

    I’m still getting this notice, using 0.1.2 and WP 4.2.2

    Plugin Author Tunghsiao Liu

    (@sparanoid)

    Could you provide more information about your WordPress setup?

    – Currently activated theme?
    – Could you try switch to other themes and see this notice?
    – Can you try deactivate all other plugins to see if the notice exists?
    – Could you upgrade your WordPress to latest version and see if this notice still exists?

    Thanks!

    I’m experiencing the same issue with WordPress 4.6.1 now.

    I investigated that the theme.php sets up it’s host path for some script including:

    
    $admin_origin = parse_url( admin_url() );
    	$home_origin  = parse_url( home_url() );
    	$cross_domain = ( strtolower( $admin_origin[ 'host' ] ) != strtolower( $home_origin[ 'host' ] ) );
    

    As you see they are applying the php function parse_url to there intern home_url function. This will return only a path (for the admin_url: /wp-admin/) and is empty for home_url.
    I found out, that the functions work correctly and determined the correct url’s, but then they are passing this to the home_url filter and I think that the plugin hooks in there and will remove the host (to make it relative) but this will break later working with the path (e.g. with parse_url).

    • This reply was modified 1 year, 5 months ago by  jdoubleu. Reason: code block update
    Plugin Author Tunghsiao Liu

    (@sparanoid)

    You can try the latest version to see if this issue is resolved. Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Notice: Undefined index: host’ is closed to new replies.