Jump to content

Translation problem...


PF22

Recommended Posts

Hi there.
I am working with Prestahsop 1.7.6.1 and I have never ending problems with translations.
When I try to acces to translation of a module I get "The server returned a "500 Internal Server Error"."

With debug mode severla errors
 

in src/Adapter/Translations/TranslationRouteFinder.php (line 207)

TranslationRouteFinder->isModuleUsingNewTranslationSystem('50') in src/Adapter/Translations/TranslationRouteFinder.php (line 128)

TranslationRouteFinder->findRoute(object(ParameterBag)) in src/PrestaShopBundle/Controller/Admin/TranslationsController.php (line 127) 

etc...

Then so translation ae picked up from a cache file (/var/cache/prod/translations/catalogue.fr-FR.NXhscRe.php) which is wrong...

 

Any idea woudl be appreciate !

Thanks.

Link to comment
Share on other sites

  • 2 weeks later...

Here is the whole Error MEssage.


Symfony\Component\Debug\Exception\ FatalThrowableError
in src/Adapter/Translations/TranslationRouteFinder.php (line 207)

         */
        private function isModuleUsingNewTranslationSystem($moduleName)
        {
            $module = $this->moduleRepository->getInstanceByName($moduleName);
            return $module->isUsingNewTranslationSystem();
        }
    }

TranslationRouteFinder->isModuleUsingNewTranslationSystem('50') in src/Adapter/Translations/TranslationRouteFinder.php (line 128)

                case self::MODULES:
                    $moduleName = $propertyAccessor->getValue($routeProperties, '[module]');
                    // If module is not using the new translation system -
                    // generate a legacy link for it
                    if (!$this->isModuleUsingNewTranslationSystem($moduleName)) {
                        $language = $propertyAccessor->getValue($routeProperties, '[language]');
                        $route = $this->link->getAdminLink(
                            'AdminTranslations',
                            true,
                            [], 



TranslationRouteFinder->findRoute(object(ParameterBag)) in src/PrestaShopBundle/Controller/Admin/TranslationsController.php (line 127)

         * @return RedirectResponse
         */
        public function modifyTranslationsAction(Request $request)
        {
            $routeFinder = $this->get('prestashop.adapter.translation_route_finder');
            $route = $routeFinder->findRoute($request->query);
            $routeParameters = $routeFinder->findRouteParameters($request->query);
            // If route parameters are empty we are redirecting to a legacy route
            return empty($routeParameters) ? $this->redirect($route) : $this->redirectToRoute($route, $routeParameters);
        } 


TranslationsController->modifyTranslationsAction(object(Request)) in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php (line 151)

            $this->dispatcher->dispatch(KernelEvents::CONTROLLER_ARGUMENTS, $event);
            $controller = $event->getController();
            $arguments = $event->getArguments();
            // call controller
            $response = \call_user_func_array($controller, $arguments);
            // view
            if (!$response instanceof Response) {
                $event = new GetResponseForControllerResultEvent($this, $request, $type, $response);
                $this->dispatcher->dispatch(KernelEvents::VIEW, $event); 



HttpKernel->handleRaw(object(Request), 1) in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php (line 68)

        public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
        {
            $request->headers->set('X-Php-Ob-Level', ob_get_level());
            try {
                return $this->handleRaw($request, $type);
            } catch (\Exception $e) {
                if ($e instanceof RequestExceptionInterface) {
                    $e = new BadRequestHttpException($e->getMessage(), $e);
                }
                if (false === $catch) { 



HttpKernel->handle(object(Request), 1, false) in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php (line 200)

            $this->boot();
            ++$this->requestStackSize;
            $this->resetServices = true;
            try {
                return $this->getHttpKernel()->handle($request, $type, $catch);
            } finally {
                --$this->requestStackSize;
            }
        }


Kernel->handle(object(Request), 1, false) in admin6203a4hwz/index.php (line 86)

    $request = Request::createFromGlobals();
    Request::setTrustedProxies([], Request::HEADER_X_FORWARDED_ALL);
    try {
        require_once __DIR__.'/../autoload.php';
        $response = $kernel->handle($request, HttpKernelInterface::MASTER_REQUEST, false);
        $response->send();
        $kernel->terminate($request, $response);
    } catch (NotFoundHttpException $exception) {
        define('ADMIN_LEGACY_CONTEXT', true);
        // correct Apache charset (except if it's too late) 

 

Edited by PP2607 (see edit history)
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...