sergiorx8 Posted February 14, 2023 Share Posted February 14, 2023 (edited) Buenas tardes gente, acabo de toparme con un error que no se si es alg煤n tipo de bug de la nueva versi贸n de PrestaShop (8.0.1). Al intentar actualizar las traducciones de mi tema (es la primera vez que me meto ya que es una nueva instalaci贸n), se queda cargando infinitamente y sale una alerta arriba a la derecha que pone "undefined" (adjunto captura). 驴Sab茅is de que puede ser? Los valores del servidor (max_execution_time, memory_limit, max_input_vars... etc) tambi茅n est谩n aumentados por si acaso pero nada.聽 Edited February 15, 2023 by sergiorx8 (see edit history) Link to comment Share on other sites More sharing options...
ComGrafPL Posted February 14, 2023 Share Posted February 14, 2023 驴Cu谩l es la versi贸n de PHP? Link to comment Share on other sites More sharing options...
sergiorx8 Posted February 14, 2023 Author Share Posted February 14, 2023 La versi贸n de PHP es la 8.0.27 Link to comment Share on other sites More sharing options...
idnovate.com Posted February 15, 2023 Share Posted February 15, 2023 Habilita el modo DEBUG. Revisa la respuesta de la petici贸n en la consola del navegador (F12), pesta帽a "Red/Network". Link to comment Share on other sites More sharing options...
sergiorx8 Posted February 15, 2023 Author Share Posted February 15, 2023 Esto es lo que obtengo (archivo adjunto), se ve que hay un error 500 en el聽translations.bundle.js, pero ni idea a que puede ser debido. Link to comment Share on other sites More sharing options...
idnovate.com Posted February 15, 2023 Share Posted February 15, 2023 (edited) Ponte encima de la 煤ltima l铆nea (la del error 500) y revisa la pesta帽a "Respuesta/Response". Edited February 15, 2023 by idnovate.com (see edit history) Link to comment Share on other sites More sharing options...
sergiorx8 Posted February 15, 2023 Author Share Posted February 15, 2023 Justo estaba mirando eso ahora, lo pongo a continuaci贸n: { "type": "https:\/\/tools.ietf.org\/html\/rfc2616#section-10", "title": "An error occurred", "status": 500, "detail": "md5(): Argument #1 ($string) must be of type string, int given", "class": "TypeError", "trace": [{ "namespace": "", "short_class": "", "class": "", "type": "", "function": "", "file": "\/home\/nombredetienda\/www\/src\/Core\/Translation\/Storage\/Provider\/ModuleCatalogueLayersProvider.php", "line": 306, "args": [] }, { "namespace": "", "short_class": "", "class": "", "type": "", "function": "md5", "file": "\/home\/nombredetienda\/www\/src\/Core\/Translation\/Storage\/Provider\/ModuleCatalogueLayersProvider.php", "line": 306, "args": [ ["integer", 4] ] }, { "namespace": "PrestaShop\\PrestaShop\\Core\\Translation\\Storage\\Provider", "short_class": "ModuleCatalogueLayersProvider", "class": "PrestaShop\\PrestaShop\\Core\\Translation\\Storage\\Provider\\ModuleCatalogueLayersProvider", "type": "->", "function": "buildTranslationCatalogueFromLegacyFiles", "file": "\/home\/nombredetienda\/www\/src\/Core\/Translation\/Storage\/Provider\/ModuleCatalogueLayersProvider.php", "line": 195, "args": [ ["string", "es-ES"] ] }, { "namespace": "PrestaShop\\PrestaShop\\Core\\Translation\\Storage\\Provider", "short_class": "ModuleCatalogueLayersProvider", "class": "PrestaShop\\PrestaShop\\Core\\Translation\\Storage\\Provider\\ModuleCatalogueLayersProvider", "type": "->", "function": "getFileTranslatedCatalogue", "file": "\/home\/nombredetienda\/www\/src\/Core\/Translation\/Storage\/Provider\/ThemeCatalogueLayersProvider.php", "line": 256, "args": [ ["string", "es-ES"] ] }, { "namespace": "PrestaShop\\PrestaShop\\Core\\Translation\\Storage\\Provider", "short_class": "ThemeCatalogueLayersProvider", "class": "PrestaShop\\PrestaShop\\Core\\Translation\\Storage\\Provider\\ThemeCatalogueLayersProvider", "type": "->", "function": "getModulesTranslations", "file": "\/home\/nombredetienda\/www\/src\/Core\/Translation\/Storage\/Provider\/ThemeCatalogueLayersProvider.php", "line": 166, "args": [ ["string", "es-ES"] ] }, { "namespace": "PrestaShop\\PrestaShop\\Core\\Translation\\Storage\\Provider", "short_class": "ThemeCatalogueLayersProvider", "class": "PrestaShop\\PrestaShop\\Core\\Translation\\Storage\\Provider\\ThemeCatalogueLayersProvider", "type": "->", "function": "getFileTranslatedCatalogue", "file": "\/home\/nombredetienda\/www\/src\/Core\/Translation\/Builder\/TranslationCatalogueBuilder.php", "line": 183, "args": [ ["string", "es-ES"] ] }, { "namespace": "PrestaShop\\PrestaShop\\Core\\Translation\\Builder", "short_class": "TranslationCatalogueBuilder", "class": "PrestaShop\\PrestaShop\\Core\\Translation\\Builder\\TranslationCatalogueBuilder", "type": "->", "function": "getRawCatalogue", "file": "\/home\/nombredetienda\/www\/src\/Core\/Translation\/Builder\/TranslationsTreeBuilder.php", "line": 81, "args": [ ["object", "PrestaShop\\PrestaShop\\Core\\Translation\\Storage\\Provider\\Definition\\ThemeProviderDefinition"], ["string", "es-ES"], ["array", []] ] }, { "namespace": "PrestaShop\\PrestaShop\\Core\\Translation\\Builder", "short_class": "TranslationsTreeBuilder", "class": "PrestaShop\\PrestaShop\\Core\\Translation\\Builder\\TranslationsTreeBuilder", "type": "->", "function": "getTree", "file": "\/home\/nombredetienda\/www\/src\/PrestaShopBundle\/Service\/TranslationService.php", "line": 166, "args": [ ["object", "PrestaShop\\PrestaShop\\Core\\Translation\\Storage\\Provider\\Definition\\ThemeProviderDefinition"], ["string", "es-ES"], ["array", []] ] }, { "namespace": "PrestaShopBundle\\Service", "short_class": "TranslationService", "class": "PrestaShopBundle\\Service\\TranslationService", "type": "->", "function": "getTranslationsTree", "file": "\/home\/nombredetienda\/www\/src\/PrestaShopBundle\/Controller\/Api\/TranslationController.php", "line": 381, "args": [ ["object", "PrestaShop\\PrestaShop\\Core\\Translation\\Storage\\Provider\\Definition\\ThemeProviderDefinition"], ["string", "es-ES"], ["array", []] ] }, { "namespace": "PrestaShopBundle\\Controller\\Api", "short_class": "TranslationController", "class": "PrestaShopBundle\\Controller\\Api\\TranslationController", "type": "->", "function": "getTree", "file": "\/home\/nombredetienda\/www\/src\/PrestaShopBundle\/Controller\/Api\/TranslationController.php", "line": 164, "args": [ ["string", "es"], ["string", "themes"], ["array", []], ["string", "warehouse"] ] }, { "namespace": "PrestaShopBundle\\Controller\\Api", "short_class": "TranslationController", "class": "PrestaShopBundle\\Controller\\Api\\TranslationController", "type": "->", "function": "listTreeAction", "file": "\/home\/nombredetienda\/www\/vendor\/symfony\/symfony\/src\/Symfony\/Component\/HttpKernel\/HttpKernel.php", "line": 169, "args": [ ["object", "Symfony\\Component\\HttpFoundation\\Request"] ] }, { "namespace": "Symfony\\Component\\HttpKernel", "short_class": "HttpKernel", "class": "Symfony\\Component\\HttpKernel\\HttpKernel", "type": "->", "function": "handleRaw", "file": "\/home\/nombredetienda\/www\/vendor\/symfony\/symfony\/src\/Symfony\/Component\/HttpKernel\/HttpKernel.php", "line": 81, "args": [ ["object", "Symfony\\Component\\HttpFoundation\\Request"], ["integer", 1] ] }, { "namespace": "Symfony\\Component\\HttpKernel", "short_class": "HttpKernel", "class": "Symfony\\Component\\HttpKernel\\HttpKernel", "type": "->", "function": "handle", "file": "\/home\/nombredetienda\/www\/vendor\/symfony\/symfony\/src\/Symfony\/Component\/HttpKernel\/Kernel.php", "line": 201, "args": [ ["object", "Symfony\\Component\\HttpFoundation\\Request"], ["integer", 1], ["boolean", false] ] }, { "namespace": "Symfony\\Component\\HttpKernel", "short_class": "Kernel", "class": "Symfony\\Component\\HttpKernel\\Kernel", "type": "->", "function": "handle", "file": "\/home\/nombredetienda\/www\/micarpetadeadmin\/index.php", "line": 81, "args": [ ["object", "Symfony\\Component\\HttpFoundation\\Request"], ["integer", 1], ["boolean", false] ] }] } 聽 Link to comment Share on other sites More sharing options...
idnovate.com Posted February 15, 2023 Share Posted February 15, 2023 (edited) Edita el fichero /src/Core/Translation/Storage/Provider/ModuleCatalogueLayersProvider.php. Busca la l铆nea 306, deber铆as tener esto: $legacyKey = md5($translationKey); Pon antes: if (is_int($translationKey)) { dump($currentDomain); dump($translationKey); die; } Y a ver qu茅 devuelve la petici贸n ahora. Edited February 15, 2023 by idnovate.com (see edit history) 1 Link to comment Share on other sites More sharing options...
sergiorx8 Posted February 15, 2023 Author Share Posted February 15, 2023 (edited) Obtengo lo siguiente (he tenido que borrar el codigo js y css porque me bloqueaba cloudflare):聽 <span class=sf-dump-str title="31 characters">ModulesIqitmegamenuIqitmegamenu</span> <pre class=sf-dump id=sf-dump-764014833 data-indent-pad=" "><a href="http://dominiomitienda.com/carpetaadmin/index.php/_profiler/open?_token=exvjNBIXpC2lBrjzZZsm749mhR-hnEkmqiuM6FuODJQ?file=src/Core/Translation/Storage/Provider/ModuleCatalogueLayersProvider.php&line=309#line309" title="/home/nombremitienda/www/src/Core/Translation/Storage/Provider/ModuleCatalogueLayersProvider.php"><span class=sf-dump-meta>ModuleCatalogueLayersProvider.php</span></a> on line <span class=sf-dump-meta>309</span>: <span class=sf-dump-num>4</span> 聽 Edited February 15, 2023 by sergiorx8 (see edit history) Link to comment Share on other sites More sharing options...
sergiorx8 Posted February 15, 2023 Author Share Posted February 15, 2023 Envi贸 una foto del c贸digo porque al intentar poner el c贸digo antes creo que me banearon y no me deja ponerlo ahora. Link to comment Share on other sites More sharing options...
idnovate.com Posted February 15, 2023 Share Posted February 15, 2023 Ejecuta esta query a ver qu茅 sale: SELECT * FROM `ps_translation` WHERE `domain` = 'ModulesIqitmegamenuIqitmegamenu' 聽 Link to comment Share on other sites More sharing options...
sergiorx8 Posted February 15, 2023 Author Share Posted February 15, 2023 Nada, vac铆a... pero ya no con esa consulta solo, lo que es la tabla en general esta vac铆a. Link to comment Share on other sites More sharing options...
idnovate.com Posted February 15, 2023 Share Posted February 15, 2023 Pega el contenido del fichero /modules/iqitmegamenu/translations/es.php. Revisa tambi茅n si est谩 la traducci贸n sobreescrita en el theme. Link to comment Share on other sites More sharing options...
sergiorx8 Posted February 15, 2023 Author Share Posted February 15, 2023 El archivo es.php esta vac铆o, y el de los dem谩s idiomas vac铆os tambi茅n. En el tema tampoco se sobrescribe que yo haya visto. Link to comment Share on other sites More sharing options...
idnovate.com Posted February 15, 2023 Share Posted February 15, 2023 Pues si me quieres dar acceso FTP, porque otra cosa no puedo hacer 馃檨 Link to comment Share on other sites More sharing options...
sergiorx8 Posted February 16, 2023 Author Share Posted February 16, 2023 Muchas gracias聽idnovate.com, ahora te hablo por privado. Desde el hosting hable con el soporte t茅cnico a ver si ve铆an algo en el log y dec铆an que vieron este error, pero no se si tendr谩 que ver: [Wed Feb 15 14:44:46.558666 2023] [proxy_fcgi:error] [pid 13082:tid 140201078810368] [client 79.116.134.226:42928] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught SmartyException: Unable to load template 'module:ps_languageselector/ps_languageselector-mobile-menu.tpl' in 'module:iqitmegamenu/views/templates/hook/mobile.tpl' in /home/nombremitienda/www/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php:195\nStack trace:\n#0 /home/nombremitienda/www/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(385): Smarty_Internal_Template->render()\n#1 /home/nombremitienda/www/var/cache/dev/smarty/compile/warehouse_child/98/cb/9e/98cb9e3fbf4c879e219db3109049550b02a2da1b_2.module.iqitmegamenuviewstemplate.php(229): Smarty_Internal_Template->_subTemplateRender('module:ps_langu...', 'iqitmegamenu|in...', 'warehouse-child', 0, 3600, Array, 0, false)\n#2 /home/nombremitienda/www/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_63ecaf85053eb4_66689497(Object(SmartyDevTemplate))\n#3 /home/nombremitienda/www/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base-...', referer: http://nombremitienda.com/micarpetaadmin/index.php/improve/international/translations/?lang=es&type=themes&locale=es-ES&selected=warehouse&_token=exvjNBIXpC2lBrjzZZsm749mhR-hnEkmqiuM6FuODJQ 聽 1 Link to comment Share on other sites More sharing options...
idnovate.com Posted February 20, 2023 Share Posted February 20, 2023 (edited) Modifica el fichero /src/Core/Translation/Storage/Provider/ModuleCatalogueLayersProvider.php. Busca la l铆nea 306, deber铆as tener esto: $legacyKey = md5($translationKey); Pon antes: if (is_int($translationKey)) { continue; } 聽 Edited February 20, 2023 by idnovate.com (see edit history) 2 Link to comment Share on other sites More sharing options...
sergiorx8 Posted February 21, 2023 Author Share Posted February 21, 2023 18 hours ago, idnovate.com said: Modifica el fichero /src/Core/Translation/Storage/Provider/ModuleCatalogueLayersProvider.php. Busca la l铆nea 306, deber铆as tener esto: $legacyKey = md5($translationKey); Pon antes: if (is_int($translationKey)) { continue; } 聽 Muchas gracias idnovate.com, todo solucionado ya con la modificaci贸n que has puesto聽馃榿 1 Link to comment Share on other sites More sharing options...
Olena123 Posted July 21, 2023 Share Posted July 21, 2023 Hi. I have the same problem:( I聽 add聽 if (is_int($translationKey)) { continue; }聽 before $legacyKey = md5($translationKey); but message undefined is still there. 聽 You only add this commands to聽/src/Core/Translation/Storage/Provider/ModuleCatalogueLayersProvider.php?聽 聽 聽 Link to comment Share on other sites More sharing options...
idnovate.com Posted July 26, 2023 Share Posted July 26, 2023 On 7/21/2023 at 4:03 PM, Olena123 said: Hi. I have the same problem:( I聽 add聽 if (is_int($translationKey)) { continue; }聽 before $legacyKey = md5($translationKey); but message undefined is still there. 聽 You only add this commands to聽/src/Core/Translation/Storage/Provider/ModuleCatalogueLayersProvider.php?聽 聽 聽 驴Cu谩l es tu error exactamente? Link to comment Share on other sites More sharing options...
Chisla Posted December 19, 2023 Share Posted December 19, 2023 Add before (src/Core/Translation/Storage/Provider/ModuleCatalogueLayersProvider.php, line 306) $legacyKey = md5($translationKey); if(!is_string($translationKey)) continue; 聽 Link to comment Share on other sites More sharing options...
Sergi_11 Posted July 26, 2024 Share Posted July 26, 2024 Hi, I have the same problem. I added: if (!is_string($translationKey)) continue; or if (is_int($translationKey)) { continue; } but I still get the "undefined" message on top. Any with the same problem? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now