Open djmtype opened 4 years ago
Just an FYI this is actually already opened as an issue #50 and there's a fix as a pull request #51 but it's been sitting for almost two weeks now.
Hi I have aded pull request with fixed error, please verify
@MWDelaney Some people are facing issues in Sage 9. Any chance you can merge the PR that fixes this?
@MWDelaney and @robmeijerink please verify pull request #51 before merge, in my case still it not working on sage 9, I've added #53 pull request with update, but not tested with sage 10. The path result is the same in sage_blocks_callback method line 221, so should work properly.
Hi, I just installed this plugin and got the same error with v0.6. I decided to try v0.5 after reading through these issues and it worked fine. For anyone who is like me and looking for a workaround, v0.5 did the trick.
So just install it like so:
composer require mwdelaney/sage-acf-gutenberg-blocks:0.5
I have created a pull request that fixes this issue. In the meantime, you can fix the issue by updating the template() function in helpers.php:
function template($file, $data = [])
{
if ( ! file_exists( $file ) && strpos( $file, 'views/blocks/' ) !== false ) {
$file = locate_template( $file );
}
return sage('blade')->render($file, $data);
}
EDIT: my original temporary fix caused \App\template($template) to break. I added an extra condition strpos($file, 'views/blocks/') !== false
for this. My pull request to fix this problem doesn't need modification.
This is fixed in 0.7.
After updating to sage-acf-wp-blocks from v0.5 to v0.6, WordPress throws an error. I haven't changed any of my blocks' syntax or location.
I also tried removing this block from my directory, but then I got the same error for the next block.
All my ACF blocks reside in
./resources/views/blocks
directory like thesage-acf-gutenberg-blocks.php
statesMy block