Jump to content

Problema al registrar usuario (Error 504)


Recommended Posts

Pues, así tal cual. Tengo un problema en mi tienda, que al registrar a un usuario por el formulario de registro (customer-form.tpl), éste valida y registra todo bien, pero en el proceso de enviar la información al servidor, se demora y arroja al final un error 504.

 

He investigado un poco y al parecer pensé que podría ser un tema con un módulo de correo o "mail" SMPT. Desabilité todos los módulos de correo, y nada, así que desabilité también todos los módulos no nativos, Y desbilité el CDN de mi hosting y nada tampoco. Creo que puede ser un tema de servidor... ¿Alguna idea?

 

En el modo debug no me aparece nada.

 

Uso prestashop 8.2.0

Tema: ps_electronic_121

PHP: 8.2.28 o 7.4.33

(alterno de versiones con propósitos de prueba)

Link to comment
Share on other sites

Esto me paso con un modulo de MailChimp (o similar) que enviaba los datos a su API cuando un nuevo cliente se registrada. Resulta ser que el API vieja había cambiado por una nueva, y la vieja no es que no respondiera, sino que demoraba tanto que eso hacia que diera error en la tienda. Tu problema me huele a algo similar.

Link to comment
Share on other sites

Posted (edited)
hace 1 hora, ComGrafPL dijo:

¿Algún registro del servidor de PrestaShop mostró algún error? ¿Probaste con el modo de depuración activado?

Hola, gracias por la pronta respuesta... Y sí, ya probé con ello, y nada. Así que recién probé con "define('_PS_DEBUG_PROFILING_', true);", y me arrojó esto:

image.thumb.png.947b4e60d74d65bfa7d0c7ee303ffbfa.png
 

Pero, en la Consola de "Inspeccionar elemento, no me arroja nada

image.thumb.png.8c100ee8e8d0b72d21cc5edaf32a0e30.png

Edited by Full Group™
Reformular la respuesta (see edit history)
Link to comment
Share on other sites

hace 1 hora, ExpertoPrestaShop dijo:

Esto me paso con un modulo de MailChimp (o similar) que enviaba los datos a su API cuando un nuevo cliente se registrada. Resulta ser que el API vieja había cambiado por una nueva, y la vieja no es que no respondiera, sino que demoraba tanto que eso hacia que diera error en la tienda. Tu problema me huele a algo similar.

Sí, es raro, porque con el modo debug, y haciendo esas pruebas, no me arroja nada en concreto... Voy a seguir probando, y cualquier cosa les comento. 

 

Igual, si saben algo, pues agradecido de antemano

Link to comment
Share on other sites

hace 3 horas, ExpertoPrestaShop dijo:

Busca los hooks relacionados con Login y con Customer para que verifiques los modulos relacionados con estos eventos. Lo mismo con los override de la tienda.

Ya encontré algo. Ahora me da error 500:

Fatal error: Uncaught --> Smarty: 0():Missing '$template' parameter <-- thrown in /home/customer/www/tuweb.cl/public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php on line 177

Link to comment
Share on other sites

On 4/24/2025 at 6:56 PM, Full Group™ said:

Ya encontré algo. Ahora me da error 500:

Fatal error: Uncaught --> Smarty: 0():Missing '$template' parameter <-- thrown in /home/customer/www/tuweb.cl/public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php on line 177

Consigue la traza completa. En alguna parte se esta intentando llamar a un tpl que no existe.

Link to comment
Share on other sites

Ya lo resolví. El tema estaba en el php del RegistrationController:

<?php /** * Copyright since 2007 PrestaShop SA and Contributors * PrestaShop is an International Registered Trademark & Property of PrestaShop SA * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.md. * It is also available through the world-wide-web at this URL: * https://opensource.org/licenses/OSL-3.0 * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to https://devdocs.prestashop.com/ for more information. * * @author PrestaShop SA and Contributors <[email protected]> * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ class RegistrationControllerCore extends FrontController { /** @var bool */ public $ssl = true; /** @var string */ public $php_self = 'registration'; /** @var bool */ public $auth = false; public function checkAccess() { // If the customer is already logged and he got here by 'accident', we will redirect him away if ($this->context->customer->isLogged() && !$this->ajax) { $this->redirect_after = $this->authRedirection ? urlencode($this->authRedirection) : 'my-account'; $this->redirect(); } return parent::checkAccess(); } public function initContent() { $register_form = $this ->makeCustomerForm() ->setGuestAllowed(false) ->fillWith(Tools::getAllValues()); // If registration form was submitted if (Tools::isSubmit('submitCreate')) { $hookResult = array_reduce( Hook::exec('actionSubmitAccountBefore', [], null, true), function ($carry, $item) { return $carry && $item; }, true ); // If no problem occured in the hook, let's get the user redirected if ($hookResult && $register_form->submit() && !$this->ajax) { // First option - redirect the customer to desired URL specified in 'back' parameter // Before that, we need to check if 'back' is legit URL that is on OUR domain, with the right protocol $back = rawurldecode(Tools::getValue('back')); if (Tools::urlBelongsToShop($back)) { return $this->redirectWithNotifications($back); } // Second option - we will redirect him to authRedirection if set if ($this->authRedirection) { return $this->redirectWithNotifications($this->authRedirection); } // Third option - we will redirect him to home URL return $this->redirectWithNotifications(__PS_BASE_URI__); } } $this->context->smarty->assign([ 'register_form' => $register_form->getProxy(), 'hook_create_account_top' => Hook::exec('displayCustomerAccountFormTop'), ]); $this->setTemplate('customer/registration'); parent::initContent(); } public function getBreadcrumbLinks() { $breadcrumb = parent::getBreadcrumbLinks(); $breadcrumb['links'][] = [ 'title' => $this->trans('Create an account', [], 'Shop.Theme.Customeraccount'), 'url' => $this->context->link->getPageLink('registration'), ]; return $breadcrumb; } /** * {@inheritdoc} */ public function getCanonicalURL() { return $this->context->link->getPageLink('registration'); } }

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...