From 1ff90cbcc69d1eae361261f3c530c42808bbf783 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9?= Date: Tue, 14 Feb 2023 17:40:10 +0100 Subject: [PATCH 1/2] feat: removed link to help center article for ps_accounts employee_not_found error fix: removed unused translation --- translations/de.php | 2 +- translations/en.php | 2 +- translations/es.php | 3 +-- translations/fr.php | 3 +-- translations/it.php | 3 +-- translations/nl.php | 3 +-- translations/pl.php | 3 +-- translations/pt.php | 3 +-- translations/ro.php | 3 +-- translations/ru.php | 3 +-- views/templates/override/controllers/login/content.tpl | 3 +-- 11 files changed, 11 insertions(+), 20 deletions(-) diff --git a/translations/de.php b/translations/de.php index 321001b0a..55df3cb62 100644 --- a/translations/de.php +++ b/translations/de.php @@ -43,4 +43,4 @@ $_MODULE['<{ps_accounts}prestashop>content_653f49dc0e643470e7b4ae9855974bbd'] = 'Die E-Mail-Adresse ist nicht mit einem PrestaShop-Backoffice-Konto verbunden. Weitere Informationen finden Sie in den [1]FAQ[/1]'; $_MODULE['<{ps_accounts}prestashop>content_729f27762821b8ec88f1a656be7dff72'] = 'Sie müssen Ihr Konto erst aktivieren, indem Sie auf den Link in der E-Mail klicken. Wenn Sie einen neuen Aktivierungslink erhalten möchten,[1]klicken Sie bitte hier[/1]'; $_MODULE['<{ps_accounts}prestashop>content_476ff05d1175f9a35d268828caf300f2'] = 'Beim Login ist ein Fehler aufgetreten, bitte kontaktieren Sie den PrestaShop-Support'; -$_MODULE['<{ps_accounts}prestashop>content_c8fc2e859e06da33e96d200b0106cfa3'] = 'You cannot access the back office with this account. Try another account or contact your administrator. [1]Go to Help Center[/1]'; +$_MODULE['<{ps_accounts}prestashop>content_fd359ea79740b865e45c2bf6fe5d3ab1'] = 'You cannot access the back office with this account. Try another account or contact your administrator.'; diff --git a/translations/en.php b/translations/en.php index 70d411a5b..1efa0357e 100644 --- a/translations/en.php +++ b/translations/en.php @@ -42,4 +42,4 @@ $_MODULE['<{ps_accounts}prestashop>content_8905a5daaa6744846452108776efa036'] = 'Connect with another method'; $_MODULE['<{ps_accounts}prestashop>content_729f27762821b8ec88f1a656be7dff72'] = 'You need to activate your account first by clicking the link in the email. If you need to receive a new activation link,[1]please click here[/1]'; $_MODULE['<{ps_accounts}prestashop>content_476ff05d1175f9a35d268828caf300f2'] = 'An error occured during login, please contact PrestaShop support'; -$_MODULE['<{ps_accounts}prestashop>content_c8fc2e859e06da33e96d200b0106cfa3'] = 'You cannot access the back office with this account. Try another account or contact your administrator. [1]Go to Help Center[/1]'; +$_MODULE['<{ps_accounts}prestashop>content_fd359ea79740b865e45c2bf6fe5d3ab1'] = 'You cannot access the back office with this account. Try another account or contact your administrator.'; diff --git a/translations/es.php b/translations/es.php index bc7845313..c4e75ab34 100644 --- a/translations/es.php +++ b/translations/es.php @@ -40,7 +40,6 @@ $_MODULE['<{ps_accounts}prestashop>content_474684646f833216fdaf79c606af208b'] = 'Accede a tu back office para gestionar tu tienda.'; $_MODULE['<{ps_accounts}prestashop>content_6ed6a381a1de805e2b807f88a95faa2b'] = 'Ir al back office'; $_MODULE['<{ps_accounts}prestashop>content_8905a5daaa6744846452108776efa036'] = 'Conectar con otro método '; -$_MODULE['<{ps_accounts}prestashop>content_653f49dc0e643470e7b4ae9855974bbd'] = 'La dirección de correo electrónico no está asociada a una cuenta de back office PrestaShop. Para obtener más información, ir a la [1]FAQ[/1]'; $_MODULE['<{ps_accounts}prestashop>content_729f27762821b8ec88f1a656be7dff72'] = 'Primero tienes que activar tu cuenta haciendo clic en el enlace del correo electrónico. Si necesitas recibir un nuevo enlace de activación, [1]haz clic aquí[/1]'; $_MODULE['<{ps_accounts}prestashop>content_476ff05d1175f9a35d268828caf300f2'] = 'Se ha producido un error durante el inicio de sesión, ponte en contacto con el soporte de PrestaShop'; -$_MODULE['<{ps_accounts}prestashop>content_c8fc2e859e06da33e96d200b0106cfa3'] = 'No puedes acceder al back office con esta cuenta. Intenta otra cuenta o contacta con tu administrador. [1]Ir a Centro de ayuda[/1]'; +$_MODULE['<{ps_accounts}prestashop>content_fd359ea79740b865e45c2bf6fe5d3ab1'] = 'No puedes acceder al back office con esta cuenta. Intenta otra cuenta o contacta con tu administrador.'; diff --git a/translations/fr.php b/translations/fr.php index 43cce298c..f30de612a 100644 --- a/translations/fr.php +++ b/translations/fr.php @@ -40,7 +40,6 @@ $_MODULE['<{ps_accounts}prestashop>content_474684646f833216fdaf79c606af208b'] = 'Accédez à votre back-office pour gérer votre boutique.'; $_MODULE['<{ps_accounts}prestashop>content_6ed6a381a1de805e2b807f88a95faa2b'] = 'Accéder au back-office'; $_MODULE['<{ps_accounts}prestashop>content_8905a5daaa6744846452108776efa036'] = 'Se connecter avec une autre méthode'; -$_MODULE['<{ps_accounts}prestashop>content_653f49dc0e643470e7b4ae9855974bbd'] = 'L\'adresse e-mail n\'est pas associée à un compte backoffice PrestaShop. Pour en savoir plus, consultez la [1]FAQ[/1].'; $_MODULE['<{ps_accounts}prestashop>content_729f27762821b8ec88f1a656be7dff72'] = 'Vous devez d\'abord activer votre compte en cliquant sur le lien contenu dans l\'e-mail. Si vous souhaitez recevoir un nouveau lien d\'activation, [1]veuillez cliquer ici[/1].'; $_MODULE['<{ps_accounts}prestashop>content_476ff05d1175f9a35d268828caf300f2'] = 'Une erreur s\'est produite lors de la connexion, veuillez contacter le support PrestaShop.'; -$_MODULE['<{ps_accounts}prestashop>content_c8fc2e859e06da33e96d200b0106cfa3'] = 'Vous ne pouvez pas accéder au back-office avec ce compte. Essayez un autre compte ou contactez votre administrateur. [1]Allez sur le Centre d\'aide[/1]'; +$_MODULE['<{ps_accounts}prestashop>content_fd359ea79740b865e45c2bf6fe5d3ab1'] = 'Vous ne pouvez pas accéder au back-office avec ce compte. Essayez un autre compte ou contactez votre administrateur.'; diff --git a/translations/it.php b/translations/it.php index 01c9b0d72..6780b85e6 100644 --- a/translations/it.php +++ b/translations/it.php @@ -40,7 +40,6 @@ $_MODULE['<{ps_accounts}prestashop>content_474684646f833216fdaf79c606af208b'] = 'Accedi al tuo back office per gestire il tuo negozio.'; $_MODULE['<{ps_accounts}prestashop>content_6ed6a381a1de805e2b807f88a95faa2b'] = 'Entra nel back office'; $_MODULE['<{ps_accounts}prestashop>content_8905a5daaa6744846452108776efa036'] = 'Connettiti con un altro metodo'; -$_MODULE['<{ps_accounts}prestashop>content_653f49dc0e643470e7b4ae9855974bbd'] = 'L\'indirizzo e-mail non è associato a un account di back office PrestaShop. Per saperne di più, visita il sito [1]FAQ[/1]'; $_MODULE['<{ps_accounts}prestashop>content_729f27762821b8ec88f1a656be7dff72'] = 'È necessario attivare il proprio account facendo clic sul link contenuto nell\'e-mail. Se ha bisogno di ricevere un nuovo link di attivazione,[1]faccia clic qui[/1].'; $_MODULE['<{ps_accounts}prestashop>content_476ff05d1175f9a35d268828caf300f2'] = 'Si è verificato un errore durante il login, si prega di contattare l\'assistenza PrestaShop'; -$_MODULE['<{ps_accounts}prestashop>content_c8fc2e859e06da33e96d200b0106cfa3'] = 'Non puoi accedere al back office con questo account. Prova con un altro account o contatta l\'amministratore. [1]Vai al Centro assistenza[/1]'; +$_MODULE['<{ps_accounts}prestashop>content_fd359ea79740b865e45c2bf6fe5d3ab1'] = 'Non puoi accedere al back office con questo account. Prova con un altro account o contatta l\'amministratore.'; diff --git a/translations/nl.php b/translations/nl.php index a7a543b02..674f361a5 100644 --- a/translations/nl.php +++ b/translations/nl.php @@ -40,7 +40,6 @@ $_MODULE['<{ps_accounts}prestashop>content_474684646f833216fdaf79c606af208b'] = 'Toegang tot uw backoffice om uw winkel te beheren.'; $_MODULE['<{ps_accounts}prestashop>content_6ed6a381a1de805e2b807f88a95faa2b'] = 'Ga naar de back-office'; $_MODULE['<{ps_accounts}prestashop>content_8905a5daaa6744846452108776efa036'] = 'Verbinden met een andere methode'; -$_MODULE['<{ps_accounts}prestashop>content_653f49dc0e643470e7b4ae9855974bbd'] = 'Het e-mailadres is niet gekoppeld aan een PrestaShop backoffice account. Ga voor meer informatie naar de [1]FAQ[/1]'; $_MODULE['<{ps_accounts}prestashop>content_729f27762821b8ec88f1a656be7dff72'] = 'U moet uw account eerst activeren door op de link in de e-mail te klikken. Als u een nieuwe activeringslink wilt ontvangen,[1]klik dan hier[/1]'; $_MODULE['<{ps_accounts}prestashop>content_476ff05d1175f9a35d268828caf300f2'] = 'Er is een fout opgetreden tijdens het inloggen, neem contact op met PrestaShop support.'; -$_MODULE['<{ps_accounts}prestashop>content_c8fc2e859e06da33e96d200b0106cfa3'] = 'You cannot access the back office with this account. Try another account or contact your administrator. [1]Go to Help Center[/1]'; +$_MODULE['<{ps_accounts}prestashop>content_fd359ea79740b865e45c2bf6fe5d3ab1'] = 'You cannot access the back office with this account. Try another account or contact your administrator.'; diff --git a/translations/pl.php b/translations/pl.php index 99677bdb9..7092de9c7 100644 --- a/translations/pl.php +++ b/translations/pl.php @@ -40,7 +40,6 @@ $_MODULE['<{ps_accounts}prestashop>content_474684646f833216fdaf79c606af208b'] = 'Uzyskaj dostęp do swojego zaplecza, aby zarządzać swoim sklepem.'; $_MODULE['<{ps_accounts}prestashop>content_6ed6a381a1de805e2b807f88a95faa2b'] = 'Wejdz do Panelu administracyjnego'; $_MODULE['<{ps_accounts}prestashop>content_8905a5daaa6744846452108776efa036'] = 'Połącz się z innym urządzeniem'; -$_MODULE['<{ps_accounts}prestashop>content_653f49dc0e643470e7b4ae9855974bbd'] = 'Adres e-mail nie jest powiązany z kontem PrestaShop backoffice. Aby dowiedzieć się więcej, przejdź do [1]FAQ[/1].'; $_MODULE['<{ps_accounts}prestashop>content_729f27762821b8ec88f1a656be7dff72'] = 'Musisz najpierw aktywować swoje konto klikając na link w mailu. Jeśli chcesz otrzymać nowy link aktywacyjny,[1]kliknij tutaj[/1]'; $_MODULE['<{ps_accounts}prestashop>content_476ff05d1175f9a35d268828caf300f2'] = 'Wystąpił błąd podczas logowania, prosimy o kontakt z supportem PrestaShop'; -$_MODULE['<{ps_accounts}prestashop>content_c8fc2e859e06da33e96d200b0106cfa3'] = 'You cannot access the back office with this account. Try another account or contact your administrator. [1]Go to Help Center[/1]'; +$_MODULE['<{ps_accounts}prestashop>content_fd359ea79740b865e45c2bf6fe5d3ab1'] = 'You cannot access the back office with this account. Try another account or contact your administrator.'; diff --git a/translations/pt.php b/translations/pt.php index 763cc3996..52202f513 100644 --- a/translations/pt.php +++ b/translations/pt.php @@ -40,7 +40,6 @@ $_MODULE['<{ps_accounts}prestashop>content_474684646f833216fdaf79c606af208b'] = 'Aceda ao seu back office para gerir a sua loja.'; $_MODULE['<{ps_accounts}prestashop>content_6ed6a381a1de805e2b807f88a95faa2b'] = 'Voltar para o back office'; $_MODULE['<{ps_accounts}prestashop>content_8905a5daaa6744846452108776efa036'] = 'Ligar com outro método'; -$_MODULE['<{ps_accounts}prestashop>content_653f49dc0e643470e7b4ae9855974bbd'] = 'O endereço de correio electrónico não está associado a uma conta de backoffice da PrestaShop. Para saber mais, vá a [1]FAQ[/1]'; $_MODULE['<{ps_accounts}prestashop>content_729f27762821b8ec88f1a656be7dff72'] = 'Tem de activar a sua conta primeiro clicando na ligação no e-mail. Se precisar de receber uma nova ligação de activação,[1]por favor clique aqui[/1]'; $_MODULE['<{ps_accounts}prestashop>content_476ff05d1175f9a35d268828caf300f2'] = 'Ocorreu um erro durante o login, por favor contacte o suporte da PrestaShop'; -$_MODULE['<{ps_accounts}prestashop>content_c8fc2e859e06da33e96d200b0106cfa3'] = 'You cannot access the back office with this account. Try another account or contact your administrator. [1]Go to Help Center[/1]'; +$_MODULE['<{ps_accounts}prestashop>content_fd359ea79740b865e45c2bf6fe5d3ab1'] = 'You cannot access the back office with this account. Try another account or contact your administrator.'; diff --git a/translations/ro.php b/translations/ro.php index 225651c5e..77dc53574 100644 --- a/translations/ro.php +++ b/translations/ro.php @@ -40,7 +40,6 @@ $_MODULE['<{ps_accounts}prestashop>content_474684646f833216fdaf79c606af208b'] = 'Accesează-ți Back Office pentru a gestiona magazinul tău.'; $_MODULE['<{ps_accounts}prestashop>content_6ed6a381a1de805e2b807f88a95faa2b'] = 'Înapoi la back office'; $_MODULE['<{ps_accounts}prestashop>content_8905a5daaa6744846452108776efa036'] = 'Conectează-te cu o altă metodă'; -$_MODULE['<{ps_accounts}prestashop>content_653f49dc0e643470e7b4ae9855974bbd'] = 'Adresa de e-mail nu este asociată unui cont PrestaShop backoffice. Pentru a afla mai multe, accesați [1]FAQ[/1]'; $_MODULE['<{ps_accounts}prestashop>content_729f27762821b8ec88f1a656be7dff72'] = 'Trebuie să îți activezi contul mai întâi făcând clic pe link-ul din e-mail. Dacă ai nevoie să primești un nou link de activare,[1]te rugăm să apeși aici[/1]'; $_MODULE['<{ps_accounts}prestashop>content_476ff05d1175f9a35d268828caf300f2'] = 'A apărut o eroare în timpul autentificării, te rugăm să contactezi suportul PrestaShop'; -$_MODULE['<{ps_accounts}prestashop>content_c8fc2e859e06da33e96d200b0106cfa3'] = 'Nu poți accesa back office-ul cu acest cont. Încearcă un alt cont sau contactează administratorul. [1]Mergi la Centrul de asistență[/1]'; +$_MODULE['<{ps_accounts}prestashop>content_fd359ea79740b865e45c2bf6fe5d3ab1'] = 'Nu poți accesa back office-ul cu acest cont. Încearcă un alt cont sau contactează administratorul.'; diff --git a/translations/ru.php b/translations/ru.php index 0cc36e2e1..e0d4bff7d 100644 --- a/translations/ru.php +++ b/translations/ru.php @@ -40,7 +40,6 @@ $_MODULE['<{ps_accounts}prestashop>content_474684646f833216fdaf79c606af208b'] = 'Access your back office to manage your store.'; $_MODULE['<{ps_accounts}prestashop>content_6ed6a381a1de805e2b807f88a95faa2b'] = 'Go to the back office'; $_MODULE['<{ps_accounts}prestashop>content_8905a5daaa6744846452108776efa036'] = 'Connect with another method'; -$_MODULE['<{ps_accounts}prestashop>content_653f49dc0e643470e7b4ae9855974bbd'] = 'The email address is not associated to a PrestaShop backoffice account. To learn more, go to the [1]FAQ[/1]'; $_MODULE['<{ps_accounts}prestashop>content_729f27762821b8ec88f1a656be7dff72'] = 'You need to activate your account first by clicking the link in the email. If you need to receive a new activation link,[1]please click here[/1]'; $_MODULE['<{ps_accounts}prestashop>content_476ff05d1175f9a35d268828caf300f2'] = 'An error occured during login, please contact PrestaShop support'; -$_MODULE['<{ps_accounts}prestashop>content_c8fc2e859e06da33e96d200b0106cfa3'] = 'You cannot access the back office with this account. Try another account or contact your administrator. [1]Go to Help Center[/1]'; +$_MODULE['<{ps_accounts}prestashop>content_fd359ea79740b865e45c2bf6fe5d3ab1'] = 'You cannot access the back office with this account. Try another account or contact your administrator.'; diff --git a/views/templates/override/controllers/login/content.tpl b/views/templates/override/controllers/login/content.tpl index a7900c7b5..2f9ab9738 100755 --- a/views/templates/override/controllers/login/content.tpl +++ b/views/templates/override/controllers/login/content.tpl @@ -81,8 +81,7 @@ {if $loginError eq 'employee_not_found'} {l - s='You cannot access the back office with this account. Try another account or contact your administrator. [1]Go to Help Center[/1]' - tags=[""] + s='You cannot access the back office with this account. Try another account or contact your administrator.' mod='ps_accounts' } {elseif $loginError eq 'email_not_verified'} From 757d8f30bb771a81e90ba6382c81738da16c2169 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9?= Date: Fri, 17 Feb 2023 10:58:23 +0100 Subject: [PATCH 2/2] fix: remove url and url getter for help-center --- config/config.yml.dist | 2 -- controllers/admin/AdminLoginController.php | 15 --------------- 2 files changed, 17 deletions(-) diff --git a/config/config.yml.dist b/config/config.yml.dist index 2ba862a1a..717859049 100644 --- a/config/config.yml.dist +++ b/config/config.yml.dist @@ -32,5 +32,3 @@ parameters: ps_accounts.oauth2_url_resource_owner_details: 'http://hydra:4444/userinfo' ps_accounts.oauth2_url_session_logout: 'http://hydra:4444/oauth2/sessions/logout' - ps_accounts.uri_help_center_en: "https://help-center.prestashop.com/en/articles/8087001455634-i-cannot-log-in-to-the-back-office-of-my-edition-shop-with-my-prestashop-account" - ps_accounts.uri_help_center_fr: "https://help-center.prestashop.com/fr/articles/8087001455634-je-ne-peux-pas-me-connecter-au-back-office-de-ma-boutique-edition-avec-mon-compte-prestashop" diff --git a/controllers/admin/AdminLoginController.php b/controllers/admin/AdminLoginController.php index 4c66e4ef0..b90b31c7e 100644 --- a/controllers/admin/AdminLoginController.php +++ b/controllers/admin/AdminLoginController.php @@ -140,7 +140,6 @@ public function createPsAccountsLoginTemplate() $isoCode = $this->context->currentLocale->getCode(); - $this->context->smarty->assign('uriHelpCenter', $this->getUriHelpCenter($isoCode)); $this->context->smarty->assign('loginError', $session->remove('loginError')); $this->context->smarty->assign('meta_title', ''); $this->context->smarty->assign('ssoResendVerificationEmail', @@ -174,18 +173,4 @@ public function getPsAccountsTemplateDir() DIRECTORY_SEPARATOR . 'login' . DIRECTORY_SEPARATOR; } - - /** - * @param string $isoCode - * - * @return mixed - * - * @throws Exception - */ - private function getUriHelpCenter(string $isoCode) - { - return 0 !== strpos($isoCode, 'fr') - ? $this->psAccountsModule->getParameter('ps_accounts.uri_help_center_en') - : $this->psAccountsModule->getParameter('ps_accounts.uri_help_center_fr'); - } }