WordPress.org

Ready to get started?Download WordPress

Forums

WordPress MU Domain Mapping
Warnings when in WordPress debug mode (code patch) (7 posts)

  1. Dean Taylor
    Member
    Posted 2 years ago #

    Hi,

    The WordPress MU Domain Mapping plugin produces warnings / errors when "wp-config.php" has "WP_DEBUG" set to "true".

    I require WP_DEBUG to be true as I am developing multiple plug-ins for a WordPress site.

    I have a code patch for the current TRUNK version http://plugins.trac.wordpress.org/browser/wordpress-mu-domain-mapping/trunk?rev=453841.

    Index: domain_mapping.php
    ===================================================================
    --- domain_mapping.php	(revision 453847)
    +++ domain_mapping.php	(working copy)
    @@ -3,7 +3,7 @@
     Plugin Name: WordPress MU Domain Mapping
     Plugin URI: http://ocaoimh.ie/wordpress-mu-domain-mapping/
     Description: Map any blog on a WordPress website to another domain.
    -Version: 0.5.4.2
    +Version: 0.5.4.2 (+ @DeanMarkTaylor bug fixes for debug mode warnings).
     Author: Donncha O Caoimh
     Author URI: http://ocaoimh.ie/
     */
    @@ -379,7 +379,7 @@
     				exit;
     			break;
     		}
    -	} elseif( $_GET[ 'action' ] == 'delete' ) {
    +	} elseif( isset($_GET[ 'action' ]) && $_GET[ 'action' ] == 'delete' ) {
     		$domain = $wpdb->escape( $_GET[ 'domain' ] );
     		if ( $domain == '' ) {
     			wp_die( __( "You must enter a domain", 'wordpress-mu-domain-mapping' ) );
    @@ -455,7 +455,7 @@
     	$domains = $wpdb->get_results( "SELECT * FROM {$wpdb->dmtable} WHERE blog_id = '{$wpdb->blogid}'", ARRAY_A );
     	if ( is_array( $domains ) && !empty( $domains ) ) {
     		$orig_url = parse_url( get_original_url( 'siteurl' ) );
    -		$domains[] = array( 'domain' => $orig_url[ 'host' ], 'path' => $orig_url[ 'path' ], 'active' => 0 );
    +		$domains[] = array( 'domain' => $orig_url[ 'host' ], 'path' => (empty($orig_url[ 'path' ]) ? '' : $orig_url[ 'path' ]), 'active' => 0 );
     		echo "<h3>" . __( 'Active domains on this blog', 'wordpress-mu-domain-mapping' ) . "</h3>";
     		echo '<form method="POST">';
     		echo "<table><tr><th>" . __( 'Primary', 'wordpress-mu-domain-mapping' ) . "</th><th>" . __( 'Domain', 'wordpress-mu-domain-mapping' ) . "</th><th>" . __( 'Delete', 'wordpress-mu-domain-mapping' ) . "</th></tr>\n";
    @@ -641,7 +641,7 @@
     }
    
     function redirect_login_to_orig() {
    -	if ( !get_site_option( 'dm_remote_login' ) || $_GET[ 'action' ] == 'logout' || isset( $_GET[ 'loggedout' ] ) ) {
    +	if ( !get_site_option( 'dm_remote_login' ) || (isset($_GET[ 'action' ]) && $_GET[ 'action' ] == 'logout') || isset( $_GET[ 'loggedout' ] ) ) {
     		return false;
     	}
     	$url = get_original_url( 'siteurl' );

    I was wondering if this patch could be "officially" applied to the plugin's repository?

    It would also be nice to see an official plugin update containing these changes. Is this likely to occur? What is the process for a release?

    Cheers,
    Dean.

    http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/

  2. Dean Taylor
    Member
    Posted 2 years ago #

    I have created a ticket to track this:
    http://plugins.trac.wordpress.org/ticket/1406

  3. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 2 years ago #

    Sorry, I don't get any notifications from that trac. I won't be doing anything to update that ticket.

    The warnings you fixed above were already reported in at least a couple threads.

    If you are providing a patch to a plugin/theme in the future, put the patch in pastebin or similar and post a link in the forum. For any plugins that I'm a contributor on, my contact form is http://ronandandrea.com/contact/.

    Is this likely to occur? What is the process for a release?

    Since both Donncha & I do updates to the plugin in our spare time, new releases, updates, etc. are largely dictated by available spare time. Assuming one of us has time to do so, we'll probably do a maintenance release in the vicinity of WP 3.3.

  4. Dean Taylor
    Member
    Posted 2 years ago #

    Hi Ron,

    Thanks for responding.

    Totally understand the spare time element of your work on this plugin.

    If there is any further action you would like me to take, please do let me know.

    Just a note: It might be an idea to highlight the process for reporting bugs / providing patches within the description of the plugin for others.

    Cheers and again thanks for responding,
    Dean.

  5. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 2 years ago #

    Unfortunately, if I put my contact link in the readme, most people would use my contact form for support rather than posting here in the forum. The first 5 sites on my profile (http://wordpress.org/support/profile/wpmuguru) have a contact form or a link to one.

  6. Dean Taylor
    Member
    Posted 2 years ago #

    Cheers Ron, keep up the good work.

  7. Dean Taylor
    Member
    Posted 2 years ago #

    Cheers Ron, keep up the good work.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic