Forum Replies Created
-
AuthorPosts
-
Anh Tran
KeymasterHi,
I've fixed this bug on our site. Please try again.
June 16, 2023 at 9:50 AM in reply to: Missing filter to allow devs to extend which screens to show on #42240Anh Tran
KeymasterIt’s like a custom profile page in the admin. I get it, and it’s a valid point.
I’m not sure if adding a filter will work, because the whole process might need other things. I’m happy to merge PRs on this if you have any. (I’ve invited you to join Meta Box org on Github).
June 15, 2023 at 6:42 AM in reply to: Missing filter to allow devs to extend which screens to show on #42213Anh Tran
KeymasterCan you please explain why do you need other screens? I don’t see any reason here.
Anh Tran
KeymasterAfter doing some research, I found that this is a big issue in WP itself, and is still being discussed!
Anh Tran
KeymasterHi Brandon,
Thanks for your feedback. After investigating, I found that there was a change in WP:
Previously, the block template was parsed in the following orders:
do_blocks, thenshortcode_unautop, thendo_shortcode. But this order was changed in these 2 commits:https://github.com/WordPress/WordPress/commit/6a077b35f15590a843ff8a6c97a135f3a34872dd
https://github.com/WordPress/WordPress/commit/2bb3a5169548d16173cf48ca9da1111efc428f86So the order now is
shortcode_unautop,do_shortcode, thendo_blocks.The problem is that the MB Views shortcode in the block template is the
core/shortcodeblock, which applieswpautop(I have no idea why do they do that):https://github.com/WordPress/WordPress/blob/master/wp-includes/blocks/shortcode.php
So, when parsing the a block template, the MB Views shortcode is parsed first (via
do_shortcode), and then is appliedwpautop(viado_blockswithcore/shortcodeblock), and that causes the problem. Previously, theydo_blocksfirst, and thendo_shortcode, then it didn't happen.As this is in the WordPress core, e.g. after the content of views are rendered, I think the only way to resolve it is removing line brakes in the plugin. This is what I'll do in the next version, so you don't have to do that manually.
Anh Tran
KeymasterDashes are not used by Twig, so we need to change them to underscores. Or you can get via the attribute method in Twig:
https://twig.symfony.com/doc/3.x/functions/attribute.html
The field group ID is the slug of the field group, and uses dashes by default. It’s rarely used in MB Blocks or MB Views, so it’s ok to keep it as it is.
Anh Tran
KeymasterThe problem is how to refer to the field in Twig. The correct code that I tried is:
{% set p = mb.get_post( post_id ) %} <p> <strong>Job title:</strong> {{ p.job_title }} </p>Here is the screencast: https://monosnap.com/file/Fh9dBfRYNYj0AZ4lYG3XwlGzcFXL97
Anh Tran
KeymasterHi David,
Can you please try changing the dash in the
authors-websiteto underscore, e.g.authors_website? Twig doesn't allow dashes in the variable name.Anh Tran
KeymasterHi Scott,
We've fixed this issue. Please re-download the plugin and try again.
Anh Tran
KeymasterHi guys,
We've fixed this issue. Please re-download the plugin and try again.
Anh Tran
KeymasterHi Frode,
We've fixed this issue with the v1.21. Please re-download the plugin and try again.
Anh Tran
KeymasterHi guys,
We've fixed this issue. Please re-download the plugin and try again.
Anh Tran
KeymasterHi guys,
We're very sorry for this problem. It's not because we don't want to do that. It's beyond our technical capability. We tried several times in the past to make the integration. However, it ended up with a same conclusion that we couldn't make it without modifying WPAI's code, which we're not familiar with.
So, we asked the WPAI team for help and they agreed to do the integration for Meta Box. That's the best thing we can inform you at the moment.
Best regards,
AnhAnh Tran
KeymasterHi Viktor,
No problem. I've updated the composer/installers version to "~1.0 || ~2.0".
Anh Tran
KeymasterHi,
This is the JS file, compiled from our source, so the warning about a PHP security is not accurate. I've checked with Sucuri and looks like it requires a paid plan to run the scan. Can you please drop us a message with a temporary admin account to check this issue?
-
AuthorPosts