WordPress.org

Ready to get started?Download WordPress

Forums

Jetpack by WordPress.com
[resolved] "Notice: Undefined index: scheme in class.jetpack-post-images.php" (8 posts)

  1. WolfieZero
    Member
    Posted 5 months ago #

    Hi,

    I keep getting this notice on in my error display.

    Notice: Undefined index: scheme in site/content/plugins/jetpack/class.jetpack-post-images.php on line 201

    The media I'm using is stored correctly in WordPress but I'm removing the domain reference and calling it from an absolute location, a la /content/uploads/2009/07/video.png

    Any ideas?

    Thanks!

    https://wordpress.org/plugins/jetpack/

  2. Richard Archambault
    Happiness Engineer
    Plugin Author

    Posted 5 months ago #

    Hi!

    s but I'm removing the domain reference and calling it from an absolute location

    How are you doing this, exactly? Also, does this still happen after upgrading to version 2.9, which came out yesterday?

  3. WolfieZero
    Member
    Posted 5 months ago #

    I'm removing the domain manually via the editor or just doing a search and replace in the DB on the post_content field. Also I've updated Jetpack to 2.9 now and it still happens :(

  4. Richard Archambault
    Happiness Engineer
    Plugin Author

    Posted 5 months ago #

    Yup, that code checks for full image URLs so will fail with the removal of the domain reference and http://. Any particular reason you are doing that?

  5. WolfieZero
    Member
    Posted 5 months ago #

    Yeah, it's for ease of multiple environments. I'm working on multiple dev environments and a staging one so there are different URLs for each. Bit of an odd setup for WordPress I know but makes my life that bit easier :)

    Thanks.

  6. Richard Archambault
    Happiness Engineer
    Plugin Author

    Posted 5 months ago #

    Well, our code doesn't account for that. If you'd like to create a Pull Request or an enhancement request to account for setups like yours, you're welcome to!

    https://github.com/Automattic/jetpack/issues/new

  7. WolfieZero
    Member
    Posted 5 months ago #

    Ah fair enough. I'll look and see about helping with that bit of code then, luckily it's only a notice so nothing serious.

    Thanks for the help! :)

  8. Mark Rowatt Anderson
    Member
    Posted 5 months ago #

    I've created a pull request to fix this.

    I think this is slightly more serious than "just a notice" - the code is used (in my case at least) by the OpenGraph functions in Jetpack and as it stands the OpenGraph image tags inserted will be incorrect for root relative urls.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags