Error output to Builder interface
Support › MB Builder › Error output to Builder interfaceResolved
- This topic has 9 replies, 5 voices, and was last updated 5 years, 8 months ago by
pxbjw.
-
AuthorPosts
-
February 5, 2019 at 11:00 PM #13213
pxbjw
ParticipantI've been experiencing a glitch with Metabox Builder on the "Edit Field Group" page, where an error is output to the screen which says the following 3 times: "[an error occurred while processing the directive]"
It doesn't seem to be affecting functionality, as I can still create field groups, but it is annoying, and doesn't stir up confidence... I wanted to use Metabox on a project we started recently, but this issue was enough to turn off the other developers to using it (too late for this one, maybe next time though).
There are some JS warnings in the console which may or may not be related:
https://pixablaze-397923.d.pr/OqTrb5/JRkfv4DkGVI can't seem to reproduce the issue on our production sites, so I can't really share a login or anything as it's only happening on our local environments.
We're using Laravel Valet on Macs, so guessing the environment may be related. It's Nginx, so that makes me wonder if it's related due to the "directive" language in the error.
Apart from the server environment, everything else is default and latest versions. I've even tested on a brand new install, multiple times, same issue.
- Latest versions of Metabox + MB AIO
- Default TwentyNineteen theme, no customizations
- No other plugins even installed
- Latest WP
- PHP 7.2, Mysql 5.7, nginx/1.15.8
It's not critical for us at the moment so no rush, and I'm not sure how else I could help troubleshoot but if you need any other info let me know.
February 5, 2019 at 11:03 PM #13214pxbjw
ParticipantAlso, forgot to mention I have PHP debug on, no errors, warnings or notices that seem relevant. Only one warning shows up, which is originating from Metabox but I don't believe it's related:
[05-Feb-2019 15:43:04 UTC] PHP Warning: strpos() expects parameter 1 to be string, array given in /Users/jw1/webdev/sites/wp/dev/metaboxio/wp-content/plugins/meta-box/inc/about/about.php on line 196
<code></code>February 11, 2019 at 4:44 PM #13259Anh Tran
KeymasterHi,
Looks like the bug is in JS. Can you export the field group and give me the exported file to check?
February 23, 2019 at 6:33 AM #13444Jay
ParticipantI can confirm I'm seeing something similar. I'm running WP 5.1 and PHP 7.3 on a local Laravel Valet dev environment.
This is the error message I get on the speaker screen.<br /> <b>Notice</b>: Undefined index: fields in <b>/Users/Jay/code/metabox/wp-content/plugins/meta-box-aio/extensions/meta-box-group/class-rwmb-group-field.php</b> on line <b>338</b><br /> <br /> <b>Warning</b>: Invalid argument supplied for foreach() in <b>/Users/Jay/code/metabox/wp-content/plugins/meta-box/inc/meta-box.php</b> on line <b>386</b><br />
February 26, 2019 at 10:36 AM #13478Anh Tran
KeymasterHey guys, can you export the field group and give me the exported file to check? I couldn't replicate that on my localhost.
March 2, 2019 at 1:31 AM #13520[email protected]
ParticipantI also same error
PHP 7.2
August 20, 2019 at 7:35 AM #15770daveheslop
ParticipantRegarding the OP's
[an error occurred while processing the directive]
I've just had the same issue, running on a local Valet setup.
The issue was that SSI (server side includes) was enabled by default in nginx.conf. The comments in the plugins starting with
<!-#
are treated as SSI directives, hence the error.If you disable SSI on your server (provided you're not using SSI), and restart, then the errors should disappear.
If you're using Valet, instructions here on how to toggle SSI on/off.
August 20, 2019 at 8:31 AM #15775Anh Tran
KeymasterHi @daveheslop, thanks a lot for your help! I didn't realize a nginx config can cause the bug. I'll remove all HTML comments in the plugin to keep this bug away.
August 20, 2019 at 5:16 PM #15780daveheslop
ParticipantNo problem Anh.
Just a small correction to a typo in my post, it's
<!--#
that's treated as a directive.You know that anyway, but just for clarity 😉
August 20, 2019 at 7:21 PM #15782pxbjw
ParticipantThank you! That was driving me crazy (I had tried so many troubleshooting ideas but didn't think of that). I turned ssi off and it's all good now.
-
AuthorPosts
- You must be logged in to reply to this topic.