• Resolved Matt Schofield

    (@mattschofield)


    Hi

    Since 1.9.104, we’re getting the following php warning in our error log every time a visit occurs on a page containing an embedded YouTube video

    [15-Nov-2022 11:41:47 UTC] PHP Warning: Undefined array key "query" in /home/obfusc/public_html/wp-content/plugins/schema-and-structured-data-for-wp/admin_section/common-function.php on line 3653

    All pages continue to pass all markup tests without error. Thanks for looking.

    # WordPress Configuration
    Version: 6.1
    Language: en_GB

    # Webserver Configuration
    PHP Version: 8.0.24
    MySQL Version: 5.7.39
    Webserver Info: Apache

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Magazine3

    (@magazine3)

    Sorry for the inconvenience. Can you please share the URL of the site if possible?

    Thread Starter Matt Schofield

    (@mattschofield)

    @magazine3 Adult social care training

    I didn’t think to add, but the embedded YouTube videos are on WordPress Private Pages (password protected) created for customers. I’m unable to provide passwords to those pages. The site doesn’t have any embedded YouTube videos on any publicly accessibly pages. Thanks, Matt

    Plugin Author Magazine3

    (@magazine3)

    This is the valid one. For this, We have raised the GitHub ticket in our repository. We will fix this and get back to you with an update soon.

    Here is the reference GitHub link: https://github.com/ahmedkaludi/schema-and-structured-data-for-wp/issues/1784

    Plugin Author Magazine3

    (@magazine3)

    We have fixed this in our latest update 1.9.105. Can you please check once by updating the plugin to the latest version and let us know back if you face any issues? So that we will help you to fix them.

    Thread Starter Matt Schofield

    (@mattschofield)

    Hi

    Unfortunately on 1.9.105 the error is still being reported in our error log when visiting pages containing embedded YouTube videos. However, it now reports on line 3730 instead of 3653.

    `[29-Nov-2022 07:02:17 UTC] PHP Warning: Undefined array key “query” in /home/obfusc/public_html/wp-content/plugins/schema-and-structured-data-for-wp/admin_section/common-function.php on line 3730′

    Plugin Author Magazine3

    (@magazine3)

    Sorry for the inconvenience. We have tested this on our end but not getting these errors. Can you please show us where you are getting these errors? If possible please share a short video to replicate the issue, So that we will test the same and help you to fix them.

    Thread Starter Matt Schofield

    (@mattschofield)

    I’m not sure what else I can add that’s of use.

    # WordPress Configuration
    Version:                   6.1.1
    Language:                  en_GB
    Permalink Structure:       /%category%/%postname%/
    Memory Limit:              256M

    # Webserver Configuration
    PHP Version: 8.1.12
    MySQL Version: 5.7.39
    Webserver Info: Apache

    We’re embedding the YouTube videos within our pages using the WordPress Gutenberg block editor. The pages we embed videos on are all Password Protected, using the native WordPress password protection. Some of the videos we embed are “Unlisted” on YouTube, but this doesn’t affect their URL’s. The pages that the videos are embedded in do not have a schema applied to them of any kind. The error notice I mentioned is being written to our /public_html/error_log whenever any page containing embedded videos is visited. The videos don’t need to be interacted with to cause the error to be reported.

    If there’s any other info you need that might be helpful please let me know. Thanks again for looking.

    • This reply was modified 2 years, 7 months ago by Matt Schofield. Reason: spell
    Thread Starter Matt Schofield

    (@mattschofield)

    @magazine3 This is now resolved. Issue detailed below

    I discovered that one of the embeded YouTube video URL’s did not contain the path /watch

    So we had https://youtu.be/UniQUEsTring (copied directly from the Share button on YouTube)

    where this plugin actually needed:

    https://www.youtube.com/watch?v=UniQUEsTring copied from the browser address bar

    With the /watch path included, no errors are reported.

    Plugin Author Magazine3

    (@magazine3)

    Glad to hear the issue is resolved. If you face any other issues or having any queries do reach us and create a new topic.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘php Warning – Undefined array key “query”’ is closed to new replies.