Skip Navigation

[Resolved] Activating toolset breaks website

This support ticket is created 2 years, 4 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 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 13 replies, has 3 voices.

Last updated by Waqar 2 years, 3 months ago.

Assisted by: Waqar.

Author
Posts
#2461525

Tell us what you are trying to do?
Further to the 3 way relationship using taxonomy, I made an amendment to the script that you setup and it crashed the site, Now the website only comes back up when toolset is disabled.

Is there any documentation that you are following?

Is there a similar example that we can see?

What is the link to your site?

#2461599

Shane
Supporter

Languages: English (English )

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

Hi Saeed,

Thank you for getting in touch.

You mention that your site breaks when Toolset is active. Can you let me know the error that you're getting?

Thanks,
Shane

#2461629
wordpress-critical-error (1).png

Hello Shane,

I wonder if I can request Waqar's assistance on this as it's kind of a follow-on from the last ticket which unfortunately was auto-closed just a couple of days ago.

If toolset plugin is activated, the site shows an error: There has been a critical error on your website. see attached.,

If I rename the plugins directory (as suggested in a link from the error message), I can restart the website but all plugins are disabled. The if I rename the plugins directory back to "plugins", I can then selectively activate the plugins. But as soon as I activate any toolset plugin, the website crashed.

#2461699

Shane
Supporter

Languages: English (English )

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

Hi Saeed,

Sure I can re-assign it to Waqar for you.

Thanks,
Shane

#2462125

Hi Saeed,

I'm setting your next reply as private so that you can share the temporary admin login details of your website, along with the FTP access.

Please also include the details like where exactly the custom code snippet has been added.

Note: Making a complete backup copy is recommended before sharing the access details.

regards,
Waqar

#2463367

Thank you for sharing these details.

I'll do some troubleshooting and share where the code went wrong.

Thank you for your patience.

#2465063

Just wanted to let you know that I'm still working on this and will share the findings, as soon as I can.

#2465071

Hi Waqar
If it's too much hassle to troubleshoot, do you think I should uninstall Toolset and reinstall and then rebuild the solution?

Saeed

#2465687

Thank you for waiting.

You won't have to reinstall the Toolset plugins or rebuild everything from scratch.

Here are the steps, that I'll recommend:

1. Your first goal should be to make the custom code snippets ineffective. If you've been including them through WP Admin -> Toolset -> Settings -> Custom Code, you can include the following line in your website's "wp-config.php" file:
( ref: https://wordpress.org/support/article/editing-wp-config-php/ )


define( 'TOOLSET_DISABLE_CODE_SNIPPETS', true );

This will disable the Toolset's custom code feature and the website will not crash, once you'll activate Toolset plugins.

2. Individual custom code snippets added through the Toolset's custom code feature are saved in files in the "/wp-content/toolset-customizations/" folder.

Once the website is back on with Toolset plugins, you can edit those files and remove the custom from them, so that they don't break the website again.

After that, you can remove the code added in step 1.

3. In the last step, you can share the code changes that you added to my originally proposed solution and I'll be able to share some pointers for the adjustments.

Very important: The custom code examples from our forum are shared to get you started in the right direction and you're welcome to adjust them as needed. However, if you're having difficulty making changes to that code on your own, it would be safer to hire a professional from our list of recommended contractors:
https://toolset.com/contractors/

#2469985

I defined a new taxonomy and I am trying to pull in terms from that taxonomy but for some reason, following your guidance, i cannot retrieve terms from the new taxonomy. Can you help with that - I have a new code snippet you can check please.

#2470615

Thanks for writing back.

If I understand correctly, the website needs to have another taxonomy 'Level3-Services', and the terms from this will also be included in the process of automatic "Service pages" creation.

Similarly, the shortcode to get the different levels of taxonomy terms will also need to be extended to support this new taxonomy 'Level3-Services'.

I've spent some time creating the logic of this addition but noted that the introduction of another level of taxonomy greatly complicates the initially discussed requirement. As I mentioned in my previous reply too, we can only share some suggestions and pointers over the support forum, when it comes to code customization. For more detailed and exclusive customization assistance, we recommend hiring a professional from our list of recommended contractors:
https://toolset.com/contractors/

This will allow you to discuss the entire project's requirements with your developer and he/she will be able to assist you in a more timely and efficient manner. It is also possible that after reviewing the complete requirements, he/she can come up with an even better approach than what I've suggested, already.

I hope this makes sense.

#2470731

Hi Waqar

I have already created the logic and page structure using the additional taxonomy. The shortcode has been coded and tested; it generates all the pages correctly. FYI Its the 1st code in the snippets list, with my name in the description.

I am just struggling to pull in the terms from this additional taxonomy on the created pages. Just need a pointer in the right direction to see where I am going wrong.

Thanks Waqar.

#2473331

I apologize for the delay in getting back on this.

We had an unusually busy forum queue over the weekend, but, I'll be resuming work on this, today and will share the findings, accordingly.

#2473925

Thank you for waiting.

I've checked your website's code snippet "custom-shortcode-for-auto-level3-service-page-creation.php" and noticed that it is setting the taxonomy term items for the "location" and the "brand-and-model" taxonomies, but not for the 'level3-service' taxonomy.

If you'll check the created "Service Pages" posts at WP Admin -> Service Pages, you'll see that the column for the 'level3-service' taxonomy is empty.
( screenshot: hidden link )

In the code snippet, where you're creating an array for the new post creation, you can try changing the array:


$args = array(
	'post_type' => $target_post_type,
	'post_title' => $check_title,
	'post_status' => 'publish',
	'tax_input'    => array(
		$location_taxonomy     => array($location_term->term_id),
		$brand_model_taxonomy => array($current_parent_term->term_id, $brand_model_term->term_id),
	),
);

To include the line for the 'level3-service' taxonomy:


$args = array(
	'post_type' => $target_post_type,
	'post_title' => $check_title,
	'post_status' => 'publish',
	'tax_input'    => array(
		$location_taxonomy     => array($location_term->term_id),
		$brand_model_taxonomy => array($current_parent_term->term_id, $brand_model_term->term_id),
		$lev3svs_taxonomy => array($lev3svs_term->term_id),
	),
);

After that, you can delete the existing posts, create them again and see if all the taxonomy term items are correctly attached to the newly created posts.