I was trying to import a theme using Colibri Importer on version 6.0, but it kept getting stuck at 50%. When looking in the network tab, I saw that I was getting a 500 error back from the server, with a body of
<p>There has been a critical error on this website.</p><p>Learn more about troubleshooting WordPress.</p>
How do I fix this error? See below :D
I looked into the server-side logs (I'm using a DigitalOcean WordPress droplet on Apache) in /var/log/apache2/error.log and found further details on what was going wrong. In those logs, near the bottom was the following:
[Fri Jun 10 00:38:59.943725 2022] [php:error] [pid 195718] [client 73.188.75.186:58428] PHP Fatal error:
Uncaught TypeError: trim(): Argument #1 ($string) must be of type string, array given in /var/www/html/wp-content/plugins/colibri-sync/src/Colibri/Sync/Endpoints/Importer.php:181
Stack trace:
#0 (181): trim()
#1 /var/www/html/wp-content/plugins/colibri-sync/src/Colibri/Sync/Endpoints/Importer.php(275): Colibri\\Sync\\Endpoints\\Importer->getColibriUploadPath()
#2 /var/www/html/wp-content/plugins/colibri-sync/src/Colibri/Sync/Endpoints/Importer.php(332): Colibri\\Sync\\Endpoints\\Importer->rename()
#3 [internal function]: Colibri\\Sync\\Endpoints\\Importer->execute_backup_content()
#4 /var/www/html/wp-content/plugins/colibri-sync/src/Colibri/Sync/Endpoints/Importer.php(52): call_user_func()
#5 /var/www/html/wp-content/plugins/colibri-sync/src/Colibri/Sync/Core/Endpoint.php(76): Colibri\\Sync\\Endpoints\\Importer->runStep()
#6 /var/www/html/wp-content/plugins/colibri-sync/src/Colibri/Sync/ColibriSync.php(186): Colibri\\Sync\\Core\\Endpoint->verifyAndExecute()
#7 /var/www/html/wp-content/plugins/colibri-sync/src/Colibri/Sync/ColibriSync.php(151): Colibri\\Sync\\ColibriSync->import()
#8 /var/www/html/wp-includes/class-wp-hook.php(307): Colibri\\Sync\\ColibriSync->execute()
#9 /var/www/html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
#10 /var/www/html/wp-includes/plugin.php(476): WP_Hook->do_action()
#11 /var/www/html/wp-admin/admin-ajax.php(187): do_action()
#12 {main}\n thrown in /var/www/html/wp-content/plugins/colibri-sync/src/Colibri/Sync/Endpoints/Importer.php on line 181, referer: https://blog.tripbee.com/wp-admin/tools.php?page=colibri_sync_tools
I went to the mentioned file /var/www/html/wp-content/plugins/colibri-sync/src/Colibri/Sync/Endpoints/Importer.php on my server, and looked at the function getColibriUploadPath on line 181, where the issue was stemming from. It appeared that the trim function was expecting a string, but instead was being given an array. To fix it, I replaced
$rel = trim($rel);
with
if (is_array($rel)) {
$rel = trim(implode($rel));
}
elseif (is_string($rel)) {
$rel = trim($rel);
}
and saved the file. Without restarting the server or anything else, I reattempted the import and it succeeded! Hopefully this helps anyone who just updated to WP 6.0 and are struggling to get the Colibri Importer working on that version :)
Related
One of my older WordPress websites got broken after the hosting company switched to PHP 8.0. I have deactivated all the plugins and switched to WP default theme through FTP and PHPMyadmin, and then I got a few Fatal errors, which I managed to solve, but I got really stuck with this one since I am not a developer.
Browser message:
Warning: Undefined array key "wp_the_query" in */public_html/wp-settings.php on line 342
Fatal error: Uncaught Error: Call to a member function query() on null in */public_html/wp-includes/class-wp.php:601 Stack trace: #0 */public_html/wp-includes/class-wp.php(717): WP->query_posts() #1 */public_html/wp-includes/functions.php(960): WP->main('') #2 */public_html/wp-blog-header.php(16): wp() #3 */public_html/index.php(17): require('/www/webvol20/z...') #4 {main} thrown in */public_html/wp-includes/class-wp.php on line 601
Code from /wp-includes/class-wp.php, lines 598-602:
$GLOBALS['wp_query'] = $GLOBALS['wp_the_query'];
Code from /wp-includes/class-wp.php, lines 598-602:
public function query_posts() {
global $wp_query;
$this->build_query_string();
$wp_query->query( $this->query_vars );
Can anyone help with the code changes that I need to make? Please provide a "for dummies" style explanation :)
Already went through all web available solutions, but nothing worked. But to be honest, I wasn't able to completely understand some of them.
I have edited yesterday locally on my wordpress xampp installation several hours of content, texts and images.
The website was running all day.
When I wanted to start Xampp this morning the following message appeared:
Error: MySQL shutdown unexpectedly. While Trying to start Mysql on Xampp
So i Removed the Files which names start with aria_log in folder /xampp/mysql/data/
afterwards I was able to start xampp and call the dashboard in the browser.
now I get the following errors in my website:
Fatal error: Uncaught Error: Call to undefined function wp_cache_get() in
C:\xampp\htdocs\tilders\wp-includes\option.php:165
Stack trace:
#0 C:\xampp\htdocs\tilders\wp-includes\l10n.php(63): get_option('WPLANG')
#1 C:\xampp\htdocs\tilders\wp-includes\l10n.php(139): get_locale()
#2 C:\xampp\htdocs\tilders\wp-includes\l10n.php(766): determine_locale()
#3 C:\xampp\htdocs\tilders\wp-includes\load.php(1395): load_textdomain('default', 'C:\\xampp\\htdocs...')
#4 C:\xampp\htdocs\tilders\wp-includes\class-wpdb.php(1198): wp_load_translations_early()
#5 C:\xampp\htdocs\tilders\wp-includes\class-wpdb.php(1858): wpdb->select('tilders', Object(mysqli))
#6 C:\xampp\htdocs\tilders\wp-includes\class-wpdb.php(734): wpdb->db_connect()
#7 C:\xampp\htdocs\tilders\wp-includes\load.php(562): wpdb->__construct('tilders', 'tilders', 'tilders', 'localhost')
#8 C:\xampp\htdocs\tilders\wp-settings.php(124): require_wp_db()
#9 C:\xampp\htdocs\tilders\wp-config.php(99): require_once('C:\\xampp\\htdocs...')
#10 C:\xampp\htdocs\tilders\wp-load.php(50) in C:\xampp\htdocs\tilders\wp-includes\option.php on line 165
Fatal error: Uncaught Error: Call to a member function set() on null in C:\xampp\htdocs\tilders\wp-includes\l10n.php:784
Stack trace: #0 C:\xampp\htdocs\tilders\wp-includes\l10n.php(872): load_textdomain('default', 'C:\\xampp\\htdocs...', 'de_DE')
#1 C:\xampp\htdocs\tilders\wp-includes\class-wp-fatal-error-handler.php(47): load_default_textdomain()
#2 [internal function]: WP_Fatal_Error_Handler->handle()
#3 {main} thrown in C:\xampp\htdocs\tilders\wp-includes\l10n.php on line 784
So far I have tried the following:
Renamed all plugin folders
have replaced the following folders and main directory files
/wp-admin/
/wp-includes/
and .php files in the site root
renamed the folder w3tc-config to w3tc-config.delete
renamed all theme folders without "twentytwentytwo"
Do you have any ideas?
I have had the tables repaired under mysql admin. And the XAMPP database user had no more rights on his database.
This has solved the error
Where is FPDF? I use Wordpress and Go Daddy, I am trying to use this WooCommerce PDF Watermark, and I am getting a fatal error that causes the watermark not to be visible.
The error is below, how can I fix this?
Notice: iconv(): Wrong charset, conversion from UTF-8' to ISO-8859-1//TRANSLIT' is not allowed in /var/www/wp-content/plugins/woocommerce-pdf-watermark/includes/class-wc-pdf-watermarker.php on line 128
Fatal error: Uncaught Exception: FPDF error: Some data has already been output, can't send PDF file in /var/www/wp-content/plugins/woocommerce-pdf-watermark/includes/lib/fpdf/fpdf.php:292 Stack trace: #0 /var/www/wp-content/plugins/woocommerce-pdf-watermark/includes/lib/fpdf/fpdf.php(1081): FPDF->Error('Some data has a...') #1 /var/www/wp-content/plugins/woocommerce-pdf-watermark/includes/lib/fpdf/fpdf.php(1020): FPDF->_checkoutput() #2 /var/www/wp-content/plugins/woocommerce-pdf-watermark/includes/class-wc-pdf-watermarker.php(521): FPDF->Output() #3 /var/www/wp-content/plugins/woocommerce-pdf-watermark/includes/class-wc-pdf-watermark.php(610): WC_PDF_Watermarker->watermark(NULL, NULL, '/var/www/wp-con...', NULL, true) #4 /var/www/wp-includes/class-wp-hook.php(303): WC_PDF_Watermark->maybe_render_preview('') #5 /var/www/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters(NULL, Array) #6 /var/www/wp-includes/plugin.php(470): WP_Hook->do_action(Array) #7 /var/www/wp-admin/admin.php(175): do_action('admin_init') #8 {m in /var/www/wp-content/plugins/woocommerce-pdf-watermark/includes/lib/fpdf/fpdf.php on line 292
The server hosting your WordPress site must have the PHP class FPDF installed.
It is generating PDF files free of charge.
That class is one of the requirements of the Plugin "WooCommerce PDF Watermark".
See if you can install it at Go Daddy.
For instance by making FPDF a Composer requirement, if you can use Composer with your hosting package.
The fatal error appears when I wish to preview a drafted post. I have no idea what could have possibly started this error. I will post below the entire code I see.
Fatal error: Uncaught Error: Call to a member function format() on
boolean in
/homepages/7/d680526825/htdocs/clickandbuilds/nouveautycoon/wp-content/plugins/td-cloud-library/state/single/tdb_state_single.php:777
Stack trace: #0
/homepages/7/d680526825/htdocs/clickandbuilds/nouveautycoon/wp-content/plugins/td-cloud-library/shortcodes/single/tdb_single_date.php(130):
tdb_state_single->{closure}() #1
/homepages/7/d680526825/htdocs/clickandbuilds/nouveautycoon/wp-content/plugins/td-cloud-library/shortcodes/single/tdb_single_date.php(130):
Closure->__invoke() #2
/homepages/7/d680526825/htdocs/clickandbuilds/nouveautycoon/wp-content/plugins/td-composer/legacy/common/wp_booster/td_global_blocks.php(27):
tdb_single_date->render(Array, '') #3
/homepages/7/d680526825/htdocs/clickandbuilds/nouveautycoon/wp-includes/shortcodes.php(325):
td_global_blocks::proxy_function(Array, '', 'tdb_single_date') #4
[internal function]: do_shortcode_tag(Array) #5
/homepages/7/d680526825/htdocs/clickandbuilds/nouveautycoon/wp-includes/shortcodes.php
in
/homepages/7/d680526825/htdocs/clickandbuilds/nouveautycoon/wp-content/plugins/td-cloud-library/state/single/tdb_state_single.php
on line 777 There has been a critical error on your website.
Learn more about debugging in WordPress.
Any help, will be greatly appreciated.
Thanks.
P.S. - the theme used is called newspaper and is by tagdiv.
https://nouveautycoon.comis the website in question
Updating the TDCloud Plugin Plugin should do the job. Or downloading a fresh copy and overwrite the files.
I'm new to wordpress, I got this error when trying to update style.css in wordpress theme, i don't think css cause the crash please help me what cause this problem:
Fatal error: Uncaught Error: Class 'td_mobile_theme' not found in
/home/staging/www/wp-content/themes/Newspaper/mobile/includes/td_global_mob.php:20
Stack trace: #0
/home/staging/www/wp-content/themes/Newspaper/mobile/functions.php(8):
require_once() #1 /home/staging/www/wp-settings.php(424):
include('/home/staging/w...') #2 /home/staging/www/wp-config.php(92):
require_once('/home/staging/w...') #3
/home/staging/www/wp-load.php(37): require_once('/home/staging/w...') #4 /home/staging/www/wp-blog-header.php(13): require_once('/home/staging/w...') #5 /home/staging/www/index.php(17):
require('/home/staging/w...') #6 {main} thrown in
/home/staging/www/wp-content/themes/Newspaper/mobile/includes/td_global_mob.php
on line 20
It appears you're either missing a plugin or it has been deactivated.
From looking at the error message and searching for unique terms, I guess you have the Newspaper-Theme installed. Their website mentions "tagDiv Mobile theme" as an optional plugin. Maybe your theme has been modified so that it's no longer optional but required?
See if that plugin is installed and activated.