• Resolved devsaredead

    (@devsaredead)


    With the latest update I cannot go to my users’ dashboard, I get the message “critical error on your website”. Everything is fine in admin backend and frontend. Any tips on what went wrong?

Viewing 15 replies - 1 through 15 (of 25 total)
  • Plugin Support Cara

    (@dcka)

    Hi, @devsaredead! This is the first we’re hearing of a critical error from the latest version. I also just updated on my site, but things are working as expected.

    Can you confirm you’re on version 2.3.0? In addition, can you still temporarily deactivate the plugin to determine whether it is indeed causing the critical error?

    Also, since you say the back end still looks fine, on which page exactly is the critical error showing up?

    Thread Starter devsaredead

    (@devsaredead)

    yes @dcka, I had checked disabling WPJM and confirm that the plugin is causing the error. I’m on Worpdress 6.5.2 and WPJM 2.3.0. The error show up when I try to access my user’s backend (both as admin and as a demo user, both with a URL and with the go-to-dashboard button).

    • This reply was modified 5 months, 3 weeks ago by devsaredead.
    Plugin Author Peter Kiss (a11n)

    (@yscik8)

    Hi @devsaredead!

    Do you have access to error logs from the server or hosting provider, to see what’s the error message? That’d help us investigate the issue. Do you have any plugins or snippets active that would extend this dashboard?

    Thread Starter devsaredead

    (@devsaredead)

    I do have access to my server but please tell me what I should look for, because I have restored my site now. Yet, I still have the error in my staging site. The dashboard is in the theme’s core, not created by any plugin.

    Plugin Author Peter Kiss (a11n)

    (@yscik8)

    The error logs should contain a ‘Fatal error’ entry that happens when opening the dashboard page.

    Are you using a theme that customized the job-dashboard.php template? That template changed in this version, so the theme’s copy should be checked and likely updated to make sure it’s compatible. As a testing step, you could try temporarily removing or renaming it among the theme files and see if that resolves the error.

    Thread Starter devsaredead

    (@devsaredead)

    hello. I’m positive that the template was not changed (you can view a job sample here). The templates that are included in the theme are the following ones:

    content-job_listing.php
    content-single-job_listing-company.php
    content-single-job_listing-meta.php
    content-summary-job_listing.php
    job-application.php
    job-preview.php
    job-submitted.php
    job-manager.php
    single-job.php

    Renaming the template’s name, the error remains.

    Plugin Support Jay

    (@bluejay77)

    Thank you for checking. We need a more specific error messages to investigate this issue further.

    Would you look up the error in the logs and share the error message with us? You do not need to share the full log, just the errors. We’re particularly looking for a ‘fatal error’ happening when opening the job dashboard page. It’s likely a ‘critical error’ type of message.

    Thread Starter devsaredead

    (@devsaredead)

    again, I wouldn’t know what file I should look for. I have a “error_log” file under my directory but it contains hundreds of errors like this one (going on for a couple of years):

    PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘featured_products_filter_query’ not found or invalid function name in /…/wp-includes/class-wp-hook.php on line 324

    (which contains:

    $value = call_user_func_array( $the_['function'], $args );

    so nothing related to WPJM or any critical/fatal errors.

    But besides the normal “critical error message”, I can also get the following:

    You do not have sufficient permissions to access this admin page. Reason: The current user doesn’t have the “edit_job_listings” capability that is required to access the “Offerte lavoro” menu item.

    Plugin Author Peter Kiss (a11n)

    (@yscik8)

    Hi @devsaredead!

    To find the error message, you can do the following steps:

    • (Do this on a staging site if possible)
    • Update the WP Job Manager plugin to 2.3.0
    • Delete (or rename) the error_log file
    • Visit the user’s dashboard page where the “Critical error” message is displayed
    • The error_log file should be recreated and only contain a few entries.
    Thread Starter devsaredead

    (@devsaredead)

    …it has not recreated the log file

    Thread Starter devsaredead

    (@devsaredead)

    I made a second attempt but still nothing related to WPJM in the log file, where I just have a repetition of the following error:

    [05-May-2024 05:58:57 UTC] PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘featured_products_filter_query’ not found or invalid function name in /…./wp-includes/class-wp-hook.php on line 324

    Any further hints?

    Thread Starter devsaredead

    (@devsaredead)

    …that last error was due to another problem I have now resolved. I still need help for WPJM triggering a critical error.

    Plugin Support Jay

    (@bluejay77)

    Hi @devsaredead,

    Would you please share what type of critical error you’re seeing? It’s difficult to debug on our end without understanding what kind of errors you’re experiencing.

    The WordPress critical error can have a variety of causes, though the issue often can usually be traced back to an issue with PHP: either your memory limit being surpassed, or an error in your code, plugins, or theme. It may also be an issue of database corruption.

    Since the problem can be caused by any number of things, check the error log on your server. If you can’t find the log, please contact your host. Meantime, enable wp_debug and wp_debug_log and after an error, look at wp-content/debug.log to see if anything gets logged there. https://www.ads-software.com/support/article/debugging-in-wordpress/

    Please also review the following article for details on this error and some tips how to fix it:
    https://www.wpbeginner.com/wp-tutorials/how-to-fix-the-critical-error-in-wordpress/ https://kinsta.com/knowledgebase/there-has-been-a-critical-error-on-your-website/

    Thread Starter devsaredead

    (@devsaredead)

    1) I’m getting the classic “critical error” box, but without receiving an email. Then, once turned debug mode on, on updating the plugin I got this message in the backend:

    Notice: ob_end_flush(): failed to send buffer of zlib output compression (0) in /mydomain.info/wp-includes/functions.php on line 5420

    where I can find this default WP code:

    /**Flushes all output buffers for PHP 5.2. Make sure all output buffers are flushed before our singletons are destroyed.*/
    function wp_ob_end_flush_all() {
    $levels = ob_get_level();
    for ( $i = 0; $i < $levels; $i++ ) { ob_end_flush(); } }

    2) and then a fatal error in the frontend, mentioning a core plugin.

    Fatal error: Uncaught Error: Call to undefined method WP_Job_Manager_Shortcodes::job_dashboard_handler() in /…./wp-content/plugins/wyz-toolkit/classes/class-user-account.php:40 Stack trace: #0 /…./wp-includes/class-wp-hook.php(324): WyzUserAccount->{closure}(Object(WP)) #1 /…./wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #2 /…./wp-includes/plugin.php(565): WP_Hook->do_action(Array) #3 /…./wp-includes/class-wp.php(830): do_action_ref_array(‘wp’, Array) #4 /…./wp-includes/functions.php(1336): WP->main(”) #5 /…./wp-blog-header.php(16): wp() #6 /…./index.php(17): require(‘/home/agenda/ba…’) #7 {main} thrown in /…./wp-content/plugins/wyz-toolkit/classes/class-user-account.php on line 40

    Now the problem is that wyz-toolkit is the plugin that makes the whole theme run. Yet, I have been updating WPJM for a long time, and this is the first time I get this error.

    3) Moreover, in the debug-log file I have found this error, that seem related to WPJM:

    PHP Fatal error: Uncaught Error: Call to undefined method WP_Job_Manager_Shortcodes::job_dashboard_handler() in /mydomain/wp-content/plugins/wyz-toolkit/classes/class-user-account.php:40

    where I have this code:

    if ( class_exists(‘WP_Job_Manager_Shortcodes’) ) {
    add_action( ‘wp’, function(){
    $shortcodes_handler = WP_Job_Manager_Shortcodes::instance();
    $shortcodes_handler->job_dashboard_handler();
    }

    I hope you can gather something out of all above.

    Plugin Support Joash

    (@joashrajin)

    @devsaredead the errors shared seem to be related to wyz-toolkit. Since that is a plugin that you need to use, it would be a good idea to report the matter to them since this seems to be a recent issue.

    That said, if they are unable to assist, you can refer to our document here: https://wpjobmanager.com/document/advanced-usage/custom-development/

Viewing 15 replies - 1 through 15 (of 25 total)
  • You must be logged in to reply to this topic.