QuestionsCategory: Technical QuestionsPHP Error Log Issue with Questalk Pro
figure8software
asked 3 months ago
I'm receiving the following error in my logs: PHP Notice: Function _load_textdomain_just_in_time was called <strong>incorrectly</strong>. Translation loading for the <code>emqa</code> domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the <code>init</code> action or later. Please see <a href="https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 6.7.0.) in /var/www/www-root/data/www/members.ssfpa.net/wp-includes/functions.php on line 6121 This error is preceded by a couple of other PHP errors such as: PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated
PHP Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated Currently the only plugin showing in the error log is EMQA. Any ideas what might be happening here? Thank you!  
techStaff
replied 2 months ago

Sorry for the delay in customer support. We are currently reviewing your question and will help resolve the issue as quickly as possible. Thank you for your understanding.

1 Answers
tech Staff
answered 2 months ago

Hi,
Sorry for the delay in customer support. We are currently reviewing your question and will help resolve the issue as quickly as possible. Thank you for your understanding.

We will answer your question here and on our forum now.
about the language issue PHP Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the <code>emqa</code> domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early.

1. you can open the wp-content/plugins/emo-questalk-pro/em-question-answer.php file then find line 458:

Replace this:

public function load_textdomain() {
$locale = get_locale();
$mo = 'emqa-' . $locale . '.mo';

load_textdomain( 'emqa', WP_LANG_DIR . '/emqa/' . $mo );
load_textdomain( 'emqa', plugin_dir_path( __FILE__ ) . 'languages/' . $mo );
load_plugin_textdomain( 'emqa' );
}

With this code:

 

public function load_textdomain() {
load_plugin_textdomain(
'emqa',
false,
dirname( plugin_basename( __FILE__ ) ) . '/languages/'
);
}

2. About other PHP notices, you can open the wp-content/plugins/emo-questalk-pro/inc/Admin/Upgrade.php file then find the line 12 and replace it with the following code:

public function add_admin_page() {
add_submenu_page(
'emqa',
__( 'EMQA Upgrades', 'emqa' ),
__( 'EMQA Upgrades', 'emqa' ),
'manage_options',
'emqa-upgrades',
array( $this, 'screen' )
);
}

Please login or Register to submit your answer