Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with Wordplate #33

Open
antoineLZCH opened this issue Sep 23, 2020 · 7 comments
Open

Issues with Wordplate #33

antoineLZCH opened this issue Sep 23, 2020 · 7 comments

Comments

@antoineLZCH
Copy link

Hi,

I just found your package which could help me a lot to build blocks with Timber.
I am using Wordplate which is probably something similar to Bedrocks, but the truth is it doesn't detect any of my created blocks (I stored these in theme/${themeName}/views/blocks, not in themes/${themeName}/theme/views/blocks). Maybe I don't do it well ?

I tried to install the package on Wordplate's composer without any good result and I saw someone had the issue installing the package with Bedrocks' composer, so I tried, as you mentioned, to install it directly in the timber theme directory (I used this one as a replacement for my usual wordplate boilerplate theme), which causes the same issue than before : My blocks are not recognized aswell.

You mentioned that you were creating a plugin version of the package, do you have any informations about this ? Or instead, could you please help me solving this issue ?
Thanks in advance !

Best regards,
Antoine

@palmiak
Copy link
Owner

palmiak commented Sep 23, 2020 via email

@antoineLZCH
Copy link
Author

Wordplate is really nice. I don't think there's so much differences between it and Bedrocks.
Tell me wen you have more infos ! Thanks, have a great day :)

@palmiak
Copy link
Owner

palmiak commented Oct 6, 2020

Sorry it took so much time - I was able to test it and I see everything is working fine, although I made one mistake and you probably did too :)

First of all check the main composer.json file - if there is "palmiak/timber-acf-wp-blocks": "^1.12", remove it and run composer update.

Next go to theme folder and check if there is "palmiak/timber-acf-wp-blocks": "^1.12", in composer.json - if not run:
composer require "palmiak/timber-acf-wp-blocks"

Overall be sure that library is only installed in the theme :)

@Zielgestalt
Copy link

Zielgestalt commented Oct 7, 2020

Same problem here with timber-starter-theme v2.0 (as mentioned above by antoineLZCH).

I get a fatal error:
Fatal error: Uncaught RuntimeException: Directory name must not be empty. in /var/www/html/web/app/themes/dlv-theme/vendor/palmiak/timber-acf-wp-blocks/timber-acf-wp-blocks.php:294

In v2.0 of the theme there's a new folder structure, so the recognized theme folder is /themes/[my-theme]/theme/
Please note the additional 'theme' at the end.
But 'views' is located at /themes/[my-theme]/views

So I think that's why there's no directory name. Similar problem here: timber/starter-theme#105

@antoineLZCH
Copy link
Author

Hello, sorry I just saw your answer.
Thanks for it. The thing is I only use one composer.json for the whole project, which is based at root, as Bedrocks might do I guess. That's why it would have been useful to get it as a package, but I understand it may be harder, so we don't have to use a vendor folder for the theme, and for the whole project.

@Zielgestalt We used the timber starter theme 2.0 aswell at work, if you have any solution, it's fine for us. For now, we just created our blocks handmade. I'll try to think about a solution later !

@palmiak
Copy link
Owner

palmiak commented Oct 20, 2020

@antoineLZCH from what I heard this library should work as a plugin with just some minor changes. Maybe it's time to finally create it. I just have to think of a way how to automate this.

@merijnponzo
Copy link

I had some issues with bedrock,
turns out that the plugin, or as a normal installation timber-acf-wp-blocks is not loaded

so within my theme

// init timber acf blocks
if ( class_exists( 'Timber_Acf_Wp_Blocks' ) ) {
	new Timber_Acf_Wp_Blocks();
}

Now my blocks are showing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants