Forum Replies Created
-
AuthorPosts
-
January 23, 2025 at 11:07 PM in reply to: OSM map does not render fully when the field has conditional logic #47529
John Connor
ParticipantHi Peter, can I please do that through the contact form? Thank you
January 23, 2025 at 11:06 PM in reply to: Critical error after custom fields set to display on custom post type #47528John Connor
ParticipantThank you Peter! What a good note to read. Much appreciated! Say hi to your lovely team
January 23, 2025 at 1:05 AM in reply to: OSM map does not render fully when the field has conditional logic #47516John Connor
ParticipantChanging the PHP to a version 7.4 did not help either.
January 23, 2025 at 12:59 AM in reply to: Critical error after custom fields set to display on custom post type #47515John Connor
ParticipantHi Peter! Switching to PHP version 7.4 did solve this particular problem. Thanks for this! However, I can't really say this solution is viable, as I must use a more recent PHP version for security and performance reasons. 7.4 on the other hand End of Life since Nov '22 and increases risks of security vulnerabilities, performance degradation, and application instability.
My request is therefore if you can aks MB's developers to update this functionality to work with the more recent PHP versions? Version 8 came out in Nov '20, 8.1 in Nov '21, 8.2 in Dec '22, 8.3 in Nov '23 and 8.4 just recently (although I understand that the latest version is too recent for many people). I hope your team is able to make Meta Box fully compatible with PHP 8 at the minimum, and so I can use this particular functionality again.I will have to stick to PHP 8 and so will have to deactivate the text-limiter function although that is an important reason for why I went for Meta Box. I am afraid to run into more PHP 8 issues :s.
Please let me know if your developers will pick this up.
Thanks so much for your presence, Peter. You are helping a ton!
January 23, 2025 at 12:04 AM in reply to: Critical error after custom fields set to display on custom post type #47513John Connor
ParticipantI deleted all form fields until i reached the one that gave me problems.
It is a WYSIWYG field type. This field is both cloneable, as well as text-limited.
This combination of text limitation and cloneable is causing a problem.I verified this in 2 ways:
1) When I go to this specific form field and under 'general settings' > 'text limiter' I delete the max word count so that it is left blank (or has a 0), there is no problem. The form fields group now correctly loads when I click 'add new job'. But As soon as I put the text-limiter on and the field remains cloneable, boom: the critical error appears instead of the add new screen where I can add/edit the post.2) I made a new form fields group and made it to show on the 'Post type': 'Post(post)'. That is the default wordpress post post type.
There are no fields yet.
When I now add a form field type WYSIWYG there is no problem. Clicking the 'add a new post' does not at this moment produce the same critical error.
If I now add a text-limiter, say 45 words, and I now press 'add new post', still no critical error.
If I now make it cloneable, boom: the critical error shows. I have not done anything special to this wysiwyg field.the same behaviour shows with the text area form field type.
Add a field of the text area field type > no error. Limit the text > no error. Make it cloneable: produces the error.
Same applies to regular text form field type.
Add a field of the text field type > no error. Limit the text > no error. Make it cloneable: produces the error.This can't be just me? Can you please try to reproduce this error, Peter or someone at Meta Box?
I can't hardly believe this is just me. At the same time, this behaviour is not described in the Text-limiter extension documention here (https://metabox.io/plugins/meta-box-text-limiter/) or here (https://docs.metabox.io/extensions/meta-box-text-limiter/) but then again, this documentation also does not say the text-limiter is compatible with the WYSIWYG field type although it is.
Please verify this is an issue with metabox and please fix ASAP if it is - i need this cloneable, text-limited WYSIWYG field (and if needed for a temporary fall-back, a text area/text field type would work too. But they are not working either
January 22, 2025 at 10:37 PM in reply to: Critical error after custom fields set to display on custom post type #47504John Connor
ParticipantMy text-limiter extension was on, and when turning it off the error disappears...
January 22, 2025 at 10:25 PM in reply to: Critical error after custom fields set to display on custom post type #47503John Connor
Participant* just shielded my domain name and database number
January 22, 2025 at 10:24 PM in reply to: Critical error after custom fields set to display on custom post type #47502John Connor
ParticipantI've been able to produce a debug.log:
[22-Jan-2025 15:18:50 UTC] PHP Fatal error: Uncaught TypeError: str_contains(): Argument #1 ($haystack) must be of type string, array given in /home/u412395423/domains/mydomain.com/public_html/wp-content/plugins/meta-box-aio/vendor/meta-box/text-limiter/text-limiter.php:85 Stack trace: #0 /home/u412395423/domains/mydomain.com/public_html/wp-content/plugins/meta-box-aio/vendor/meta-box/text-limiter/text-limiter.php(85): str_contains() #1 /home/u412395423/domains/mydomain.com/public_html/wp-includes/class-wp-hook.php(326): MB_Text_Limiter->get_value() #2 /home/u412395423/domains/mydomain.com/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters() #3 /home/u412395423/domains/mydomain.com/public_html/wp-content/plugins/meta-box/inc/functions.php(162): apply_filters() #4 /home/u412395423/domains/mydomain.com/public_html/wp-content/plugins/meta-box-aio/vendor/meta-box/mb-rest-api/src/Base.php(64): rwmb_get_value() #5 /home/u412395423/domains/mydomain.com/public_html/wp-content/plugins/meta-box-aio/vendor/meta-box/mb-rest-api/src/Base.php(49): MetaBox\RestApi\Base->get_values() #6 /home/u412395423/domains/mydomain.com/public_html/wp-includes/rest-api/endpoints/class-wp-rest-controller.php(439): MetaBox\RestApi\Base->get() #7 /home/u412395423/domains/mydomain.com/public_html/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php(2070): WP_REST_Controller->add_additional_fields_to_object() #8 /home/u412395423/domains/mydomain.com/public_html/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php(635): WP_REST_Posts_Controller->prepare_item_for_response() #9 /home/u412395423/domains/mydomain.com/public_html/wp-includes/rest-api/class-wp-rest-server.php(1292): WP_REST_Posts_Controller->get_item() #10 /home/u412395423/domains/mydomain.com/public_html/wp-includes/rest-api/class-wp-rest-server.php(1125): WP_REST_Server->respond_to_request() #11 /home/u412395423/domains/mydomain.com/public_html/wp-includes/rest-api.php(576): WP_REST_Server->dispatch() #12 /home/u412395423/domains/mydomain.com/public_html/wp-includes/rest-api.php(2957): rest_do_request() #13 [internal function]: rest_preload_api_request() #14 /home/u412395423/domains/mydomain.com/public_html/wp-includes/block-editor.php(756): array_reduce() #15 /home/u412395423/domains/mydomain.com/public_html/wp-admin/edit-form-blocks.php(77): block_editor_rest_api_preload() #16 /home/u412395423/domains/mydomain.com/public_html/wp-admin/post-new.php(72): require('/home/u25520214...') #17 {main} thrown in /home/u412395423/domains/mydomain.com/public_html/wp-content/plugins/meta-box-aio/vendor/meta-box/text-limiter/text-limiter.php on line 85January 22, 2025 at 5:13 AM in reply to: OSM map does not render fully when the field has conditional logic #47497John Connor
ParticipantI am one step closer to identifying the issue. It has something to do with the screen size and browser?
By default I work from a laptop and my browser window is typically not maximized (I work with multiple windows side by side).
When I go to the page that has the front-end user submission form on it, and I go through the custom fields group, and then the open street map is triggered to show due to conditional logic, the behaviour is as I describe.
HOWEVER, in this situation when I then maximize my browser window, the map tiles do all load as they should and the map just works how it should. No issues whatsoever.
But then again, when I start with my browser window *maximized*, and I go to the page and then trigger the conditional logic to show the open street map, the same issues show as I described! When I resize the browser window .... the issues disappear!
As a matter of fact: the starting situation is not important: when the open street map loads, I just need to change the size of the browser window a bit, or maximize/undo maximize, then the tiles all load perfectly fine.
I am using Brave browser on my laptop, but the behaviour is the same on a Chrome browser, Firefox browser and Duckduckgo browser!
Similar experience on a mobile phone. When goingto the page from my mobile phone, using chrome, the issues show. But if I then swap to another app from the browser, and then open back the chrome browser with the osm map, all the sudden the problems are not there and the map loads just fine.
What could this mean? This behaviour should not show.
January 22, 2025 at 3:56 AM in reply to: OSM map does not render fully when the field has conditional logic #47495John Connor
ParticipantThe Open Street Map field and the text field starting with 'address' for its ID is a subgroup of a group. I tried moving them one level up (so that they were no longer a subgroup of a group, but just a group). This didn't help. The tiles still do not render well.
I tried taking both fields out from group level to just be unnested fields (so not under any group). This also did not help. The tiles still do not render well.
The conditional logic itself is set up correctly: the osm field and the text field both should only become visible if another field, a 'work setting' field (select field type) is set to the value 'on-site'. The conditional logic in itself is working correctly: the osm and address field show when intended. But the conditional logic somehow produces the side effect that the tiles of the OSM do not load properly. The majority remains not rendered. When I move the map around with my mouse, some of the new tiles that come into view do render. Most do not. Zooming in and out on the map also leads to some tiles rendering, others (most) won't load. Entering the address also produces the same behaviour.
When the conditional logic is turned off, the tiles do load properly. However this can't be the solution: I really do need the map and address field to show only when the other field is set to 'on-site'.
This behavior is confirmed to not have to do anything with the max_input_vars, because since our last exchange of thoughts I have increased the max_input_vars and the whole custom group has now become larger....
I can't share the entire custom fields group here though...What could be the problem here?
January 22, 2025 at 2:33 AM in reply to: OSM map does not render fully when the field has conditional logic #47494John Connor
ParticipantDear Peter, I thank you for this message. Actually, no it is not resolved :D. I was able to continue finishing my complete custom fields group (by increasing the max_input_vars), but now am coming back to all sorts of challenges I still have. I will try once more to go through your suggestions here and will update.
John Connor
ParticipantDear Peter, Thank you so much! This worked! Increasing the max_input_vars value to something higher allows me to add my form with some more form fields.
I did have a small issue with the tutorial you linked to, and I have a work around. I learned it is wise to not have a phpinfo.php that the public can reach because it gives away site configuration information to possible attackers. I could also not locate the php.ini file through something like Filezilla. The solution for both issues was to go to my webhosting environment. There I could find the max_input_vars value through (and this might be different for everyone, depenidng on how your host sets it up) 'Manage your website' > there was a sidebar ‘Advanced’ > PHPinfo. There you can see ‘max_input_vars´. You can change it through Advanced > PHP configuration > PHP options > maxInputVars. I set it from 5000 to 10000, and tested the form and it now works. Thanks Peter and Meta Box!
This topic can close.
John Connor
ParticipantYeah there is really something strange happening. It feels like I am reaching some maximum size limit of a custom field group. Perhaps something with maximum row sizes? I have no clue, I'm just a beginner.
One indication of me hitting some maximum field group size is this: After I deleted one form field, I can again correctly associate the custom field group to the right custom post type as per usual (through custom field group > settings > location, update).
This is literally the only change needed to allow it again.However, setting a custom setting for the form field group, like 'geo' = 'true', ... yes well this doesn't get saved. Again it seems I hit some sort of maximum limit or something. And indeed, after I deleted now delete just one more form field, suddenly saving this geo = true custom setting is possible again. So weird!
Now I add a few more form fields. I am just randomly making a Icon, Url, Fieldset Text, and Date field type. I hit 'update', my field group refreshes and guess what? Only the icon and url field types are now saved. The Fieldset Text and Date fields are not saved. If I try adding another field, this time I randomly used the 'password' field type, and then press 'update' again, this field is also not showing.
Needless to say, hitting this limit is a huge problem. I can't add several fields. I really need these as I will be using this entire form field group for front-end-user-submissions.
Please let me know how I can change the max size for a custom field group... .
January 18, 2025 at 5:26 AM in reply to: OSM map does not render fully when the field has conditional logic #47443John Connor
ParticipantThere is another issue going on, too. I made a separate topic about it here (https://support.metabox.io/topic/custom-fields-broken/). It seems I have reached some sort of limit in terms of custom fields group. I can't add more fields, and the post type my custom field group is associated with always defaults back to the standard WordPress 'post' post type. As a matter of fact, I can't even set geo = true in the custom settings of the field group. Clicking 'update' doesn't change that.
At the moment I can't continue working on my field group... . Thanks for any help.
January 18, 2025 at 5:22 AM in reply to: OSM map does not render fully when the field has conditional logic #47442John Connor
ParticipantHi Peter!
Thanks for being here and helping out. I must say that I've used conditional logic many times in my field group. They all work - I think that the conditional logic is set up good, too. As soon as I take away conditional logic, it renders properly. Weird.Having said that; my custom fields group is quite large... it is 8482 lines. Also, there is sensitive information there, I would rather not have that visible here. Could I share in another way? Feel free to reach out to me through my account email if needed.
-
AuthorPosts