Skip to content

Commit b73d958

Browse files
author
Your Name
committed
Updates
1 parent 5ecba26 commit b73d958

File tree

3 files changed

+98
-79
lines changed

3 files changed

+98
-79
lines changed

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ This is the official Live Helper Chat documentation [https://doc.livehelperchat.
44

55
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
66

7-
### Build locally
7+
### Build the website locally
8+
9+
To build the website locally, run the following commands:
810

911
```
1012
npm install
1113
npm run build
12-
```
14+
```

docs/chat/statistic.mdx

+15
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,21 @@ This chart is available only if you are using ElasticSearch
276276

277277
<Image img={require('../../static/img/statistic/pending-vs-online.jpg')} />
278278

279+
### How it works
280+
* It is handled by this cronjob running every minute `php cron.php -s site_admin -e elasticsearch -c cron/cron_1m`
281+
* Every minute we log
282+
* Pending chats
283+
* Active chats
284+
* Operator who were online and active in the last 60 seconds
285+
* During chat generation we group by date time and chat status `pending` and `active`
286+
* Afterwards we group by online operator which selected operators who were online
287+
288+
### How can I determine an operator's workload at a specific time for a particular department?
289+
290+
* If you are using ElasticSearch extension you can generate this data using same chart
291+
* Regular way you can go to users list and click `Chats momentary history` and you will see how many chats he had at specific time.
292+
* Also you can check agent `Online hours` where you will see how many chats he took in specific period of time.
293+
279294
## Configuration
280295

281296
In this section you can choose what charts should be checked by default for generation.

docs/upgrading.md

+79-77
Original file line numberDiff line numberDiff line change
@@ -3,81 +3,83 @@ id: upgrading
33
title: Upgrading
44
---
55

6-
This is a basic tutorial on how to perform upgrades since version 2.04. This version can automatically update the database from any previous LHC version. Since version 3.30, we require `composer` dependencies to be installed if you are installing from source code.
7-
8-
If you are upgrading from an older version to any version 3.30 or higher, you must install composer dependencies.
9-
```
10-
cd lhc_web
11-
composer.phar install
12-
```
13-
14-
If you don't have `composer.phar`, you can download it from https://getcomposer.org/download/.
15-
16-
* You can download a version with dependencies included from https://github.com/LiveHelperChat/livehelperchat/releases. Look for the newest file named `*.**v-with-dependencies.tgz`. **PHP version 8.2** is required.
17-
18-
This file includes a folder `lib/vendor`, so you don't need to install composer yourself. Just copy it to `lib/vendor`.
19-
20-
1. Read the new version announcement article for any possible changes in `settings/settings.ini.php`. If the article does not mention anything, you do not have to do anything.
21-
2. Go to "System" -> "Update information" and check if LHC finds any differences in the database. If it does, click on "Update database." You may not see differences if your server does not allow making requests to remote URLs.
22-
* You need to run these commands from the root folder (where `index.php` is located).
23-
* `php cron.php -s site_admin -c cron/util/update_database` tries to update the database from a remote URL. If this does not work, run:
24-
* `php cron.php -s site_admin -c cron/util/update_database -p local` after replacing all files.
25-
3. If you accidentally overwrite files before updating the database, you can:
26-
1. [Update the database from the local definition](system/command.md#updates-live-helper-chat-database-directly-from-console).
27-
2. Copy `doc/shell/upgrade.php` to the root folder, the same folder where `index.php` exists.
28-
1. In your browser, enter `https://example.com/upgrade.php` to update the database directly.
29-
4. Log out from LHC.
30-
5. [Download the most recent LHC version](http://livehelperchat.com/article/static/5). Overwrite the following folders: `doc`, `ezcomponents`, `lib`, `modules`, `pos`, `translations`, and `design`. Also, overwrite `index.php` and `cron.php` files with the new version.
31-
1. https://github.com/remdex/livehelperchat/archive/master.zip - latest master branch zip without composer dependencies.
32-
2. https://github.com/LiveHelperChat/livehelperchat/releases - latest release with composer dependencies.
33-
6. Overwrite `composer.json` and `composer.lock` files and run `composer.phar install` or `composer.phar update` command.
34-
7. Disable [cache in `settings.ini.php`](debug.md#disabling-cache).
35-
8. Log in to LHC again and go to `"System configuration" -> "Clear Cache"` and click "Clear Cache."
36-
1. You can also clear the cache by executing this command from the command line: `php cron.php -s site_admin -c cron/util/clear_cache`.
37-
9. Now you can re-enable the cache in your `settings.ini.php`.
38-
10. If you still encounter errors, then [Enable debug output](debug.md).
39-
40-
If you are updating from any older version, you can follow this pattern, which can also be applied to new versions:
41-
42-
1. [Download the most recent LHC version](http://livehelperchat.com/article/static/5). Overwrite the following folders: `doc`, `ezcomponents`, `lib`, `modules`, `pos`, `translations`, and `design`. Also, overwrite `index.php` and `cron.php` files with the new version.
43-
2. Install composer dependencies as described above. You can just download the most recent `*.**v-with-dependencies.tgz` file from https://github.com/LiveHelperChat/livehelperchat/releases and copy `lhc_web/lib/vendor` to your existing installation. This folder should not exist if you are upgrading from a version older than 4.29.
44-
3. Copy `doc/shell/upgrade.php` to the root folder of LHC.
45-
4. In your browser, type `chatfolder/upgrade.php`. It will update the database to the most recent version and clear the cache automatically.
46-
5. Delete `upgrade.php` from the root folder.
47-
48-
In all cases, I suggest making a backup.
49-
50-
* [Old update instructions](https://livehelperchat.com/old-upgrading-instructions-335a.html)
51-
* [How to automate live helper chat updates?](https://livehelperchat.com/how-to-automate-live-helper-chat-updates-338a.html)
52-
53-
## How to make PHP 8.1 version compatible?
54-
55-
You will lose Facebook Messenger compatibility.
56-
57-
* Modify the `lhc_web/composer.json` file and
58-
* Change `"php": ">=8.2"` to `"php": ">=8.1"`.
59-
* Remove
60-
61-
```
62-
"tgallice/fb-messenger-sdk": "dev-master#47498e9926df01f2633835ff3ffb310f88ac444f",
63-
"symfony/event-dispatcher": "^7.1",
64-
```
65-
66-
* Execute `composer.phar update`.
67-
68-
## Permissions
69-
70-
To be able to see `Update information`, the operator must have
71-
72-
> 'lhsystem', 'performupdate'.
73-
74-
## Troubleshooting Upgrade Issues
75-
76-
If you encounter issues during the upgrade process, consider the following steps:
77-
78-
1. Ensure that all files have been correctly uploaded and that there are no missing files.
79-
2. Check the server error logs for any specific error messages that may indicate what went wrong.
80-
3. Verify that your PHP version meets the requirements specified in the documentation.
81-
4. If the upgrade fails, you can revert to the previous version by restoring from the backup you created before starting the upgrade.
82-
5. Consult the community forums or support channels for assistance if you are unable to resolve the issue.
6+
This guide explains how to upgrade Live Helper Chat (LHC) from version 2.04 onwards. LHC can automatically update the database from any previous version. Since version 3.30, installing from source requires [Composer](https://getcomposer.org/) dependencies.
7+
8+
### Prerequisites
9+
10+
* **Composer:** Required for source installations (version 3.30+).
11+
* If you don't have it, download `composer.phar` from [https://getcomposer.org/download/](https://getcomposer.org/download/).
12+
* **PHP 8.2 (Recommended):** For the latest version with dependencies, download the `*.v-with-dependencies.tgz` file from [https://github.com/LiveHelperChat/livehelperchat/releases](https://github.com/LiveHelperChat/livehelperchat/releases). This includes the `lib/vendor` folder, so you don't need to install Composer separately. Just extract it to `lib/vendor`.
13+
14+
### Upgrade Steps
15+
16+
1. **Check Announcement:** Review the new version's announcement for any required changes in `settings/settings.ini.php`.
17+
2. **Update Database:**
18+
* Go to "System" -> "Update information" to check for database differences. If found, click "Update database."
19+
* If the web interface doesn't work, run these commands from the root folder:
20+
* `php cron.php -s site_admin -c cron/util/update_database` (updates from remote URL)
21+
* If the above fails, use: `php cron.php -s site_admin -c cron/util/update_database -p local` (after replacing files).
22+
* **Manual Database Update (If Overwritten Files):**
23+
1. [Update the database from the local definition](system/command.md#updates-live-helper-chat-database-directly-from-console).
24+
2. Alternatively, copy `doc/shell/upgrade.php` to the root folder and access it via browser (e.g., `https://example.com/upgrade.php`).
25+
3. **Logout:** Log out of LHC.
26+
4. **Replace Files:**
27+
* [Download the latest LHC version](http://livehelperchat.com/article/static/5).
28+
* Overwrite these folders: `doc`, `ezcomponents`, `lib`, `modules`, `pos`, `translations`, and `design`.
29+
* Also, overwrite `index.php` and `cron.php`.
30+
* **Downloads:**
31+
1. [https://github.com/remdex/livehelperchat/archive/master.zip](https://github.com/remdex/livehelperchat/archive/master.zip) (latest master branch without Composer dependencies)
32+
2. [https://github.com/LiveHelperChat/livehelperchat/releases](https://github.com/LiveHelperChat/livehelperchat/releases) (latest release with Composer dependencies)
33+
5. **Update Composer Dependencies (If Applicable):**
34+
* Overwrite `composer.json` and `composer.lock`.
35+
* Run `composer.phar install` or `composer.phar update`.
36+
6. **Disable Cache:** Disable the cache in `settings.ini.php` (see [debug.md#disabling-cache](debug.md#disabling-cache)).
37+
7. **Clear Cache:**
38+
* Log back in and go to "System configuration" -> "Clear Cache" and click "Clear Cache."
39+
* Alternatively, run `php cron.php -s site_admin -c cron/util/clear_cache` from the command line.
40+
8. **Re-enable Cache:** Re-enable the cache in `settings.ini.php`.
41+
9. **Troubleshooting:** If errors persist, [enable debug output](debug.md).
42+
43+
### Upgrading from Older Versions
44+
45+
For older versions, follow this process:
46+
47+
1. **Replace Files:** As in step 4 above.
48+
2. **Install Composer Dependencies:** As in step 5 above, or download the `*.v-with-dependencies.tgz` file and copy `lhc_web/lib/vendor` to your installation.
49+
3. **Run Upgrade Script:** Copy `doc/shell/upgrade.php` to the LHC root folder.
50+
4. **Access Script:** Open `chatfolder/upgrade.php` in your browser to update the database and clear the cache.
51+
5. **Delete Script:** Remove `upgrade.php` from the root folder.
52+
53+
### Important Considerations
54+
55+
* **Backup:** Always create a backup before upgrading.
56+
* **Further Reading:**
57+
* [Old update instructions](https://livehelperchat.com/old-upgrading-instructions-335a.html)
58+
* [Automating updates](https://livehelperchat.com/how-to-automate-live-helper-chat-updates-338a.html)
59+
60+
### PHP 8.1 Compatibility (Losing Facebook Messenger)
61+
62+
1. **Edit `composer.json`:**
63+
* Change `"php": ">=8.2"` to `"php": ">=8.1"`.
64+
* Remove these lines:
65+
66+
```json
67+
"tgallice/fb-messenger-sdk": "dev-master#47498e9926df01f2633835ff3ffb310f88ac444f",
68+
"symfony/event-dispatcher": "^7.1",
69+
```
70+
2. **Update Composer:** Run `composer.phar update`.
71+
72+
### Permissions
73+
74+
The operator needs the `'lhsystem', 'performupdate'` permission to see "Update information."
75+
76+
### Troubleshooting
77+
78+
If you encounter issues:
79+
80+
1. **Verify Files:** Ensure all files are uploaded correctly.
81+
2. **Check Logs:** Review server error logs for specific messages.
82+
3. **PHP Version:** Confirm your PHP version meets the requirements.
83+
4. **Revert:** Restore from your backup if the upgrade fails.
84+
5. **Seek Help:** Consult community forums or support channels.
8385

0 commit comments

Comments
 (0)