Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • I’m getting the exact same “register_http_request_failed” error.

    So wait, did yours just start working like that?
    Is it my installation of WordPress or my host that’s giving me this problem?

    Thread Starter bruno

    (@bluesbruno)

    I had a feeling that’s what it was.
    Thank you!

    Thread Starter bruno

    (@bluesbruno)

    In Settings -> General the settings are:
    WordPress address (URL): brunovargas.com/wp
    Site address (URL): brunovargas.com

    My permalink structure is:
    Custom Structure: /%category%/%postname%/

    ______________

    The theme calls for a function called media_buttons(), which is described at the end of the template file p2.php.

    function media_buttons() {
    		include_once ABSPATH . '/wp-admin/includes/media.php';
    		ob_start();
    		do_action( 'media_buttons' );
    		return P2::make_media_urls( ob_get_clean() );
    	}
    
    	/**
    	 * Make sure the URL is loaded from the same domain as the frontend
    	 */
    	function url_filter( $url, $path = '' ) {
    		$parsed = parse_url( $url );
    		$host = ( isset( $parsed['host'] ) ) ? $parsed['host'] : '';
    		if (!false === strpos( 'http', $url) )
    			return preg_replace( '|https?://'.preg_quote( $host ).'|', get_bloginfo( 'url' ), $url );
    		return $url;
    	}
    
    	function admin_url( $path ) {
    		return P2::url_filter( admin_url( $path ) );
    	}
    
    	function make_media_urls( $string ) {
    		// This line does not work in .org
    		return str_replace( 'media-upload.php?', P2::admin_url( 'media-upload.php?p2-upload=true&' ), $string );
    	}
    }

    I’m trying to figure out exactly what part of this code is adding the extra folder on the uploaded image URL.

    Thread Starter bruno

    (@bluesbruno)

    I have checked them.
    Settings-> Media. Where it says:

    Uploading Files
    Store uploads in this folder: wp-content/media
    Full URL path to files : <it’s blank>
    Organized my uploads into month- and year-based folders: Is checked.

    I have previously allowed it to upload to the default wp-content/uploads but I had the same problem.

    Any other suggestions?

    Thread Starter bruno

    (@bluesbruno)

    CORRECTION (I can’t edit my post)

    Example:
    It directs the image link to
    http://brunovargas.com/wp/wp/wp-content/media/2010/11/caguamacast4.jpg
    Where it should be:
    http://brunovargas.com/wp/wp-content/media/2010/11/caguamacast4.jpg

    Thanks again 😀

Viewing 5 replies - 1 through 5 (of 5 total)