Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

rafalh88pl's avatar

Problem with flexible field

i was using flexible field in one model and everything was fine , but after last update i am getting error like below:

Call to undefined method Whitecube\NovaFlexibleContent\Layouts\Layout::forceFill()

(Error(code: 0): Call to undefined method Whitecube\NovaFlexibleContent\Layouts\Layout::forceFill() at /home/www/vendor/laravel/nova/src/Fields/Field.php:492)

0 likes
3 replies
rafalh88pl's avatar

@Nakov thank you, so just as I thought. i ve also made a temporary NASTY walkaround by adding function in Whitecube\NovaFlexibleContent\Layouts\Layout

public function forceFill(mixed $attributes)
    {
        foreach ($attributes as $key => $value) {
            $this->setAttribute($key, $value);
        }
        return $this;
    }
Nakov's avatar

@rafalh88pl if you ask me, I will better install nova before this bug was introduced and wait for a fix before I upgrade, instead of touching a vendor file. Because you will have to remember the change each time, as it will get deleted when you run composer update the next time.

Please or to participate in this conversation.