statamic / v2-hub

Statamic 2 - Feature Requests and Bug Reports
https://statamic.com
95 stars 5 forks source link

Error on saving System settings #454

Closed edalzell closed 7 years ago

edalzell commented 8 years ago

Steps to reproduce

  1. Try to save system settings
  2. There is no step 2

    Expected behaviour

Settings saved

Actual behaviour

Error in logs

Server configuration

Operating system: Mac OS X 10.11.3

Web server: Apache

PHP version: 7.0.3

Statamic version: b17

Updated from an older Statamic or fresh install: Updated

List of installed addons:

Logs

Statamic error log (/local/storage/logs/statamic.log)

[2016-02-19 18:52:53] dev.ERROR: ErrorException: Undefined index: raw in /Users/erin/Sites/dl/statamic/core/Http/Controllers/SettingsController.php:69
Stack trace:
#0 /Users/erin/Sites/dl/statamic/core/Http/Controllers/SettingsController.php(69): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(8, 'Undefined index...', '/Users/erin/Sit...', 69, Array)
#1 [internal function]: Statamic\Http\Controllers\SettingsController->update('system')
#2 /Users/erin/Sites/dl/statamic/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(256): call_user_func_array(Array, Array)
#3 /Users/erin/Sites/dl/statamic/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(164): Illuminate\Routing\Controller-
jasonvarga commented 8 years ago

I can't replicate an error. Do you have anything else you can tell me? What does your system.yaml look like? Do you have any interpolated environment variables?

edalzell commented 8 years ago

system.yaml

timezone: America/Vancouver
app_key: [redacted]
search_index_frequency: 5
search_auto_index: true
default_extension: md
file_adapter: local
date_format: F jS, Y
locales:
  en:
    url: https://thedalzells.org
    name: English
license_key: [redacted]
auto_taxonomy_fields:
  categories: categories
  tags: tags

filesystems:
  content:
    driver: local
    root: site/content
  storage:
    driver: local
    root: site/storage
edalzell commented 8 years ago

dev.yaml:

settings:
  debug:
    loggers:
      file:
        daily: true
        level: debug
      email:
        level: warn
        to: erin@thedalzells.org
        from: site@thedalzells.org
        subject: An error/warning has occurred
    debug_bar: true
    debug: true
  system:
    locales:
      en:
        url: http://dl.dev
        name: English
addons:
  pinboard:
    pinboard_tag: latest
edalzell commented 8 years ago

.env:

APP_ENV=dev
curtisblackwell commented 8 years ago

I'm having this problem now, too. However, I'm on 2.0.4 and it's line 61 ($data[$key] = $env['raw'];).

system.yaml:

app_key: [redacted]
locales:
  en:
    full: '{env:APP_SYSTEM_LOCALES_EN_FULL}'
    name: '{env:APP_SYSTEM_LOCALES_EN_NAME}'
    url: '{env:APP_SYSTEM_LOCALES_EN_URL}'

.env:

# site/settings/system.yaml
APP_SYSTEM_LOCALES_EN_FULL=en_US
APP_SYSTEM_LOCALES_EN_NAME=English
APP_SYSTEM_LOCALES_EN_URL=http://thecommondesk.dev
macbruker commented 8 years ago

Im getting this on 2.0.7 now.

Here is the log output:

[2016-06-17 13:04:05] dev.ERROR: ErrorException: Undefined index: raw in /Users/martin/Sites/webdagene2016/statamic/core/Http/Controllers/SettingsController.php:61
Stack trace:
#0 /Users/martin/Sites/webdagene2016/statamic/core/Http/Controllers/SettingsController.php(61): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(8, 'Undefined index...', '/Users/martin/S...', 61, Array)
#1 [internal function]: Statamic\Http\Controllers\SettingsController->update('system')
#2 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(256): call_user_func_array(Array, Array)
#3 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(164): Illuminate\Routing\Controller->callAction('update', Array)
#4 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(112): Illuminate\Routing\ControllerDispatcher->call(Object(Statamic\Http\Controllers\SettingsController), Object(Illuminate\Routing\Route), 'update')
#5 [internal function]: Illuminate\Routing\ControllerDispatcher->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#6 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(139): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#7 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#8 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#9 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(114): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#10 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(67): Illuminate\Routing\ControllerDispatcher->callWithinStack(Object(Statamic\Http\Controllers\SettingsController), Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'update')
#11 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Routing/Route.php(203): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'Statamic\\Http\\C...', 'update')
#12 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Routing/Route.php(134): Illuminate\Routing\Route->runWithCustomDispatcher(Object(Illuminate\Http\Request))
#13 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Routing/Router.php(708): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))
#14 [internal function]: Illuminate\Routing\Router->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#15 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(139): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#16 /Users/martin/Sites/webdagene2016/statamic/core/Http/Middleware/CP/Configurable.php(23): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#17 [internal function]: Statamic\Http\Middleware\CP\Configurable->handle(Object(Illuminate\Http\Request), Object(Closure))
#18 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#19 /Users/martin/Sites/webdagene2016/statamic/core/Http/Middleware/CP/Authenticate.php(62): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#20 [internal function]: Statamic\Http\Middleware\CP\Authenticate->handle(Object(Illuminate\Http\Request), Object(Closure))
#21 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#22 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#23 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#24 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Routing/Router.php(710): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#25 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Routing/Router.php(673): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#26 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Routing/Router.php(635): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#27 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(236): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#28 [internal function]: Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))
#29 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(139): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#30 /Users/martin/Sites/webdagene2016/statamic/core/Http/Middleware/Outpost.php(52): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#31 [internal function]: Statamic\Http\Middleware\Outpost->handle(Object(Illuminate\Http\Request), Object(Closure))
#32 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#33 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#34 [internal function]: Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#35 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#36 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(62): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#37 [internal function]: Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#38 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#39 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#40 [internal function]: Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))
#41 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#42 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(59): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#43 [internal function]: Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))
#44 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#45 /Users/martin/Sites/webdagene2016/statamic/core/Http/Middleware/CP/DefaultLocale.php(28): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#46 [internal function]: Statamic\Http\Middleware\CP\DefaultLocale->handle(Object(Illuminate\Http\Request), Object(Closure))
#47 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#48 /Users/martin/Sites/webdagene2016/statamic/core/Http/Middleware/CheckForStaticallyCachedPage.php(35): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#49 [internal function]: Statamic\Http\Middleware\CheckForStaticallyCachedPage->handle(Object(Illuminate\Http\Request), Object(Closure))
#50 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#51 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(44): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#52 [internal function]: Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#53 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#54 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#55 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#56 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(122): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#57 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(87): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#58 /Users/martin/Sites/webdagene2016/index.php(142): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#59 {main}  
edalzell commented 8 years ago

@macbruker you should try on 2.0.9 just to ensure it didn't get fixed...

macbruker commented 8 years ago

@edalzell yes, the same error appears in 2.0.9. Also this #763 pops up.

Here is the log:

[2016-06-17 15:17:59] dev.ERROR: Debugbar exception: Route [debugbar.openhandler] not defined.  
[2016-06-17 15:18:04] dev.ERROR: ErrorException: Undefined index: raw in /Users/martin/Sites/webdagene2016/statamic/core/Http/Controllers/SettingsController.php:61
Stack trace:
#0 /Users/martin/Sites/webdagene2016/statamic/core/Http/Controllers/SettingsController.php(61): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(8, 'Undefined index...', '/Users/martin/S...', 61, Array)
#1 [internal function]: Statamic\Http\Controllers\SettingsController->update('system')
#2 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(256): call_user_func_array(Array, Array)
#3 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(164): Illuminate\Routing\Controller->callAction('update', Array)
#4 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(112): Illuminate\Routing\ControllerDispatcher->call(Object(Statamic\Http\Controllers\SettingsController), Object(Illuminate\Routing\Route), 'update')
#5 [internal function]: Illuminate\Routing\ControllerDispatcher->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#6 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(139): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#7 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#8 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#9 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(114): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#10 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(67): Illuminate\Routing\ControllerDispatcher->callWithinStack(Object(Statamic\Http\Controllers\SettingsController), Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'update')
#11 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Routing/Route.php(203): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'Statamic\\Http\\C...', 'update')
#12 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Routing/Route.php(134): Illuminate\Routing\Route->runWithCustomDispatcher(Object(Illuminate\Http\Request))
#13 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Routing/Router.php(708): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))
#14 [internal function]: Illuminate\Routing\Router->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#15 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(139): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#16 /Users/martin/Sites/webdagene2016/statamic/core/Http/Middleware/CP/Configurable.php(23): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#17 [internal function]: Statamic\Http\Middleware\CP\Configurable->handle(Object(Illuminate\Http\Request), Object(Closure))
#18 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#19 /Users/martin/Sites/webdagene2016/statamic/core/Http/Middleware/CP/Authenticate.php(62): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#20 [internal function]: Statamic\Http\Middleware\CP\Authenticate->handle(Object(Illuminate\Http\Request), Object(Closure))
#21 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#22 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#23 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#24 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Routing/Router.php(710): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#25 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Routing/Router.php(673): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#26 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Routing/Router.php(635): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#27 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(236): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#28 [internal function]: Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))
#29 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(139): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#30 /Users/martin/Sites/webdagene2016/statamic/core/Http/Middleware/Outpost.php(52): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#31 [internal function]: Statamic\Http\Middleware\Outpost->handle(Object(Illuminate\Http\Request), Object(Closure))
#32 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#33 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#34 [internal function]: Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#35 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#36 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(62): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#37 [internal function]: Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#38 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#39 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#40 [internal function]: Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))
#41 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#42 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(59): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#43 [internal function]: Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))
#44 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#45 /Users/martin/Sites/webdagene2016/statamic/core/Http/Middleware/CP/DefaultLocale.php(28): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#46 [internal function]: Statamic\Http\Middleware\CP\DefaultLocale->handle(Object(Illuminate\Http\Request), Object(Closure))
#47 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#48 /Users/martin/Sites/webdagene2016/statamic/core/Http/Middleware/CheckForStaticallyCachedPage.php(35): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#49 [internal function]: Statamic\Http\Middleware\CheckForStaticallyCachedPage->handle(Object(Illuminate\Http\Request), Object(Closure))
#50 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#51 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(44): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#52 [internal function]: Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#53 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#54 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#55 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#56 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(122): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#57 /Users/martin/Sites/webdagene2016/statamic/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(87): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#58 /Users/martin/Sites/webdagene2016/index.php(142): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#59 {main}  

Server configuration

Operating system: Mac OS X 10.11.3

Web server: MAMP Pro

PHP version: 7.0.0

Statamic version: 2.0.9

Updated from an older Statamic or fresh install: Updated from 2.0.7

gmcz commented 8 years ago

Still happening in 2.1.2

kylegordy commented 8 years ago

I'm also seeing it in 2.1.2.

jasonvarga commented 8 years ago

We didn't close this issue.

gmcz commented 8 years ago

It's cool, not hard to work around. Just chiming in since I see the "can't recreate" label.

jasonvarga commented 8 years ago

If you want to post your system.yaml that could be helpful.

gmcz commented 8 years ago

system.yaml

app_key: xxxxx
license_key: xxxxx
locales:
  en:
    full: en_US
    name: English
    url: http://clientsurl.com
filesystems:
  themes:
    driver: local
    root: public/themes
    url: /themes

dev.yaml

settings:
  debug:
    debug: true
    debug_bar: true
  system:
    locales:
      en:
        full: en_US
        name: English
        url: http://clientstagingserver.com
edalzell commented 8 years ago

Unfortunately this did not get magically fixed in 2.1.3/4/5

jackmcdade commented 8 years ago

@edalzell really no need to comment on unfixed bugs that weren't explicitly fixed...

barchard commented 8 years ago

I am also experiencing this error using PHP5.6. Anything I can add that would help?

production.ERROR: exception 'ErrorException' with message 'Undefined index: raw' in /doc-root/statamic/core/Http/Controllers/SettingsController.php:56

Here is the value of the $environment_variables from the code:

public function update($name)
    {
        $this->name = $name;

        $data = $this->processFields();

        // Replace environment-managed values with their raw equivalents

        if ($environment_variables = $this->request->input('extra.env')) {
        error_log(print_r($environment_variables, true));
            foreach ($environment_variables as $key => $env) {
                $data[$key] = $env['raw'];
            }
        }

        $contents = YAML::dump($data);

        $file = settings_path($name . '.yaml');
        File::put($file, $contents);

        Cache::clear();
        Stache::clear();

        $this->success('Settings updated');

        return ['success' => true, 'redirect' => route('settings.edit', $name)];
    }

output:

[04-Nov-2016 00:47:20 UTC] Array
(
    [locales] => Array
        (
            [en] => Array
                (
                    [url] => Array
                        (
                            [raw] => {env:SITE_URL}
                            [parsed] => 
                        )

                )

        )

)

It looks like it is failing on the locale key:

source:

if ($environment_variables = $this->request->input('extra.env')) {
            foreach ($environment_variables as $key => $env) {
            error_log('KEY: '.$key.' '.print_r($env, true));
                $data[$key] = $env['raw'];
            }
        }

output:

[04-Nov-2016 00:51:03 UTC] KEY: locales Array
(
    [en] => Array
        (
            [url] => Array
                (
                    [raw] => {env:SITE_URL}
                    [parsed] => 
                )

        )

)
screen shot 2016-11-03 at 8 53 34 pm
wesort commented 6 years ago

I believe I could be experiencing this error on v2.8.11

statamic-2018-04-23.log system.yaml.txt