• Resolved tpmilley

    (@tpmilley)


    David,

    I noticed that after upgrading to 2.3.1 my Code Embed URL’s no longer work, and I’m getting the following errors in my server logs:

    PHP Warning: strpos(): Offset not contained in string in /~/wp-content/plugins/simple-embed-code/includes/add-embeds.php on line 148
    20180520T133801: https://www.westminsterastro.net/index.php

    PHP Warning: Illegal string offset ‘file’ in /~/wp-content/plugins/simple-embed-code/includes/add-embeds.php on line 154

    I have a URL at the bottom of my home page that is no longer processing through code embed, even though I haven’t changed anything on the page. In fact I think the warnings are causing my homepage not to even load any more. I can get to sub pages, but only by manually navigating to them. I’m assuming that the two warnings are actually stopping it from running at all. the above URL is to the “NASA Astronomy Picture of the Day” which was loading fine before I updated Code Embed on Friday.

    Now the text loads, but not the image. If I right click on it and tell it to load in a different tab, it loads the media immediately.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author David Artiss

    (@dartiss)

    Hey Tom,

    Are you able to provide me with the URL that you have embedded?

    Also, can you head into the Code Embed settings screen and confirm nothing on there has changed?

    Thread Starter tpmilley

    (@tpmilley)

    Hi David,

    Sure. One is: %https://www.westminsterastro.net/BearBranchAstrospheric.html%
    The other is:
    %https://www.westminsterastro.net/astronomy-photo-of-the-day/%

    The photo page starts to load but the media (actual picture) no longer loads, and the warning message shows up in the logs now.

    tom

    Plugin Author David Artiss

    (@dartiss)

    Tom,

    Can you try version 2.3.2, as I believe this will fix the issue?

    Thread Starter tpmilley

    (@tpmilley)

    David,

    I installed 2.3.2, and that fixes it. My home page loads again, and the NASA Picture of the Day also loads in all browsers! Thanks for the help.

    Tom

    Plugin Author David Artiss

    (@dartiss)

    Ah, that’s brilliant Tom.

    Yeah, I made a minor change to the routine that handles file embedding and that was incorrect. However, even correcting that didn’t fix it and the code was a nightmare – I wrote it years ago and, for the life of me, I couldn’t work out how it ever worked. Anyway, I’ve re-written it from scratch, so all should be well once again ??

    Apologies for the inconvenience and thanks for your patience.

    Thread Starter tpmilley

    (@tpmilley)

    David,

    Thanks again. Sorry to cause all the bother.

    The longer I do coding the more important I’ve learned it is to comment, comment comment!

    It makes troubleshooting soo much easier 2-5 years from now when I go into an old PHP page and try to fix a broken data call or update syntax to comply with some new standard, I can quickly fix antequated syntax structures, like when the MySQL community went from Mysql to Mysqli syntax a few years ago. My comments to myself saved hours of work, that and the Alpha Editor (Written in TCL/TK) which can do search and replaces across an entire folder structure’s worth of files, which is a huge time saver!

    So all is well, and Code Embed is saving me a lot of time that I’d otherwise have to be custom coding in WP! Thanks for all you do and are doing to make WP even easier to use!

    Tom

    • This reply was modified 6 years, 6 months ago by tpmilley.
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘2.3.1 URL’s Broken’ is closed to new replies.