Troubleshooting
4Command assistant opens but most buttons are unresponsive
This is happening because some of the files needed by 4Command are blocked, usually by a security system running on your server, or as a Joomla extension or in your .htaccess
file.
I cannot save some or any settings, I get a Cannot communicate with server Unexpected token < in JSON error message
As of 2023-02-27, there is a bug in the YooTheme WidgetKit component that breaks 4Command (and potentially more extensions from us and others) communication with your Joomla site.
Widgetkit 3.1.16 was released near March 17, 2023, and should contain a fix for this issue. Please refer to the YooTheme support forum thread where this is discussed for any further assistance from YooTheme.
That's not a problem in 4Command and nothing can be done on our side to fix it.
We have identified the problem and multiple users have passed on the information to YooTheme. The YooTheme support forum thread where this is discussed is here.
Until YooTheme comes up with a fixed update, you can:
- disable widgetkit if you do not actually use it
or
- apply the following bug fix to WidgetKit:
1 - Open the file /administrator/components/com_widgetkit/vendor/yootheme/framework/src/Routing/Request.php
at around line 67
, you'll see:
$this->server = new ServerBag($server ?: $_SERVER);
$this->headers = new HeaderBag($this->server->getHeaders());
// decode json content type
if (stripos($this->headers->get('CONTENT_TYPE') ?: '', 'application/json') !== false) {
if ($json = json_decode(@file_get_contents('php://input'), true)) {
$this->request->add($json);
}
}
2 - Replace this section so that it looks like this:
$this->server = new ServerBag($server ?: $_SERVER);
$this->headers = new HeaderBag($this->server->getHeaders());
// decode json content type
// Fix by Weeblr
if (stripos($this->headers->get('CONTENT_TYPE') ?: '', 'application/json') !== false) {
if ($json = json_decode(@file_get_contents('php://input'), true)) {
$saferJson = empty($json) || !is_array($json)
? [$json]
: $json;
$this->request->add($saferJson);
}
}
// End fix by Weeblr
3 - After saving the modified file, 4Command should work normally again
I cannot save some or any settings, I get a Cannot communicate with server Unexpected token < in JSON error message (JoomlaTools)
As of 2023-07-20, websites using any of the JoomlaTools extensions such as Docman or Logman will experience the same issues as described above for WidgetKit.
These extensions include JoomlaTools Koowa
framework, usually as a Joomla system plugin. This framework unfortunately and incorrectly intercepts 4AI communication with your server, but fails with a PHP error in doing so and therefore prevents 4AI from operating.
JoomlaTools is aware of the problem but no fixed version has been release to our knowledge yet. We invite you to contact JoomlaTools directly to obtain a fixed version, or disable or uninstall these extensions when no other options exist.
Until JoomlaTools releases a fixed version, you can:
- disable that extension if not actively using it
or
- apply the following bug fix:
1 - Open the file /libraries/joomlatools/library/dispatcher/request/abstract.php
at around line 211
, you'll see:
$this->data->add($data);
2 - Replace this section so that it looks like this:
// Weeblr 2023-07-20
//$this->data->add($data);
$saferData = !is_array($data)
? [$data]
: $data;
$this->data->add($saferData);
// Weeblr 2023-07-20
3 - After saving the modified file, 4AI should work normally again