• Resolved Corrado

    (@nimdaweb)


    Hello Support,

    I’m writing to report a recurring PHP warning that is being triggered by the Action Scheduler component included in The Events Calendar.

    Here are the details:

    • PHP Warning logged every minute: PHP Warning: Undefined property: WP_Post_Type::$term_id in /wp-includes/taxonomy.php on line 1720
    • Stack trace shows it originates from: /plugins/the-events-calendar/common/vendor/woocommerce/action-scheduler/classes/ActionScheduler_QueueRunner.php

    After several tests, I was able to isolate the issue:

    • The warning disappears completely if I disable The Events Calendar.
    • I do not have any custom post types or taxonomies registered manually.
    • The warning seems to come from a background cron job using action_scheduler_run_queue scheduled every minute.
    • Something in the job appears to treat a WP_Post_Type object as a WP_Term, causing the undefined property notice on term_id.

    Additionally, when The Events Calendar is deactivated, I get this cron-related error:

    Cron reschedule event error for hook: action_scheduler_run_queue, Error code: invalid_schedule, Error message: Event schedule does not exist., Data: {"schedule":"every_minute","args":["WP Cron"],"interval":60}

    This confirms that The Events Calendar is registering the every_minute schedule and using Action Scheduler internally.

    Expected outcome / support request:

    • Please verify whether the plugin is passing a WP_Post_Type object to a function expecting a WP_Term, possibly inside a taxonomy-related process during Action Scheduler tasks.
    • If this is a known issue, is there a patch or update planned to resolve this?
    • If not, could you provide a workaround to suppress the warning or properly handle the object types involved?

    Thank you in advance for your support.

    Best regards

Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Support tristan083

    (@tristan083)

    Hi @nimdaweb ,

    Thank you for reaching out and bringing this to our attention.

    To help us better understand the situation and allow us to reproduce the issue in a consistent manner, could you please provide the version of the following?

    1. PHP
    2. WordPress
    3. The Events Calendar
    4. Events Calendar Pro (if using)
    5. Theme and Version
    Thread Starter Corrado

    (@nimdaweb)

    Hello Support,

    1. PHP: 8.2.28
    2. WordPress: 6.8.1
    3. The Events Calendar: 6.14.0
    4. Events Calendar Pro (if using): No
    5. Theme and Version: GeneratePress 3.6.0

    Thanks!

    Plugin Support tristan083

    (@tristan083)

    Hi @nimdaweb ,

    Thank you for your message and the information.

    Could you please get back to us with full screenshots or screen recordings of what you have in your admin dashboard -> Tools -> Scheduled Actions?

    Thread Starter Corrado

    (@nimdaweb)

    Hello Support,

    I partially solved the issue by disabling Event categories in Yoast -> Settings -> Categories & Tags -> Event Categories.

    But that’s not a solution.

    It doesn’t seem possible to upload a screenshot.

    Thanks

    Plugin Support tristan083

    (@tristan083)

    Hi @nimdaweb ,

    Thank you for your message and the information.

    Could you try uploading using platforms like ScreenPal or Loom, and share the links on your response?

    Thread Starter Corrado

    (@nimdaweb)

    Plugin Support tristan083

    (@tristan083)

    Hi @nimdaweb ,

    Thank you for your message and the information.

    Based on your screenshots, there doesn’t seem to be any scheduled actions that’s repeating “every minute”. I also have not been able to reproduce the issue in my testing environment running only The Events Calendar, Yoast SEO plugin, and the twenty-twenty-one theme. Would you be able to provide more information about how to reproduce it?

    Thread Starter Corrado

    (@nimdaweb)

    Hi Support,

    as you can see from the logs now the warnings are every 5 min (after I disabling Event categories in Yoast -> Settings -> Categories & Tags -> Event Categories.):

    [16-Jul-2025 06:54:29 UTC] PHP Warning: Undefined property: WP_Post_Type::$term_id in wp-includes/taxonomy.php on line 1720
    [16-Jul-2025 06:54:29 UTC] PHP Warning: Undefined property: WP_Error::$taxonomy in wp-content/plugins/wordpress-seo/src/builders/indexable-hierarchy-builder.php on line 342
    [16-Jul-2025 06:54:29 UTC] PHP Warning: Undefined property: WP_Error::$parent in wp-content/plugins/wordpress-seo/src/builders/indexable-hierarchy-builder.php on line 344
    [16-Jul-2025 06:54:29 UTC] PHP Warning: Undefined property: WP_Post_Type::$term_id in wp-includes/taxonomy.php on line 1720
    [16-Jul-2025 07:38:52 UTC] PHP Warning: Undefined property: WP_Post_Type::$term_id in wp-includes/taxonomy.php on line 1720
    [16-Jul-2025 07:38:52 UTC] PHP Warning: Undefined property: WP_Error::$taxonomy in wp-content/plugins/wordpress-seo/src/builders/indexable-hierarchy-builder.php on line 342
    [16-Jul-2025 07:38:52 UTC] PHP Warning: Undefined property: WP_Error::$parent in wp-content/plugins/wordpress-seo/src/builders/indexable-hierarchy-builder.php on line 344
    [16-Jul-2025 07:38:52 UTC] PHP Warning: Undefined property: WP_Post_Type::$term_id in wp-includes/taxonomy.php on line 1720
    [16-Jul-2025 07:43:07 UTC] PHP Warning: Undefined property: WP_Post_Type::$term_id in wp-includes/taxonomy.php on line 1720
    [16-Jul-2025 07:43:07 UTC] PHP Warning: Undefined property: WP_Error::$taxonomy in wp-content/plugins/wordpress-seo/src/builders/indexable-hierarchy-builder.php on line 342
    [16-Jul-2025 07:43:07 UTC] PHP Warning: Undefined property: WP_Error::$parent in wp-content/plugins/wordpress-seo/src/builders/indexable-hierarchy-builder.php on line 344
    [16-Jul-2025 07:43:07 UTC] PHP Warning: Undefined property: WP_Post_Type::$term_id in wp-includes/taxonomy.php on line 1720

    I also installed WP Crontrol and this is the cron:
    https://drive.google.com/file/d/1wm7p8DciqVn2l9oOsXdaXUpb7g4osDrU/view?usp=sharing

    Cron scheduling:
    https://drive.google.com/file/d/1iM9yZcYNeayOKfUjMaRK0X2KABPT9Zxy/view?usp=sharing

    These are the plugins present:
    Classic Editor
    Compliance
    Duplicate page
    Duplicator
    Elementor
    Elementor Pro
    FluentSMTP (disable)
    GTranslate
    Ivory Search
    Maintenance (disable)
    Speed Optimizer
    The Events Calendar
    WP-Optimize – Clean, Compress, Cache (disable)
    Yoast SEO
    There are no Taxonomies and CPTs recorded by me manually or by ACF or CPT UI

    Hosting Siteground

    I did the analysis in the first post, can you implement a fix to solve the problem?

    Thanks in advance

    Plugin Support tristan083

    (@tristan083)

    Hi @nimdaweb ,

    Thank you for your message and the information. I’m sorry to hear of the continued difficulties.

    Could you please provide the full stack trace to help us better understand the situation?

    Also, at this time, we’re unable to reproduce the warning in our testing environment running only The Events Calendar, Yoast SEO plugin, and the twenty-twenty-one theme. I would recommend doing a conflict test (see: Testing Conflicts With Themes and Other Plugins) in a staging environment to help isolate the situation; and, if you could provide some detailed steps in reproducing the warning in this environment, that’d be much appreciated.

    Thread Starter Corrado

    (@nimdaweb)

    Hi Support,
    What do I mean by full stack trace?
    What files do you need? Let me know in detail what I need to do.

    Why don’t you try with Theme and Version: GeneratePress 3.6.0?

    The procedure you’re suggesting for testing for conflicts seems really useless, since I did a much more thorough analysis in the first post!

    Below is more data:

    WordPress
    Versione WordPress 6.8.2
    Lingua it-IT
    Charset UTF-8
    Limite memoria 512M

    PHP
    Versione PHP 8.2.29
    PHP SAPI cgi-fcgi
    Limite memoria 768M
    Memoria in uso 108 MB
    Tempo di esecuzione massima 120 (predefinito) - è dinamico
    open_basedir Off
    Shell (exec) È supportato
    Shell Exec Zip È supportato
    Estensione Suhosin Disabilitato
    Architettura 64-bit
    File dei log degli errori php_errorlog

    MySQL
    Versione 8.0.41
    Charset utf8mb4
    Timeout di attesa 60

    This is the new php_errorlog:
    https://drive.google.com/file/d/18z0wrFeW3OO7a1hCeSddCy2dQhh-P10A/view?usp=sharing

    This user also had the same error:
    https://wordpress.org/support/topic/php-error-log-issue/

    Let me give you a quick recap:


    I’m experiencing persistent PHP warnings on a live site using The Events Calendar. These warnings are being logged every minute (now it is no longer every minute but it varies and you can see it from the log I provided you), and they appear to be triggered during background tasks, possibly during scheduled actions (Action Scheduler), particularly when interacting with Yoast SEO’s indexables.

    Here are the exact error messages from the php_error.log:

    PHP Warning: Undefined property: WP_Post_Type::$term_id in /wp-includes/taxonomy.php on line 1720
    PHP Warning: Undefined property: WP_Error::$taxonomy in /wp-content/plugins/wordpress-seo/src/builders/indexable-hierarchy-builder.php on line 342
    After hours of debugging and disabling plugins one by one, I was able to confirm that these warnings only appear when The Events Calendar is active. Disabling it eliminates the warnings entirely.

    Additional insights:

    The warnings seem to originate when Yoast SEO tries to build the indexable hierarchy for an object that is likely returned as a WP_Error instead of a valid taxonomy or post type.

    Specifically, the post_parent of an Event (or possibly a custom post type created by TEC) seems to be returning a WP_Error, and this is being passed to Yoast’s builder without proper checking.

    This likely happens inside a scheduled event triggered via Action Scheduler, since the logs show a new error line every minute, regardless of user interaction.

    Further investigation reveals that another user reported the same issue in the past with this error pattern:


    [example quoted for context]

    PHP Warning: Undefined property: WP_Post_Type::$term_id in taxonomy.php
    PHP Warning: Undefined property: WP_Error::$taxonomy in indexable-hierarchy-builder.php
    Interestingly, the issue disappears entirely when migrating the same site to a staging environment. My hypothesis is that:

    The staging environment has no traffic (so the Action Scheduler does not run),

    Or the cron system is disabled (DISABLE_WP_CRON is true),

    Or the environment swallows warnings due to error_reporting settings.

    Please help me identify and fix the root cause.
    Can you verify whether:

    A TEC object (post or taxonomy) could be returning a WP_Error during post hierarchy resolution or indexing?

    There are known compatibility issues between TEC and Yoast SEO when used with Action Scheduler?

    Thanks

    Thread Starter Corrado

    (@nimdaweb)

    In query Monitor:

    Deprecated strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated
    wp-includes/functions.php:7360
    1 Plugin: the-events-calendar
    Deprecated str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated
    wp-includes/functions.php:2195
    1 Plugin: the-events-calendar

    Thanks

    Plugin Support tristan083

    (@tristan083)

    Hi @nimdaweb ,

    Thank you for your message.

    Our products team is aware of these deprecation notices, and are actively working to address via our regular maintenance releases (see PHP 8.x: Understanding what the Deprecation notices mean).

    As for the warnings concern, I appreciate you providing a quick recap, which is adding clarity to the situation. So, the issue appears to be a conflict between Yoast SEO and The Events Calendar (per your recap). Are you saying that the warnings also disappear when Yoast SEO is deactivated, and leaving The Events Calendar activated?

    Thread Starter Corrado

    (@nimdaweb)

    Dear Support,
    The problem goes away if I disable TEC, not Yoast.

    It’s been several days, and I’m spending a lot of time answering your questions, but it doesn’t seem like you’re far from solving the problem.

    Are you able to solve the problem or not?
    Please answer me honestly.

    If you don’t find a solution soon, I’ll delete TEC and install another plugin.

    Thanks

    Plugin Support tristan083

    (@tristan083)

    Hi @nimdaweb ,

    Thank you for your message, and I completely understand your frustration and why you’re feeling this way. Unfortunately, I’ve been unable to pinpoint the cause of the issue nor have I been able to reproduce it in my testing environment. Without detailed steps to reproduce the issue in a consistent manner is unfortunately like finding a needle in a haystack. Perhaps you can provide more information about reproducing it in a consistent manner?

    The closest I can reproduce are the following logs, which our products team is already aware of and actively addressing: https://go.screenpal.com/watch/cTi360nIjVe.

    Thread Starter Corrado

    (@nimdaweb)

    Dear Support,
    As you can see, there are many cases of sites affected by this problem.

    I’ve provided you with all the information possible and even a complete list of all the site’s plugins and the versions of the components you requested.
    Now it’s up to you to solve the problem.

    The problem is your plugin and the handling of custom fields and TEC taxonomies.

    If you can fix the problem, OK. Otherwise, please let me know honestly so I can change the plugin.

    Thank you.
    Regards

Viewing 15 replies - 1 through 15 (of 18 total)

The topic ‘PHP Warning caused by Action Scheduler integration in The Events Calendar’ is closed to new replies.