Support » Plugin: Root Relative URLs » Undefined index notice when inserting image in editor

  • Resolved michielvoo


    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

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


    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.


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

    Plugin Author MarcusPope


    @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.

    Great, thanks!

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Undefined index notice when inserting image in editor’ is closed to new replies.