RicLeP / laravel-storyblok

Make Laravel and Storyblok work together beautifully.
https://ls.sirric.co.uk/
MIT License
58 stars 15 forks source link

Call to undefined method App\Storyblok\Block::flatten() #17

Closed chaseconey closed 3 years ago

chaseconey commented 3 years ago

Overview

Looks like the latest version broke something in the editor-bridge. I see a function called flatten was removed, but not seeing any obvious references.

Error

Error
Call to undefined method App\Storyblok\Block::flatten() (View: /.../projectname/vendor/riclep/laravel-storyblok/src/resources/views/editor-bridge.blade.php)

Steps to Reproduce

RicLeP commented 3 years ago

flatten was only called in the editorbridge. It was an old way to do live updates by pushing data to VueJs components for rendering the the visual editor. It didn’t work well and was framework dependant so I removed it. There aren’t calls to it in the package now.

Have you published your own editor bridge file with it in? Or could it be a view cache?

RicLeP commented 3 years ago

My new docs were incomplete, I have improved them now. There’s a new route to add: https://ls.sirric.co.uk/docs/2.6/linking-the-visual-editor

Route::post('/{slug?}', '\Riclep\Storyblok\Http\Controllers\LiveContentController@show')->where('slug', '(.*)')->withoutMiddleware([\App\Http\Middleware\VerifyCsrfToken::class])->middleware([\App\Http\Middleware\StoryblokEditor::class]);
chaseconey commented 3 years ago

@RicLeP You are correct, I guess because the file content didn't actually change the view never recompiled...makes sense. view:clear did indeed fix it. Sorry for the false alarm!