I am trying to: Create Content Template. This doesn't happen for all Post Types only for some. For thoses that it works I get the editor screen. When it fails I get Critical error similar to the text I'm posting. I have turned the DEBUG flag to true! The template is created as I can see it in the template lists. I have deleted it and tried again but still same error. If this is relevant I have migrated a DRUPAL site to WP using hidden link pugin.
Link to a page where the issue can be seen: I'm using a local development site not visable to ouside
I expected to see: Editor page as is the case with some Post types.
Instead, I got: Fatal error: Uncaught Error: Call to a member function get_value_filtered() on null in /Users/Tanya/Sites/www/wordpress.test/wp-content/plugins/types/application/models/field/type/checkbox/view/frontend.php:33 Stack trace: #0 /Users/Tanya/Sites/www/wordpress.test/wp-content/plugins/types/application/models/field/view.php(42): Types_Field_Type_Checkbox_View_Frontend->get_value() #1 /Users/Tanya/Sites/www/wordpress.test/wp-content/plugins/types/application/models/field/service.php(145): Types_Field_View->render() #2 /Users/Tanya/Sites/www/wordpress.test/wp-content/plugins/types/application/functions_public.php(58): Types_Field_Service->render_frontend(Object(Types_Field_Gateway_Wordpress_Post), Object(WP_Post), 'archived', Array, NULL) #3 /Users/Tanya/Sites/www/wordpress.test/wp-content/plugins/types/application/functions_public.php(34): types_render_postmeta('archived', Array, NULL) #4 /Users/Tanya/Sites/www/wordpress.test/wp-content/plugins/toolset-blocks/vendor/toolset/dynamic-sources/server/ToolsetSources/FieldInstanceM in /Users/Tanya/Sites/www/wordpress.test/wp-content/plugins/types/application/models/field/type/checkbox/view/frontend.php on line 33
There has been a critical error on this website. Please check your site admin email inbox for instructions.
The message appears to relate to a checkboxes field.
Could you verify if the specific templates that this issue occurs on are for post types that have a custom field group assigned which includes a Types checkboxes field?
If this is a local site that we cannot access, could you share a screenshot of the settings for the checkboxes field when editing the custom field group listed at Toolset > Custom Fields.
Are you able to retrieve content directly from the database? That is, are you familiar with using something like phpMyAdmin to inspect the database?
Could you look for a post that has a checkboxes field and locate it in wp_postmeta and show what is stored there? (Note, Types custom fields are stored in wp_postmeta with a 'wpcf-' prefix, so if you had a checkboxes field with a slug of 'my-checkboxes' then it would actually be stored in wp_postmeta with the key 'wpcf-my-checkboxes'.
Hello,
Yes you're right the first post type I tried to create a template on does have checkbox fields. I'm attaching the screenshots as you requested. I also went into phpMyAdmin and serached for 'wpcf-my-checkboxes' in 'wp_postmeta'. and nothing was found. I'm attaching a screenshot af that as well.
From the error, it seems that the code search for a custom field "archived". And from the screenshot, there is indeed a checkbox custom field "archived" in the fields for Arts. I assume that you encounter these errors when trying to create a content template for Art custom post type, right? Can you tell for what custom post types these errors appear?
Can you search the database again, using phpMyAdmin for the keyword "wpcf-archived" and for the keyword "archived" and share the screenshots?
Finally, we might need to take a copy of your website and analyze it. In that case, we'll ask you to provide a Duplicator or All In One Migration package through a sharing service(GDrive, Dropbox).
Yes I've done the above search and am attaching the screenshots.
I’ve also moved the local site to the production server so that you may have access.
The site is hidden link
It may raise a security flag. Not sure why and as this is only a test at the moment I don't want to truy to solve it but it does work if you allow the exception
how can I give you the credentials to go into the admin section?
Can you change the configuration of the checkbox field to save 0 when the field is unchecked? Check this screenshot hidden link
Then, try to create a new template and check if the issue persists.
If that does not help, allow me temporary access to your website and let me know for what custom post types the issue appears?
Your next reply will be private to let you share credentials safely.
Hello,
Thank you for that. The small change to save 0 has helped. But now I have a paralell problem that may be related. When I try to create an Archive, on any custom post, instead of giving me an editor page I get a black page. Is there another flag, similar to the checkbox, I need to select. It's just a black page no error message of any kind
New threads created by Jamal and linked to this one are listed below:
Awesome. I am glad I could help. However, for support rules, we are able to handle only one issue at a time. This helps us to bring you a better service and also helps other users to find all the information here exposed. For that reason, I have created another ticket to help you with this issue. I'll be posting my replies there.