Forum Replies Created
-
AuthorPosts
-
Aaron Kessler
Participanthttps://developer.wordpress.org/themes/customize-api/customizer-objects/#panels
According to this, the ID of "Site Title & Tagline" is
title_tagline, since you change the title and tagline in the "site identity" panel, I thought this is the way to go, but'panel' => 'title_tagline'does not work. If you don't know it, where is a good place to ask for the ids of the WordPress core panels. There are no plugins or themes involved in this case.Aaron Kessler
ParticipantHey Peter,
you got me wrong. The block has indeed user input, but the user needs to input something. To see what it is about, it would be nice to giving users a clue what the block inside the editor is about without having to take a look in sidebars (the mb blocks sidebar is almost useless since the only thing it shows are the mb blocks title and the advanced tab). An use case for this could be a page template. The MB Blocks initial state renders only, "Click the Edit icon in the block toolbar to enter content." Besides that I disagree: Rendering a block without user input is indeed meaningful, since in the current state 'std' values are confusing because they don't trigger a render inside the editor, like a real input would do.
You can take this as a feature request.
A minimal approach would be turning this initial state from https://imgur.com/pJo5UU2 into something like this https://imgur.com/BW0Ettw, but an initial preview is much appreciated to provide a nicer user experience.
Aaron Kessler
ParticipantThank You! ๐
Aaron Kessler
ParticipantIt was happening with my own custom blocks, I tied them to my custom theme, so switching to Twenty TwentyTwo is pointless. No standard blocks involved. I did not find any errors in my own blocks and since it is not happing on a new page with the same block arrangement I am totally okay with not debugging it further. The first log error is
Uncaught SyntaxError: Unexpected token '<' (at post.php?post=2&action=edit:125:1)which I don't know what to do with, followed by a bunch of "unable to register block type errors" for all my own blocks. And the mb-block related error I posted above.Aaron Kessler
ParticipantIt is an error in conjunction with other blocks. I recreated the hole page block by block to track down the error, but I am not able to reproduce it.
Aaron Kessler
ParticipantSure, if I remove the script tags, the error is gone. I switched to reading data-attributes instead of inlineing JS to avoid this altogether. However, there is no difference in using
render_callbackorrender_template, it's still not possible to use a script tag.My example callback is
function test_callback($attributes, $is_preview = false, $post_id = null) { ?> <script></script> hello from render callback <?php }Aaron Kessler
ParticipantSame here.
Aaron Kessler
ParticipantI would be happy to see this, too.
Aaron Kessler
ParticipantI have not entered one in the first place. So entering a key may prevent the notice from happening, but it is not a fix, isn't it?
Aaron Kessler
ParticipantThe Meta Box version is 5.6.4
Aaron Kessler
ParticipantIt's not documented that the
'render_template'could contain twig code. I will give it a try, but I thought that twig is only valid in'render_code'Aaron Kessler
ParticipantI would suggest adding this property to the docs.
I have a feature request then: Please support external template files like in mb views
Aaron Kessler
ParticipantIt seems that it was only a temporary issue. The 404 is now gone.
Aaron Kessler
ParticipantObvious ๐, thank you!
Aaron Kessler
ParticipantThank you for clarification ๐, I mixed it up.
-
AuthorPosts