Jump to content

Help Fixing ContextErrorException & Notice: Undefined index: base_dir


itcfig

Recommended Posts

Today I tried to open my website (back/front office) and suddenly I got ERROR 500. 

Activating debug mode, I got this message

Quote

ContextErrorException in a520d075a84cd2573e9151066e4e2de9003173c5.file.protect.tpl.php line 91:Notice: Undefined index: base_dir

  1. in a520d075a84cd2573e9151066e4e2de9003173c5.file.protect.tpl.php line 91
  2. at ErrorHandler->handleError('8', 'Undefined index: base_dir', '/home/vesti940/public_html/app/cache/dev/smarty/compile/a5/20/d0/a520d075a84cd2573e9151066e4e2de9003173c5.file.protect.tpl.php', '91', array('_smarty_tpl' => object(Smarty_Dev_Template))) in a520d075a84cd2573e9151066e4e2de9003173c5.file.protect.tpl.php line 91
  3. at content_5b0f514f16cfa9_11460350(object(Smarty_Dev_Template)) in smarty_internal_templatebase.php line 188
  4. at Smarty_Internal_TemplateBase->fetch(null, null, null, null, false, true, false) in SmartyDev.php line 60
  5. at Smarty_Dev_Template->fetch() in Module.php line 2242
  6. at ModuleCore->display('/home/vesti940/public_html/modules/protect/protect.php', 'protect.tpl') in protect.php line 171
  7. at Protect->hookHeader(array('cookie' => object(Cookie), 'cart' => object(Cart), 'altern' => '3')) in Hook.php line 895
  8. at HookCore::coreCallHook(object(Protect), 'hookHeader', array('cookie' => object(Cookie), 'cart' => object(Cart), 'altern' => '3')) in Hook.php line 331
  9. at HookCore::callHookOn(object(Protect), 'displayHeader', array('cookie' => object(Cookie), 'cart' => object(Cart), 'altern' => '3')) in Hook.php line 843
  10. at HookCore::exec('displayHeader') in FrontController.php line 544
  11. at FrontControllerCore->initContent() in IndexController.php line 37
  12. at IndexControllerCore->initContent() in Controller.php line 205
  13. at ControllerCore->run() in Dispatcher.php line 379
  14. at DispatcherCore->dispatch() in index.php line 28

I got no idea why this is happening, especially because I havent made any changes on my website or template in months. Maybe a year.

Is there anyone that could help me out fixing that ? My store is offline at the moment due to this error.

Any help appreciated. Thanks.

Link to comment
Share on other sites

Hello:

Your problem is located in a module called "protect". If you can't access backoffice you can disable in ps_module table directly in DB. Or just delete this specific module folder complete in your ftp.

Regards

  • Like 1
Link to comment
Share on other sites

On 5/7/2019 at 11:35 AM, Rolige said:

Hello:

Your problem is located in a module called "protect". If you can't access backoffice you can disable in ps_module table directly in DB. Or just delete this specific module folder complete in your ftp.

Regards

Hello, Rolige. Thank you very much! Deleting the folder actually solved the whole problem. :D

Link to comment
Share on other sites

  • 10 months later...

Hi, apologies to hijack your post. My prestashop PHP version need to be upgraded to 7.2 and when I do it this is the error I receive when I debug

 

Whoops, looks like something went wrong.

1/1 ContextErrorException in LocalizedCurrency.php line 58: Notice: Undefined index: ZAR

in LocalizedCurrency.php line 58

at ErrorHandler->handleError('8', 'Undefined index: ZAR', '/usr/www/users/riebawrkmn/vendor/icanboogie/cldr/lib/LocalizedCurrency.php', '58', array('count' => null, 'offset' => 'displayName')) in LocalizedCurrency.php line 58

at LocalizedCurrency->get_name() in AccessorTrait.php line 30

at LocalizedObject->__object_get('name') in AccessorTrait.php line 21

at LocalizedObject->__get('name') in LocalizedObjectWithFormatter.php line 34

at LocalizedObjectWithFormatter->__get('name') in Repository.php line 239

at Repository->getCurrency('ZAR') in Currency.php line 105

at CurrencyCore->__construct('1') in AdminController.php line 521

at AdminControllerCore->__construct() in LegacyContext.php line 62

at LegacyContext->getContext() in EmployeeProvider.php line 50

at EmployeeProvider->__construct(object(LegacyContext)) in appDevDebugProjectContainer.php line 2978

at appDevDebugProjectContainer->getPrestashop_Security_Admin_ProviderService() in bootstrap.php.cache line 2248

at Container->get('prestashop.security.admin.provider') in appDevDebugProjectContainer.php line 2364

at appDevDebugProjectContainer->getPrestashop_Adapter_Security_AdminService() in bootstrap.php.cache line 2248

at Container->get('prestashop.adapter.security.admin') in classes.php line 1970

at ContainerAwareEventDispatcher->lazyLoad('kernel.request') in classes.php line 1938

at ContainerAwareEventDispatcher->getListeners('kernel.request') in TraceableEventDispatcher.php line 245

at TraceableEventDispatcher->preProcess('kernel.request') in TraceableEventDispatcher.php line 135

at TraceableEventDispatcher->dispatch('kernel.request', object(GetResponseEvent)) in bootstrap.php.cache line 3235

at HttpKernel->handleRaw(object(Request), '1') in bootstrap.php.cache line 3205

at HttpKernel->handle(object(Request), '1', false) in bootstrap.php.cache line 3359

at ContainerAwareHttpKernel->handle(object(Request), '1', false) in bootstrap.php.cache line 2562

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

Link to comment
Share on other sites

  • 3 months later...
On 08/05/2019 at 19:28, isabelaober said:

Bonjour, Rolige. Merci beaucoup! La suppression du dossier a en fait résolu tout le problème. :RÉ

 

On 07/05/2019 at 16:35, Rolige said:

Bonjour:

Votre problème se situe dans un module appelé "protéger". Si vous ne pouvez pas accéder au backoffice, vous pouvez désactiver dans la table ps_module directement dans la base de données. Ou supprimez simplement ce dossier de module spécifique complet dans votre ftp.

Cordialement

bonjour j'ai le meme probleme:

 

(1/1) ContextErrorException

Avertissement: le commutateur de ciblage "continuer" équivaut à "interrompre". Vouliez-vous utiliser "continue 2"?

dans UnitOfWork.php ligne 2636

at ErrorHandler -> handleError ( 2, '"continuer" le commutateur de ciblage équivaut à "break". Vouliez-vous utiliser "continue 2"?', '/var/www/vhosts/labtaya.com/httpdocs/vendor/doctrine /orm/lib/Doctrine/ORM/UnitOfWork.php ', 2636, array (' class '=>' Doctrine \\ ORM \\ UnitOfWork ',' e '=> 32767,' file '=>' / var / www /vhosts/labtaya.com/httpdocs/vendor/composer/../doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php ') )dans la ligne 156 de DebugClassLoader.php

à exiger ()dans la ligne 156 de DebugClassLoader.php

sur DebugClassLoader -> loadClass ( 'Doctrine \\ ORM \\ UnitOfWork' )

à spl_autoload_call ( 'Doctrine \\ ORM \\ UnitOfWork' )dans EntityManager.php ligne 160

sur EntityManager -> __construct ( objet ( Connexion ), objet ( Configuration ), objet ( ContainerAwareEventManager ) )dans EntityManager.php ligne 850

à EntityManager :: create ( objet ( Connexion ), objet ( Configuration ) )dans la ligne appDevDebugProjectContainer.php 1826

sur appDevDebugProjectContainer -> getDoctrine_Orm_DefaultEntityManagerService ()dans la ligne 8 de getPrestashop_Translation_DatabaseLoaderService.php

à require ( '/var/www/vhosts/labtaya.com/httpdocs/var/cache/dev/ContainerUd2c204/getPrestashop_Translation_DatabaseLoaderService.php' )dans appDevDebugProjectContainer.php ligne 1722

sur appDevDebugProjectContainer -> load ( 'getPrestashop_Translation_DatabaseLoaderService.php' )dans appDevDebugProjectContainer.php ligne 3750

sur appDevDebugProjectContainer -> ContainerUd2c204 \ {fermeture} ()dans ServiceLocator.php ligne 64

sur ServiceLocator -> get ( 'prestashop.translation.database_loader' )dans la ligne 141 de Translator.php

chez Translator -> initialize ()dans Translator.php ligne 127

chez Translator -> initializeCatalogue ( 'fr-FR' )dans la ligne 314 de Translator.php

sur Translator -> dumpCatalogue ( 'fr-FR', objet ( ResourceCheckerConfigCache ) )dans Translator.php ligne 299

sur Translator -> Symfony \ Component \ Translation \ {fermeture} ( objet ( ResourceCheckerConfigCache ) )dans ResourceCheckerConfigCacheFactory.php ligne 43

sur ResourceCheckerConfigCacheFactory -> cache ( '/var/www/vhosts/labtaya.com/httpdocs/var/cache/dev/translations/catalogue.fr-FR.L8dqxxF.php', objet ( fermeture ) )dans Translator.php ligne 300

chez Translator -> initializeCacheCatalogue ( 'fr-FR' )dans la ligne 265 de Translator.php

chez Translator -> loadCatalogue ( 'fr-FR' )dans Translator.php ligne 241

chez Translator -> getCatalogue ( 'fr-FR' )dans Translator.php ligne 198

sur Translator -> trans ( 'Suppression réussie.', array (), 'AdminNotificationsSuccess', null )dans la ligne 57 de PrestaShopTranslatorTrait.php

sur Translator -> trans ( 'Suppression réussie.', array (), 'AdminNotificationsSuccess', null )dans LoggingTranslator.php ligne 48

à LoggingTranslator -> trans ( 'Suppression réussie.', array (), 'AdminNotificationsSuccess', null )dans DataCollectorTranslator.php ligne 50

à DataCollectorTranslator -> trans ( 'Suppression réussie.', array (), 'AdminNotificationsSuccess', null )dans la ligne 57 de PrestaShopTranslatorTrait.php

à DataCollectorTranslator -> trans ( 'Suppression réussie.', array (), 'Admin.Notifications.Success', null )dans la ligne Controller.php 324

à ControllerCore -> trans ( 'Suppression réussie.', tableau ('legacy' => 'htmlspecialchars'), 'Admin.Notifications.Success' )dans AdminController.php ligne 466

à AdminControllerCore -> __construct ()dans LegacyContext.php ligne 85

à LegacyContext -> getContext ()dans UserLocaleListener.php ligne 39

à UserLocaleListener -> __construct ( object ( LegacyContext ) )dans la ligne 2396 de appDevDebugProjectContainer.php

sur appDevDebugProjectContainer -> getPrestashop_UserLocale_ListenerService ()dans la ligne 2883 de appDevDebugProjectContainer.php

sur appDevDebugProjectContainer -> ContainerUd2c204 \ {fermeture} ()dans EventDispatcher.php ligne 229

à EventDispatcher -> sortListeners ( 'kernel.request' )dans EventDispatcher.php ligne 61

sur EventDispatcher -> getListeners ( 'kernel.request' )dans ContainerAwareEventDispatcher.php ligne 128

sur ContainerAwareEventDispatcher -> getListeners ( 'kernel.request' )dans TraceableEventDispatcher.php ligne 262

sur TraceableEventDispatcher -> preProcess ( 'kernel.request' )dans TraceableEventDispatcher.php ligne 137

à TraceableEventDispatcher -> dispatch ( 'kernel.request', object ( GetResponseEvent ) )dans la ligne 127 HttpKernel.php

sur HttpKernel -> handleRaw ( object ( Request ), 1 )dans la ligne HttpKernel.php 68

at HttpKernel -> handle ( object ( Request ), 1, false )dans la ligne 200 de Kernel.php

au noyau -> handle ( objet ( demande ), 1, faux )dans la ligne index.php 86

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...