WordPress.org

Forums

Root Relative URLs
[resolved] Fix for the_permalink() issue with ecommerce plugin (8 posts)

  1. protohominid
    Member
    Posted 2 years ago #

    This question is for the developer. Firstly, I appreciate your work on this plugin, I use it on all my sites. I think this should be a built-in option in WP core. :-)

    I just ran into a conflict though with the Cart66 ecommerce plugin. Their plugin uses the "get_permalink()" function in order to create a hidden input field for a paypal checkout form. After much back and forth, we figured out that the Paypal Instant Payment Notifications (IPNs) were not working because the "notify_url" field was output with a value of "/store/ipn/" instead of the correct "http://sitename.com/store/ipn/".

    Is this something that could be resolved with your plugin? The Cart66 folks say they can't change their code. I modified their plugin code to get it working for now, but of course that's a major problem going forward because eventually we'll need to update the plugin and my edits will get removed.

    I'd really like to avoid disabling the Root Relative URLs plugin at this point, so I'm hoping somebody has an idea...

    Thanks again for your work!

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

  2. MarcusPope
    Member
    Plugin Author

    Posted 2 years ago #

    Well there are some options available to get around this problem, but they are limited and hacky if Cart66 isn't willing to modify code. In the worst case scenario I can check the callstack for the existence of specific functions found in cart66's code, and disable root relative logic for that method call only.

    The other option that I'm more inclined to implement is an admin setting whereby you can add certain URL's or partial URL's that should be ignored for URL modification. Assuming there is a very specific page that is being executed before the hand-off to PayPal, we could disable it for all links on that page.

    Since Cart66 is a licensed product I won't be able to inspect the callstack on my development machine. Would you be available to work with me on this issue? I could send you some code that you could temporarily implement, then if you could send me the results back I could fix my plugin without having access to cart66. Or if you could confirm that cart66 lite has the same functionality necessary to reproduce this issue I could probably work from that.

    Either way we can get this fixed in due time. And we both agree that this behavior should be part of the core to avoid these issues altogether!

    Thanks,
    Marcus

  3. protohominid
    Member
    Posted 2 years ago #

    Hey Marcus,

    Thanks for your response. For the site in question I just disabled your plugin since the site is already live and WP's absolute URLs shouldn't be an issue going forward.

    But, I do still like to use your plugin on all my other WP sites, as it makes going from local to live so much smoother. I like your idea of having an 'exceptions' list of pages in the plugin's admin settings. Seems like for the rare instance like the one I encountered with Cart66 this would work. Of course the problem is figuring out what the issue was in the first place so you'd know to add the exception!

    s

  4. hccdev
    Member
    Posted 2 years ago #

    Hi,

    I am trying to get your plugin to work with this business directory plugin

    http://wordpress.org/extend/plugins/business-directory-plugin/

    but the permalinks for the business directory plugin don't work when your plugin is activated. I read on this thread that you are eventually going to allow the option to disable your plugin on specific pages. Is there anything I can do in the mean time to block your plugin from one of my pages?

  5. MarcusPope
    Member
    Plugin Author

    Posted 2 years ago #

    @hccdev - The best thing I can suggest is that you disable the plugin on your production server. Using this on a developement and staging server is good for preserving links and assets as root relative links. As long as you are not added content via your production instance, you should be good to go.

    I'm working on the new feature now but my time is extremely limited with a 5mo and a new job at a startup as director of development :/

  6. MarcusPope
    Member
    Plugin Author

    Posted 2 years ago #

    @protohominid, I've added a feature to blacklist urls, it's available on the General settings page. This is the best that I can do to support 3rd party plugins.

  7. protohominid
    Member
    Posted 2 years ago #

    Thanks Marcus, that should help in situations like a few of us are having.

    On another note, I recently was alerted to the fact that the WordPress RSS feed should have absolute URLs to be the most compatible with RSS Readers... And of course, your plugin changes that. Do you think that's something to worry about? It seems like the feeds are working fine in my readers, but the validator at http://feedvalidator.org doesn't like relative URLs.

    I was wondering about creating a custom theme template for the feed, but I suppose that would require some kind of hook or filter to disable your plugin in just that view. Thoughts?

    Thanks again for your hard work and congrats on the youngster. :-)

  8. MarcusPope
    Member
    Plugin Author

    Posted 2 years ago #

    Actually, my plugin handles RSS feeds already. Although to make a point, all RSS readers are fully capable of dealing with root relative URLs, even though some of the big names out there do not conform to the URL spec that was established way back in 1994. But you can check your feeds by viewing the source for the page when you browser the feed url. WordPress has hooks for most of the feed formats for me to switch url modes.

    If that isn't working for you let me know and I'll investigate. Thanks for the congrats, she's had a rough month with three different illnesses but that's what happens when you start using daycare :D

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Root Relative URLs
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic