WordPress.org

Ready to get started?Download WordPress

Forums

maybe bug - wp-admin edit.php pagination uses server IP instead of server name (2 posts)

  1. davidosomething
    Member
    Posted 2 years ago #

    screenshot -- see url (local dev), status bar (ip being used), and the link is any of the pagination links

    http://screencast.com/t/qxEtfijd

    The WP_HOME and WP_SITEURL constants are defined (as well as WP_CONTENT_DIR and URL in this particular instance). The settings admin panel shows these set correctly (and disabled).

    I did a cat |grep 33.33.33.10 of my SQL dump to see if there were any references in the database. In this case no.

    The source for edit.php suggests that the pagination urls are using admin_url(), but I'm not positive it is. Maybe it's using some $_SERVER[] variable or something instead.

    The IP (33.33.33.10) is because my WP install is served on a host-only network connection through a VM created using vagrant/virtualbox. My host machine (where the VM is running off of) uses its local instance of apache to proxy to the domain a la this virtual host:

    <VirtualHost *:80>
      ServerName        truth2012.dev
      ProxyPreserveHost Off
      ProxyPass         / http://33.33.33.10/
      ProxyPassReverse  / http://33.33.33.10/
    </VirtualHost>

    This bug affects all pagination links in my admin, including users and custom post types.

  2. davidosomething
    Member
    Posted 2 years ago #

    never mind, fixed with this:

    if ( ! empty( $_SERVER['HTTP_X_FORWARDED_HOST'] ) ) {
        $_SERVER['HTTP_HOST'] = $_SERVER['HTTP_X_FORWARDED_HOST'];
    }

Topic Closed

This topic has been closed to new replies.

About this Topic