• I have problems with the plugin, it making the cpu 100% most of the time.

    Wp version 6.4.1.

    Php 8.0

    Plugin version 6.4.5.1 (6.4.6.3 is unknown compatibility with this ver of wo, so I don’t want to update it yet)

    PHP Warning: Undefined variable $id in /home/xxxx/public_html/wp-content/plugins/events-manager/templates/templates/search/form-advanced-trigger.php on line 5

    Hosting company already sent me a few warnings to resolve this because it is an issue, and they will disable my website.

    cpu usage mostly 100% because of it.

    Please, somebody? Solution? It is urgent.

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • You should be able to disable warnings by making sure you have WP_DEBUG set to false in your wp-config.php file

    define( 'WP_DEBUG', false );

    If for some reason this doesn’t work. Try the following:

    Create the directory wp-content/plugin-templates/events-manager/templates/search and then copy wp-content/plugins/events-manager/templates/templates/search/form-advanced-trigger.php to that directory and then modify the copied file form-advanced-trigger.php by adding the following after line 1 (line one has <?php>):

    if ( empty( $id ) ) $id = "";
    Thread Starter 9Design

    (@9design)

    Hi, debug is already on FALSE.

    And empty ID attributes are usually a bad practice, but I will try it anyway. Can I copy file in the child theme folder?

    Creators: Is there any fix for the plugin itself or similar beside this?

    Thanks again, will let you know If I resolve the problem this way.

    Yes, you can copy it to the child theme folder (see the instructions here: https://wp-events-plugin.com/documentation/using-template-files/).

    The ID attribute will not be empty it just won’t have any number on the end This should get fixed by the plugin owner but I gave you a workaround since you said it’s urgent. To give it a number at the end of the id attribute, change my suggestion to this:

    if ( empty( $id ) ) $id = rand();

    You could also try adding the following to your wp-config.php to disable php errors/warnings:

    ini_set('display_errors','Off');
    ini_set('error_reporting', E_ALL );
    • This reply was modified 1 year, 4 months ago by joneiseman.
    Thread Starter 9Design

    (@9design)

    I will check error log tomorow and processes as well, to see if that warning is still there and looping.

    Website is working correctly otherwise, just CPU is going to maximum, thats the problem.

    Will let you know, and other folks here, if this resolved the issue.

    Thanks man anyway! Really appreciate it!

    Thread Starter 9Design

    (@9design)

    Hi, unfortunately this hack didn’t help for the actual problem.

    My suggestion was intended to eliminate the PHP warning. Did you try deactivating the Events Manager plugin to see if that resolves the actual problem?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Php warning in Events Manager URGENT’ is closed to new replies.