Peter Troeger Posted March 30, 2023 Share Posted March 30, 2023 Since Updating to the latest Processwire Version 3.0.210 I get the following error. I've have this website running since processwire 2.2. Has anyone else experienced this or an idea what the problem might be? Thanks! Peter Fatal Error: Uncaught Error: Undefined constant "languages" in site/templates/admin.php:39 #0 wire/core/WireHooks.php (1051): TemplateFile->{closure}() #1 wire/core/Wire.php (484): WireHooks->runHooks() #2 wire/core/PagesEditor.php (787): Wire->__call() #3 wire/core/PagesEditor.php (478): PagesEditor->savePageFinish() #4 wire/core/Pages.php (840): PagesEditor->save() #5 wire/core/Wire.php (419): Pages->___save() #6 wire/core/WireHooks.php (952): Wire->_callMethod() #7 wire/core/Wire.php (484): WireHooks->runHooks() #8 wire/core/PagesEditor.php (1235): Wire->__call() #9 wire/core/Pages.php (1017): PagesEditor->_clone() #10 wire/core/Wire.php (422): Pages->___clone() #11 wire/core/WireHooks.php (952): Wire->_callMethod() #12 wire/core/Wire.php (484): WireHooks->runHooks() #13 wire/modules/Process/ProcessPageClone.module (363): Wire->__call() #14 wire/core/Wire.php (413): ProcessPageClone->___process() #15 wire/core/WireHooks.php (952): Wire->_callMethod() #16 wire/core/Wire.php (484): WireHooks->runHooks() #17 wire/modules/Process/ProcessPageClone.module (130): Wire->__call() #18 wire/core/Wire.php (413): ProcessPageClone->___execute() #19 wire/core/WireHooks.php (952): Wire->_callMethod() #20 wire/core/Wire.php (484): WireHooks->runHooks() #21 wire/core/ProcessController.php (350): Wire->__call() #22 wire/core/Wire.php (413): ProcessController->___execute() #23 wire/core/WireHooks.php (952): Wire->_callMethod() #24 wire/core/Wire.php (484): WireHooks->runHooks() #25 wire/core/admin.php (160): Wire->__call() #26 wire/modules/AdminTheme/AdminThemeDefault/controller.php (13): require('...') #27 site/templates/admin.php (101): require('...') #28 wire/core/TemplateFile.php (328): require('...') #29 wire/core/Wire.php (413): TemplateFile->___render() #30 wire/core/WireHooks.php (952): Wire->_callMethod() #31 wire/core/Wire.php (484): WireHooks->runHooks() #32 wire/modules/PageRender.module (575): Wire->__call() #33 wire/core/Wire.php (416): PageRender->___renderPage() #34 wire/core/WireHooks.php (952): Wire->_callMethod() #35 wire/core/Wire.php (484): WireHooks->runHooks() #36 wire/core/WireHooks.php (1060): Wire->__call() #37 wire/core/Wire.php (484): WireHooks->runHooks() #38 wire/modules/Process/ProcessPageView.module (184): Wire->__call() #39 wire/modules/Process/ProcessPageView.module (114): ProcessPageView->renderPage() #40 wire/core/Wire.php (416): ProcessPageView->___execute() #41 wire/core/WireHooks.php (952): Wire->_callMethod() #42 wire/core/Wire.php (484): WireHooks->runHooks() #43 index.php (55): Wire->__call() #44 {main} thrown (line 39 of site/templates/admin.php) Link to comment Share on other sites More sharing options...
Zeka Posted March 30, 2023 Share Posted March 30, 2023 Hi @Peter Troeger Could you please share the code from site/templates/admin.php file on 39 line? Link to comment Share on other sites More sharing options...
Peter Troeger Posted March 30, 2023 Author Share Posted March 30, 2023 @Zeka Good point ? foreach(wire(languages) as $lang){ Link to comment Share on other sites More sharing options...
DV-JF Posted March 30, 2023 Share Posted March 30, 2023 @Peter Troeger This should work: foreach(wire('languages') as $lang){ 3 Link to comment Share on other sites More sharing options...
Peter Troeger Posted March 30, 2023 Author Share Posted March 30, 2023 @DV-JFThank you very much! Sometimes I'm just blind ? 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