Okay, many thanks to you both. I didn’t know where to begin, and this will stand me in good stead in future troubleshooting situations, I’m confident.
WP_DEBUG still isn’t working for me, but I located the server’s PHP error log. Thanks for that additional pointer, Shane.
Here’s the relevant bit from the error log:
[31-Jan-2022 19:50:15 UTC] PHP Warning: Illegal string offset 'validate' in /dev.###.net/htdocs/wp-content/themes/generatepress_child/functions.php on line 702
[31-Jan-2022 19:50:15 UTC] PHP Fatal error: Uncaught Error: Cannot use string offset as an array in /dev.###.net/htdocs/wp-content/themes/generatepress_child/functions.php:702
Stack trace:
#0 /dev.###.net/htdocs/wp-includes/class-wp-hook.php(309): my_required_fields()
#1 /dev.###.net/htdocs/wp-includes/plugin.php(189): WP_Hook->apply_filters()
#2 /dev.###.net/htdocs/wp-content/plugins/cred-frontend-editor/application/controllers/form_rendering.php(146): apply_filters()
#3 /dev.###.net/htdocs/wp-content/plugins/cred-frontend-editor/application/controllers/translate_field_factory.php(225): CRED_Form_Rendering->add()
#4 /dev.###.net/htdocs/wp-content/plugins/cred-frontend-editor/application/models/field/command/custom_fields.php(67): CRED_Translate_Field_Factory->cred_translate_field()
#5 /dev.###. in /dev.###.net/htdocs/wp-content/themes/generatepress_child/functions.php on line 702
I haven’t tried to decipher all of that, but figured it would make sense to you.
What I did understand was that I should try disabling the filter at functions.php line 702, which was this:
/**
* required form fields
*/
function my_required_fields( $field ){
if(in_array($field['id'], array('first_name', 'email'))){
$field['data']['validate']['required'] = array (
'active' => 1,
'message' => 'This field is required'
);
}
return $field;
}
add_filter('cred_filter_field_before_add_to_form', 'my_required_fields', 10, 1);
I’d forgotten that I’d put this filter in place for a signup form, added to the site some time ago, also using the Cred ‘first_name’ field. That earlier form is working fine, but the filter seems to have been a problem for this more recent one.
I’ve now applied the recommendation for modifying this filter in the reply by Chanond here: https://toolset.com/forums/topic/cred_filter_field_before_add_to_form-not-working-in-php-7-1/?bbp_reply_to=1268509&_wpnonce=b25a341ff5#new-post
Making that change allows my new form (and the pages it’s in) to load.
My issue is resolved now. Thank you!