• ResolvedPlugin Author MarcusPope

    (@marcuspope)


    After a number of reports from the wild that this plugin wasn’t working for people I was able to pinpoint the problem to my use of function references, a php 5.3+ feature.

    Many thanks to people like Michael Sogos & Brian Dichiara for point this issue out. I should have the problem resolved by tomorrow or Monday at the latest.

    -Marcus Pope

    http://wordpress.org/extend/plugins/root-relative-urls/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author MarcusPope

    (@marcuspope)

    Ok, as promised I have updated both plugins to use declared functions and array function references instead to support php versions < 5.3. This should resolve all activation problems.

    Thanks!
    Marcus Pope

    Nice job taking this initiative. I hope this will move to the WP core some day (saw the discussion in the trac). Finally it will be a breeze to run deployment tools without having to worry about finding and replacing urls.

    Plugin Author MarcusPope

    (@marcuspope)

    Thanks for the kudos! I couldn’t live without such a feature, and I’m making it my personal mission to have the core refactored by end of next year. It was going to be this year, but if you also happened to catch the debate on wp-hackers you’d discover how difficult of a challenge it will really be to convince a very small group of people how invaluable the concept really is.

    Let me know if you run into any problems. So far i have only discovered one bug – comment links in rss feeds are output as relative links and they have no filter for me to bind to. A ticket is already open in trac but there is no timeline associated with it yet. But it’s a rarely used function anyway and the post link itself is dynamically rendered as absolute.

    Thanks!
    – Marcus

    Plugin Author MarcusPope

    (@marcuspope)

    Btw, in case anyone is wondering – there’s not a chance in hell the core will refactor this architecture flaw (straight from the horse’s mouth actually.) So I’ll pick better battles to fight 🙂 But the good news is I still use this plugin for a number of clients and I will keep up the maintenance while I’m forced to work with wordpress.

    Thank you very much for this plugin, I could not believe seeing absolute urls in database content – I assumed this was a braindead technique from the phpnuke-days, very disturbing to see wp devs sticking to this wrong and painful practice.

    BTW, do you have a link to a description of the architectural flaw and it´s consequences, it´s state in 2012 and what can be done about this?

    THANKS!

    Plugin Author MarcusPope

    (@marcuspope)

    @bughunter – I don’t have a complete synopsis of the problem in any one given location but I’m planning on a full write up of the situation for my new blog. Development is pretty close to finished but depending on my workload at the office it may be a few months.

    The architectural flaw is the fact that absolute urls are kept in the database plain and simple. There are a number of bugs that result from this, as well as a number of hacks that have been implemented on top of absolute urls to try to mitigate their effects. Basically there’s not much that can be done without forking the platform because many members of the core team don’t understand how urls are parsed according to the w3c specifications. Starting with 1808 or maybe even 1630 the rfc specifications have always allowed for root relative urls and 99% of the software built around the web adhere to this spec that dates back to 1995. Google Reader is an example of an exception that doesn’t properly parse urls – at least the last time I checked anyway.

    A smaller part of the core team would just rather not make such a huge architectural change because it could potentially affect so many people – though they are amenable to the concept of root relative urls.

    It is crazy that nearly two decades after the standard was created that we’ve taken such a huge step back.

    Hi Marcus,

    The bug is back in version 1.5 of the plugin!!!

    Unless you have php 5.3 or later, you get the following error when installing the plugin:

    Parse error: syntax error, unexpected T_FUNCTION in /wp-content/plugins/root-relative-urls/sb_root_relative_urls.php on line 533.

    If you are upgrading from a previous version, the site simply crashes with the error message until you delete the /wp-content/plugins/root-relative-urls plugin folder.

    The problem is in the line following new line of code:
    add_filter(‘redirect_canonical’, function($redirect, $requested) {

    For more information see the Beware section of the WordPress function reference for the add_filter() function.

    While you are at it, I was on your WordPress support page today and noticed that all of the download links point to v1.4 of the plugin in the Old Version list. Fortunately that was the version I needed to revert back. It also lists v1.4 as the current version.

    Hopefully you’ll be able to fix these two issues before you stop working on the plugin for a while.

    Plugin Author MarcusPope

    (@marcuspope)

    Ugh, I knew exactly what went wrong when I reached php 5.3 in your comment 🙁 Sorry about that, I just committed a patch so you should see 1.6 here in the next 15 min or so.

    I write in php 5.3 all day long at my job and even when I wrote the code I remember thinking, well let’s just see if this works before I break it out of this code block…

    Thanks for all of the support info, and I’ll update those links tonight.

    -Marcus

    Wonderful! But well, maybe it’s so simple that i don’t understand… wnere do i setting my new (different) domain?

    Thank you, and say hello to her!

    Alessio

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Plugin: Root Relative URLs] FYI, I'm currently adding’ is closed to new replies.