WordPress.org

Support

Support » Plugins and Hacks » WordPress MU Domain Mapping » [Resolved] [Plugin: WordPress MU Domain Mapping] Undefined index: HTTPS

[Resolved] [Plugin: WordPress MU Domain Mapping] Undefined index: HTTPS

  • When working in WordPress debug mode, I see the following warnings:

    Notice: Undefined index: HTTPS in /path/to/wordpress-mu-domain-mapping/domain_mapping.php on line 545

    Notice: Undefined index: HTTPS in /path/to/wordpress-mu-domain-mapping/domain_mapping.php on line 546

    This was dicussed 10 months ago in this post, but the conclusion was not really clear to me. Should I just ignore the warning or change the plugin code?

Viewing 15 replies - 1 through 15 (of 21 total)
  • Plugin Author Ron Rennick

    @wpmuguru

    Have you checked to see if a new version has been released in the last 10 months? And, if it has, are you using it?

    Yes, I´m using the latest version (0.5.4) – downloaded two days ago from WordPress´ Plugin Directory. I´m using this on a fresh WP Multisite install.

    (To avoid any confusion: I´m not the author of the post that was submitted 10 months ago. I found it today looking for a solution. Thought it could be useful to link to it in this post.)

    Plugin Author Ron Rennick

    @wpmuguru

    The latest is 0.5.4.1 but the repo still shows (and I assume downloads) 0.5.4. I’ll have to bump svn.

    Plugin Author Ron Rennick

    @wpmuguru

    I’ll have to get someone to give it a nudge. Putting through a small change didn’t trigger an update in the repo.

    Plugin Author Ron Rennick

    @wpmuguru

    Try re-downloading it and see if you still have the warnings. If you hover over the download link it is downloading 0.5.4.1.

    If you still have warning can you at least provide the line numbers they are on.

    I´ve updated the plugin from WP´s dashboard and it now shows “Version 0.5.4.1”, so that should be ok.

    The alerts are still there unfortunately:

    Notice: Undefined index: HTTPS in /path/to/wordpress-mu-domain-mapping/domain_mapping.php on <strong>line 545 </strong>

    Notice: Undefined index: HTTPS in /path/to/wordpress-mu-domain-mapping/domain_mapping.php on <strong>line 546</strong>

    I´ve cleared my browser cache and checked in different browers. Could it be my server set up?

    Many thanks for your help Ron, let me know if you need more specific information.

    Andrea Rennick

    @andrea_r

    Customer Care at Copyblogger Media and Studiopress

    Do you have debugging turned on?

    Yes, I´ve debugging on while working on a simple theme. I´ll turn it off later. That was actually my initial doubt: if I should just ignore this warning or if it was something important.

    It’s a simple error in the code; the author is using an == where there should be an =, which leads to a missing index in the request. I can’t upload a patch here, but if you change line 545 from

    $_SERVER[ ‘HTTPS’ ] == ‘Off’;

    to

    $_SERVER[ ‘HTTPS’ ] = ‘Off’;

    Then you’ll fix the error.

    Plugin Author Ron Rennick

    @wpmuguru

    Thanks. An environment that had it set wouldn’t see any warnings.

    http://plugins.trac.wordpress.org/timeline?from=2011-07-21T02%3A13%3A58Z&precision=second

    No probs, thanks for the quick application of the fix. The environment will have it set already if it’s using HTTPS, so no errors would be seen, but non HTTPS servers with the appropriate PHP error_reporting settings would see it. Aside from the warning, the behaviour was still correct anyway, as it treats the undefined index the same as off 🙂

    Thanks Elyobo and Ron!

    I´ll wait for version 0.5.4.2 to come available on the repo.

    Plugin Author Ron Rennick

    @wpmuguru

    I´ll wait for version 0.5.4.2 to come available on the repo.

    Don’t wait for a release, get the development version (other versions in the sidebar) which has the fix. We don’t release a new version every time we fix a warning.

    @ron: That makes sense 🙂

    For others having the same issue:
    Replacing the domain_mapping.php file on the server didn´t work for me: the file was not updated (maybe because the code change is so small).

    So I actually went into the Plugin Editor and updated the script from the WP Dashboard. Here are my fool-proof instructions 😉

    1. Go to “Site Admin” => “Plugins” and click the “Edit” link below the “WordPress MU Domain Mapping” entry.
    2. Make sure the file “wordpress-mu-domain-mapping/domain_mapping.php” is selected in the menu on the right
    3. Copy the code to Notepad++ or any other editor you use
    4. Change line 545 from $_SERVER[ 'HTTPS' ] == 'Off'; to $_SERVER[ 'HTTPS' ] = 'Off';
    5. Update the plugin version number on top from 0.5.4.1 to 0.5.4.2
    6. Paste the updated code in the WP Plugin Editor and hit “Update File”
      Go back to the Plugin menu and make sure the version number is updated to Version 0.5.4.2
    Plugin Author Ron Rennick

    @wpmuguru

    Replacing the domain_mapping.php file on the server didn´t work for me: the file was not updated (maybe because the code change is so small).

    Thanks 🙂 I checked and discovered there’s more than one instance of that line of code. I only fixed one of them. I’ll see if I can fix the others later today.

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘[Resolved] [Plugin: WordPress MU Domain Mapping] Undefined index: HTTPS’ is closed to new replies.
Skip to toolbar