Skip to content

Cache:clear giving XML parsing issues #39040

Closed
@gabrielspiteri-highlight

Description

Symfony version(s) affected: 4.4.16

Description
XML Parsing issue when running cache:clear

How to reproduce
The problem happens when executing the cache:clear command. Both when it's trigger automatically after a composer install/update or when triggered manually

Environment: Docker container running PHP 7.4 and Symfony 4.4.16

When running composer install --no-scripts and then subsequently running php bin/console cache:clear -v ... I get the following:

root@5c1f66038bd0:/var/www# php bin/console cache:clear -v

 // Clearing the cache for the dev environment with debug true

 // Clearing outdated warmup directory...

 // Cache is fresh.

 // Warming up optional cache...


In XliffFileLoader.php line 61:
                                                                                                                              
  [Symfony\Component\Translation\Exception\InvalidResourceException]                                                          
  Invalid resource provided: "/var/www/vendor/symfony/validator/Resources/translations/validators.en.xlf"; Errors: [ERROR 15  
  49] failed to load external entity "file:////var/www/vendor/symfony/translation/Util/../Resources/schemas/xml.xsd" (in n/a  
   - line 0, column 0)                                                                                                        
  [ERROR 3084] Element '{http://www.w3.org/2001/XMLSchema}import': Failed to locate a schema at location 'file:////var/www/v  
  endor/symfony/translation/Util/../Resources/schemas/xml.xsd'. Skipping the import. (in in_memory_buffer - line 33, column   
  0)                                                                                                                          
  [ERROR 3004] attribute use (unknown), attribute 'ref': The QName value '{http://www.w3.org/XML/1998/namespace}lang' does n  
  ot resolve to a(n) attribute declaration. (in in_memory_buffer - line 1661, column 0)                                       
  [ERROR 3004] attribute use (unknown), attribute 'ref': The QName value '{http://www.w3.org/XML/1998/namespace}space' does   
  not resolve to a(n) attribute declaration. (in in_memory_buffer - line 1676, column 0)                                      
  [ERROR 3004] attribute use (unknown), attribute 'ref': The QName value '{http://www.w3.org/XML/1998/namespace}lang' does n  
  ot resolve to a(n) attribute declaration. (in in_memory_buffer - line 1770, column 0)                                       
  [ERROR 3004] attribute use (unknown), attribute 'ref': The QName value '{http://www.w3.org/XML/1998/namespace}space' does   
  not resolve to a(n) attribute declaration. (in in_memory_buffer - line 1879, column 0)                                      
  [ERROR 3004] attribute use (unknown), attribute 'ref': The QName value '{http://www.w3.org/XML/1998/namespace}space' does   
  not resolve to a(n) attribute declaration. (in in_memory_buffer - line 1925, column 0)                                      
  [ERROR 3004] attribute use (unknown), attribute 'ref': The QName value '{http://www.w3.org/XML/1998/namespace}lang' does n  
  ot resolve to a(n) attribute declaration. (in in_memory_buffer - line 1964, column 0)                                       
  [ERROR 3004] attribute use (unknown), attribute 'ref': The QName value '{http://www.w3.org/XML/1998/namespace}lang' does n  
  ot resolve to a(n) attribute declaration. (in in_memory_buffer - line 1987, column 0)                                       
  [ERROR 3004] attribute use (unknown), attribute 'ref': The QName value '{http://www.w3.org/XML/1998/namespace}lang' does n  
  ot resolve to a(n) attribute declaration. (in in_memory_buffer - line 2013, column 0)                                       
  [ERROR 3004] attribute use (unknown), attribute 'ref': The QName value '{http://www.w3.org/XML/1998/namespace}lang' does n  
  ot resolve to a(n) attribute declaration. (in in_memory_buffer - line 2053, column 0)                                       
  [ERROR 3004] attribute use (unknown), attribute 'ref': The QName value '{http://www.w3.org/XML/1998/namespace}space' does   
  not resolve to a(n) attribute declaration. (in in_memory_buffer - line 2056, column 0)                                      
                                                                                                                              

Exception trace:
  at /var/www/vendor/symfony/translation/Loader/XliffFileLoader.php:61
 Symfony\Component\Translation\Loader\XliffFileLoader->extract() at /var/www/vendor/symfony/translation/Loader/XliffFileLoader.
php:42
 Symfony\Component\Translation\Loader\XliffFileLoader->load() at /var/www/vendor/symfony/translation/Translator.php:437
 Symfony\Component\Translation\Translator->doLoadCatalogue() at /var/www/vendor/symfony/framework-bundle/Translation/Translator
.php:133
 Symfony\Bundle\FrameworkBundle\Translation\Translator->doLoadCatalogue() at /var/www/vendor/symfony/translation/Translator.php
:329
 Symfony\Component\Translation\Translator->initializeCatalogue() at /var/www/vendor/symfony/framework-bundle/Translation/Transl
ator.php:125
 Symfony\Bundle\FrameworkBundle\Translation\Translator->initializeCatalogue() at /var/www/vendor/symfony/translation/Translator
.php:363
 Symfony\Component\Translation\Translator->dumpCatalogue() at /var/www/vendor/symfony/translation/Translator.php:348
 Symfony\Component\Translation\Translator->Symfony\Component\Translation\{closure}() at /var/www/vendor/symfony/config/Resource
CheckerConfigCacheFactory.php:43
 Symfony\Component\Config\ResourceCheckerConfigCacheFactory->cache() at /var/www/vendor/symfony/translation/Translator.php:349
 Symfony\Component\Translation\Translator->initializeCacheCatalogue() at /var/www/vendor/symfony/translation/Translator.php:317
 Symfony\Component\Translation\Translator->loadCatalogue() at /var/www/vendor/symfony/framework-bundle/Translation/Translator.p
hp:107
 Symfony\Bundle\FrameworkBundle\Translation\Translator->warmUp() at /var/www/vendor/symfony/translation/DataCollectorTranslator
.php:110
 Symfony\Component\Translation\DataCollectorTranslator->warmUp() at /var/www/vendor/symfony/framework-bundle/CacheWarmer/Transl
ationsCacheWarmer.php:46
 Symfony\Bundle\FrameworkBundle\CacheWarmer\TranslationsCacheWarmer->warmUp() at /var/www/vendor/symfony/http-kernel/CacheWarme
r/CacheWarmerAggregate.php:97
 Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerAggregate->warmUp() at /var/www/vendor/symfony/framework-bundle/Command/Ca
cheClearCommand.php:120
 Symfony\Bundle\FrameworkBundle\Command\CacheClearCommand->execute() at /var/www/vendor/symfony/console/Command/Command.php:255
 Symfony\Component\Console\Command\Command->run() at /var/www/vendor/symfony/console/Application.php:1027
 Symfony\Component\Console\Application->doRunCommand() at /var/www/vendor/symfony/framework-bundle/Console/Application.php:97
 Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() at /var/www/vendor/symfony/console/Application.php:273
 Symfony\Component\Console\Application->doRun() at /var/www/vendor/symfony/framework-bundle/Console/Application.php:83
 Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /var/www/vendor/symfony/console/Application.php:149
 Symfony\Component\Console\Application->run() at /var/www/bin/console:42```

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy