Jump to content

in_dev suggestion


CodingJungle

Recommended Posts

okay the other night i was working on an app, and i was adding lang strings. when i realized i was incredibly tired. so i closed out my IDE. when i got up the next day, I had an error on my local trying to load it, it was this:

Whoops\Exception\ErrorException thrown with message "Undefined index: content_field_1_desc"

Stacktrace:
#21 Whoops\Exception\ErrorException in /home/michael/public_html/rc3/system/Lang/Lang.php:532
#20 Whoops\Run:handleError in /home/michael/public_html/rc3/system/Lang/Lang.php:532
#19 IPS\_Lang:get in /home/michael/public_html/rc3/applications/cms/sources/Fields/Fields.php:204
#18 IPS\cms\_Fields:roots in /home/michael/public_html/rc3/applications/cms/sources/Fields/Fields.php:225
#17 IPS\cms\_Fields:data in /home/michael/public_html/rc3/applications/cms/sources/Databases/Databases.php:661
#16 IPS\cms\_Databases:preLoadWords in /home/michael/public_html/rc3/applications/cms/sources/Databases/Databases.php:181
#15 IPS\cms\_Databases:constructFromData in /home/michael/public_html/rc3/applications/cms/sources/Databases/Databases.php:162
#14 IPS\cms\_Databases:databases in /home/michael/public_html/rc3/applications/cms/extensions/core/CreateMenu/Records.php:36
#13 IPS\cms\extensions\core\CreateMenu\_Records:getItems in /home/michael/public_html/rc3/system/Member/Member.php:2179
#12 IPS\_Member:createMenu in /tmp/theme_core_front_global_userBar82Knx0:16
#11 IPS\Theme\theme_core_front_global_userBar in <#unknown>:0
#10 call_user_func_array in /home/michael/public_html/rc3/system/Theme/Dev/Template.php:158
#9 IPS\Theme\Dev\_Template:__call in /tmp/theme_core_front_global_globalTemplateUwZGCJ:182
#8 IPS\Theme\Dev\nexus_hook_clientAreaLink:userBar in /tmp/theme_core_front_global_globalTemplateUwZGCJ:182
#7 IPS\Theme\theme_core_front_global_globalTemplate in <#unknown>:0
#6 call_user_func_array in /home/michael/public_html/rc3/system/Theme/Dev/Template.php:158
#5 IPS\Theme\Dev\_Template:__call in /home/michael/public_html/rc3/system/Dispatcher/Dispatcher.php:149
#4 IPS\Theme\Dev\nexus_hook_clientAreaLink:globalTemplate in /home/michael/public_html/rc3/system/Dispatcher/Dispatcher.php:149
#3 IPS\_Dispatcher:finish in /home/michael/public_html/rc3/system/Dispatcher/Standard.php:95
#2 IPS\Dispatcher\_Standard:finish in /home/michael/public_html/rc3/system/Dispatcher/Front.php:395
#1 IPS\Dispatcher\_Front:finish in /home/michael/public_html/rc3/system/Dispatcher/Dispatcher.php:131
#0 IPS\_Dispatcher:run in /home/michael/public_html/rc3/index.php:13

I was able to trace it down to my app, but i couldn't figure out what was causing it (it isn't all that obvious from this error). I could tell it involved missing lang strings, but it wasn't directly pointing towards my app, but the problem was this:

$lang = array('lang_string_1' => "This is a lang string", 'lang_string_2');

its valid array in php, but not for lang strings, could we maybe get an exception thrown in these instance that point to the problem better if its not associative or remove the numeric keys only by default?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...