This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
illreadlater13656
Hello, got error:
[2016-02-02 22:04:03] production.ERROR: exception 'ErrorException' with message 'Invalid argument supplied for foreach()' in /www/vendor/october/rain/src/Auth/Models/User.php:550
Stack trace:
#0 /www/vendor/october/rain/src/Auth/Models/User.php(550): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'Invalid argumen...', '/www/vendor/oct...', 550, Array)
#1 /www/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(2779): October\Rain\Auth\Models\User->setPermissionsAttribute(NULL)
#2 /www/vendor/october/rain/src/Database/Model.php(1286): Illuminate\Database\Eloquent\Model->setAttribute('permissions', NULL)
#3 /www/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(400): October\Rain\Database\Model->setAttribute('permissions', NULL)
#4 /www/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(426): Illuminate\Database\Eloquent\Model->fill(Array)
#5 /www/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(2248): Illuminate\Database\Eloquent\Model->Illuminate\Database\Eloquent\{closure}()
#6 /www/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(427): Illuminate\Database\Eloquent\Model::unguarded(Object(Closure))
#7 /www/modules/backend/Widgets/Form.php(294): Illuminate\Database\Eloquent\Model->forceFill(Array)
#8 /www/modules/backend/Behaviors/RelationController.php(1065): Backend\Widgets\Form->setFormValues(Array)
#9 /www/modules/backend/Behaviors/RelationController.php(871): Backend\Behaviors\RelationController->onRelationManageAdd()
#10 [internal function]: Backend\Behaviors\RelationController->onRelationClickManageList('1')
#11 /www/vendor/october/rain/src/Extension/ExtendableTrait.php(354): call_user_func_array(Array, Array)
#12 /www/vendor/october/rain/src/Extension/Extendable.php(44): October\Rain\Extension\Extendable->extendableCall('onRelationClick...', Array)
#13 [internal function]: October\Rain\Extension\Extendable->__call('onRelationClick...', Array)
got problem with related model linking. I'm just doing as documentation says (example with Phone belongs to Person). if I change fields.yaml (uncomment lines with type: relation and select, and comment lines with partial) - everything works fine
fields.yaml:
tabs:
fields:
user:
label: Card
# type: relation
# select: email
type: partial
path: @/plugins/testplugin/testuser/controllers/cards/_form_users.htm
_form_users.htm:
<?= $this->relationRender('user'); ?>
Hope for help, thanks
Last updated
1-1 of 1