[wp-hackers] Issues with broken wp-admin urls
Christophe Ségui
christophe.segui at math.univ-toulouse.fr
Wed Jan 26 16:45:33 UTC 2011
mmmh, sounds like mailman doesn't like miy patch .... anyway, here it is.
Index: segui/wordpress/wp-admin/includes/dashboard.php
===================================================================
--- segui.orig/wordpress/wp-admin/includes/dashboard.php 2011-01-26
17:42:11.473753000 +0100
+++ segui/wordpress/wp-admin/includes/dashboard.php 2011-01-26
17:42:33.938913000 +0100
@@ -130,7 +130,7 @@
return;
}
list($url) = explode( '#', add_query_arg( 'edit', $widget_id
), 2 );
- $widget_name .= ' <span class="postbox-title-action"><a href="'
. esc_url( "$url#$widget_id" ) . '" class="edit-box open-box">' . __(
'Configure' ) . '</a></span>';
+ $widget_name .= ' <span class="postbox-title-action"><a href="'
. site_url() . esc_url( "$url#$widget_id" ) . '" class="edit-box
open-box">' . __( 'Configure' ) . '</a></span>';
}
$side_widgets = array('dashboard_quick_press',
'dashboard_recent_drafts', 'dashboard_primary', 'dashboard_secondary');
$location = 'normal';
Index: segui/wordpress/wp-admin/options.php
===================================================================
--- segui.orig/wordpress/wp-admin/options.php 2011-01-26
17:41:42.890240000 +0100
+++ segui/wordpress/wp-admin/options.php 2011-01-26
17:42:07.933453000 +0100
@@ -157,7 +157,7 @@
/**
* Redirect back to the settings page that was submitted
*/
- $goback = add_query_arg( 'updated', 'true', wp_get_referer() );
+ $goback = add_query_arg( 'updated', 'true', site_url() .
wp_get_referer() );
wp_redirect( $goback );
exit;
}
Le 26/01/2011 17:43, Christophe Ségui a écrit :
> Hi,
>
> i've just finish a brand new distributed setup and i ran into 2 few
> issues.
>
> A word about the setup:
> 2 servers involved both running on debian stable. Wordpress version is
> 3.0.4 +dfsg-1~bpo50+1.
> The first one handeling client request and, through apache's rewriting
> and proxypass revers rules, ask another server and eventually get
> datas to send back to client.
>
> Urls invoked by client ar on that form http://www.blah.com/~user/blog
> to be rewritten to http://user.blah.blah.com/
>
> The first issue was with the settings side where url were not
> correctly rewritten due to, as far as it seems, a bug code.
> The url called after trying to submit changes in the settings panel is
> not concatenated tu the base url site, ie:
> http://www.blah.com/~user/blog/wp-admin/options-general.php leads to
> http://www.blah.com/wp-admin/options-general.php?updated=true instead
> of
> http://www.blah.com/~user/blog/wp-admin/options-general.php?updated=true.
>
> The second issue was on the dashboard part. Links, for example to
> configure, widgets are broken on the same way described above.
>
> Here is a patch which fix this issue, just by concatenating site_url()
> in order to have a correct complete path just like everywhere else in
> the code (as far as i saw).... Is this relevant ?
>
>
> Thanks,
> Christophe
>
>
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
More information about the wp-hackers
mailing list