From 9bb057014a606d3885a3ec4e54a3a1ac5b8d2759 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Fri, 22 Nov 2024 11:15:43 +0100 Subject: [PATCH] feat: add troubleshooting section with create trigger problem --- docs/getting_started/Installation.md | 2 + docs/getting_started/apache_configuration.md | 2 +- docs/getting_started/docker.md | 2 +- docs/getting_started/nginx_configuration.md | 2 +- .../troubleshooting/_category_.json | 4 ++ .../trigger_remove_free_text_feature_av.md | 44 +++++++++++++++++++ 6 files changed, 53 insertions(+), 3 deletions(-) create mode 100644 docs/getting_started/troubleshooting/_category_.json create mode 100644 docs/getting_started/troubleshooting/trigger_remove_free_text_feature_av.md diff --git a/docs/getting_started/Installation.md b/docs/getting_started/Installation.md index 9eee300b..48fd472c 100644 --- a/docs/getting_started/Installation.md +++ b/docs/getting_started/Installation.md @@ -46,3 +46,5 @@ php Thelia admin:create ### Require existing modules If you want to add a module made by our community you can browse [this](../../modules) list and execute the `composer require` command attached to it to download it. After that you can enable and disable the module in the modules pages in your store back-office. + +----- diff --git a/docs/getting_started/apache_configuration.md b/docs/getting_started/apache_configuration.md index d443f8c4..d2f320ee 100644 --- a/docs/getting_started/apache_configuration.md +++ b/docs/getting_started/apache_configuration.md @@ -1,6 +1,6 @@ --- title: Apache configuration -sidebar_position: 4 +sidebar_position: 3 --- Only the ```web``` directory has to be accessible with apache, you can configure your vhost like this : diff --git a/docs/getting_started/docker.md b/docs/getting_started/docker.md index 790a4e59..57e045d6 100644 --- a/docs/getting_started/docker.md +++ b/docs/getting_started/docker.md @@ -1,6 +1,6 @@ --- title: Dockerize your Thelia -sidebar_position: 6 +sidebar_position: 4 --- A docker configuration is provided in the repository of Thelia. It uses docker-compose. diff --git a/docs/getting_started/nginx_configuration.md b/docs/getting_started/nginx_configuration.md index e9b4019e..5bf772c0 100644 --- a/docs/getting_started/nginx_configuration.md +++ b/docs/getting_started/nginx_configuration.md @@ -1,6 +1,6 @@ --- title: Nginx configuration -sidebar_position: 5 +sidebar_position: 2 --- Only the ```web``` directory has to be accessible : diff --git a/docs/getting_started/troubleshooting/_category_.json b/docs/getting_started/troubleshooting/_category_.json new file mode 100644 index 00000000..1d4174e9 --- /dev/null +++ b/docs/getting_started/troubleshooting/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "Troubleshooting", + "position": 6 +} \ No newline at end of file diff --git a/docs/getting_started/troubleshooting/trigger_remove_free_text_feature_av.md b/docs/getting_started/troubleshooting/trigger_remove_free_text_feature_av.md new file mode 100644 index 00000000..d993877c --- /dev/null +++ b/docs/getting_started/troubleshooting/trigger_remove_free_text_feature_av.md @@ -0,0 +1,44 @@ +--- +title: Trigger Creation Fails +sidebar_position: 1 +--- + +When installing Thelia on a shared hosting environment, you might encounter an issue during the creation of the trigger `remove_free_text_feature_av`. + +### Error Details + +The following error message may appear: + +```sql +Error: #1142 - The 'TRIGGER' command is denied to user 'sun_temp_1'@'od-8308ad.infomaniak.ch' on table 'feature_product' +``` +### Cause + +This issue is caused by insufficient database permissions for the user. Shared hosting environments often restrict the use of advanced features such as triggers. This limitation is not specific, might also occur with other hosting providers. + +### Workaround + +If trigger creation is not allowed: + +1. Contact your hosting provider to verify if trigger permissions can be granted for your database user. +2. Alternatively, consider switching to a VPS or dedicated server where you have full control over database permissions +3. A workaround is to manually run the following SQL query periodically (e.g., via a cron job) to clean up the `feature_av` table: + +```sql +DELETE FROM `feature_av` +WHERE `id` IN ( + SELECT `feature_av_id` + FROM `feature_product` + WHERE `is_free_text` = 1 + AND `feature_av_id` NOT IN ( + SELECT `feature_av_id` + FROM `feature_product` + ) +); +``` + +### Impact + +This trigger is used to clean up the associated `feature_av` entries when a `feature_product` is deleted. The inability to create this trigger does not impact Thelia's functionality. + +