Skip Navigation

[Resolved] ToolSet custom code breaking back end, locking me out.

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here is that when the user activates their custom code in Toolset -> Settings -> Custom Code it breaks their site.

Solution:

In this case the user had a duplicate code in their functions.php file. To fix this particular issue all that was needed was to remove the duplicate code.

If you want to know exactly what the error is I would recommend that you enable the wordpress debugging on your site by following the instructions in the link below.
https://www.a2hosting.com/kb/installable-applications/optimization-and-configuration/wordpress2/debugging-wordpress

This support ticket is created 5 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by guyH 5 years, 6 months ago.

Assisted by: Shane.

Author
Posts
#1292063

I am trying to: add the custom code snippet given by a ToolSet support agent for a previous site. It works if I put it in the child theme, but not in the ToolSet custom code section. It breaks the back end and now I can't remove it or get to any admin pages. Where do I remove it via FTP or SSH? (note: can't provide debug info because I'm locked out of the backend). Here is the custom snippet I added in the ToolSet custom code section with the slug fusion_builder_default_post_type :

add_filter( 'fusion_builder_default_post_types', 'tssupp_2973_register_content_templates_in_fusion_builder' );
add_filter( 'fusion_builder_allowed_post_types', 'tssupp_2973_register_content_templates_in_fusion_builder' );
function tssupp_2973_register_content_templates_in_fusion_builder( $post_types ) {
$post_types[] = 'view-template';
return $post_types;
}

Link to a page where the issue can be seen: jillawebb.com (note: It seems this site is not registered, will do that when I can get to the back end.)

I expected to see: admin pages

Instead, I got: "The site is experiencing technical difficulties. Please check your site admin email inbox for instructions."

#1292107

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Guy,

Thank you for contacting our support forum.

The code is normally stored in wp-content/toolset-customizations

Also Ensure that when you are moving the code from the child theme to the custom code section you first remove it from the child theme.

Because if you activate it in the toolset custom code section while it is still active in the child form then you will get a duplicate function fatal error.

Thanks,
Shane

#1293019

Thank you Shane. I had figured out where to remove the Custom Code file after I posted this. Glad to verify it with your response. And thanks for explaining about NOT having duplicate code in the child theme!!

#1293021

My issue is resolved now. Thank you!