Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bloginfo('wpurl') rewrite breaks plugin compatibility #104

Closed
johnraz opened this issue Jul 30, 2011 · 5 comments
Closed

bloginfo('wpurl') rewrite breaks plugin compatibility #104

johnraz opened this issue Jul 30, 2011 · 5 comments

Comments

@johnraz
Copy link
Contributor

johnraz commented Jul 30, 2011

It seems it's not a best practice to use the filter on bloginfo('wpurl') to make url root relative.

See my finding here and why it broke the plugin:

http://wordpress.org/support/topic/wrong-bloginfowpurl-usage?replies=6#post-2254388

I don't know yet what can be done to fix this - @swalkinshaw probably knows this area better than I do ;-)

Edit: for now I moved line 95 to 117 in roots-cleanup.php to fix this in the admin side.
@swalkinshaw can you explain why you need this root_relative_url thingy exactly ?

@swalkinshaw
Copy link
Member

root_relative_url isn't needed. It's just a feature and a part of @retlehs philosophy and view that websites should be simple and clean. Unfortunately, WordPress makes that almost impossible to do. WP plugins are all made differently so messing with WP like roots does definitely has drawbacks.

I think the only thing we can do is just add an option for the "clean" URLs. If someone ever has a problem they can just disable it. Or if someone really wanted to, they could go through roots-cleanup.php and selectively change things until the specific problem is fixed.

@swalkinshaw
Copy link
Member

I just searched through roots and we don't even use bloginfo('wpurl') or bloginfo_url. Technically, we could just remove this line:

add_filter('bloginfo_url', 'roots_root_relative_url');

and it would fix your problem. Unless some other function we are using uses bloginfo_url since I haven't looked into. But I still think the best solution is just to offer an option and document what effect it has.

@johnraz
Copy link
Contributor Author

johnraz commented Jul 30, 2011

I agree with the optional behavior and maybe add something about this in the doc ? Like a known issue section or something ?

Thanks for your time anyway ;-)

@retlehs
Copy link
Sponsor Member

retlehs commented Jul 30, 2011

just made it so that root relative urls won't happen in the admin :)

this ticket will remain open until we also add a theme option to enable/disable root relative urls

@retlehs
Copy link
Sponsor Member

retlehs commented Jul 31, 2011

note: i just realized that by doing this that uploaded media within the wp admin no longer has root relative URLs on the link URLs (possibly some other issues that i'm forgetting about/missing), looking into what we can do to support that without breaking other things.

retlehs added a commit that referenced this issue Aug 5, 2011
don't need it - currently using it on comment avatars and hidden comment
inputs. also tweaked root relative attachment urls (refs #104) so that
they're enabled in admin but still disabled in feed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants