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 Share Posted July 26 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