WordPress.org

Ready to get started?Download WordPress

Forums

Root Relative URLs
[resolved] Undefined index notice when inserting image in editor (5 posts)

  1. michielvoo
    Member
    Posted 1 year ago #

    When inserting an image in the editor, the plugin will cause a notice in the root_relative_media_urls() method. It's trying to parse the URL of the selected image to find its scheme and host. But it seems that the scheme and host are already stripped from the URL. When the method tries to do $p['scheme'] it causes an undefined index notice.

    Version of plugin: 1.7

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

  2. MarcusPope
    Member
    Plugin Author

    Posted 1 year ago #

    Hrm, I'll do my best to remove the notice, but without yet looking at the code I'm going to wager that it's not avoidable considering the hacks I've had to implement to get root relative urls to begin with.

    Since it is a notice, I'll have to prioritize this to the bottom of the stack as there are some logic bugs that need fixing first. But I'll leave this open and unresolved until I get a chance to fix it.

    Thanks,
    Marcus

  3. najamelan
    Member
    Posted 1 year ago #

    well, so in ajax it does matter not to have notices... see the other thread about WP 3.5

  4. MarcusPope
    Member
    Plugin Author

    Posted 1 year ago #

    @michielvoo - thanks for the bug report. I guess wordpress core devs finally understand the merit of root relative urls... progress. 1.8 should fix the problem for you.

    @najamelan - although it does matter wrt ajax requests for json, the solution to that problem is to not display errors to the browser. That's a really unsafe configuration for production servers. In this case a bug would result regardless of the notices but errors should always be logged to the filesystem outside of the web root.

  5. michielvoo
    Member
    Posted 1 year ago #

    Great, thanks!

    What do you mean that WordPress devs finally understand the merit, something changed in the latest WordPress release?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags