To be able to edit the template I made a small edit to the file:
plugins/toolset-blocks/application/controllers/shortcode/resolver/conditionals.php
I commented out line 62, part of the process_conditional_shortcodes function:
=> hidden link
private function process_conditional_shortcodes( $content ) {
// return apply_filters( 'wpv_process_conditional_shortcodes', $content );
}
That allowed me to open the template to edit it.
With every content template you are checking post body (post content) using conditional block,
suspecting that is the cause which I already shared before about the checking post body (post content) using conditional block.
I registered a custom function to "Custom Code" section offered by Toolset with code snippet namely "toolset-custom-code" as a simpler custom function to check of whether post content is empty it will return 0 and if not it will return 1:
=> hidden link
function has_content(){
global $post;
$return = empty( $post->content ) ? 0 : 1;
return $return;
}
Then I've replace the conditional block condition where you are checking post body with the custom function has_content():
- hidden link
I've also registered the function has_content at:
=> Toolset => Settings => Front-end Content => Functions inside conditional evaluations
- https://toolset.com/course-lesson/using-toolset-conditional-block/#checking-for-values-from-custom-functions
Then I saved the template, no problem.
I then edited the above file again to restore the line I had commented out.
I un-commented out line 62, part of the process_conditional_shortcodes function and saved the file.
=> hidden link
private function process_conditional_shortcodes( $content ) {
return apply_filters( 'wpv_process_conditional_shortcodes', $content );
}
Now I can open the template, edit it, save it.
- hidden link
- hidden link
However - I see many incomplete conditionals with the following content template, you can check and fix it as required.
- hidden link