Hi,
I added custom code in Toolset settings which I didn't unfortunately test and activated and now I can't login even in recovery mode, only "There has been a critical error on this website..."
Now I need to delete or deactivate the code I added, but I can't find where the Toolset custom codes are in the database. Would you please guide me to the right direction, thank you.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
This is related to the custom code you wrote, I realized I need it with another view also and stupidly I just copied the code, and changed the view id. Didn't test, only activated and here we are. I realize now I should have changed the function name, right? Or even better I should have added the view with OR in the same custom code. I'm so novice at PHP.
Now I got the admin back (I didn't yet delete the toolset account) with this in config define( 'TOOLSET_DISABLE_CODE_SNIPPETS', true );
But of course the snippets aren't there and if I add the define( 'TOOLSET_DISABLE_CODE_SNIPPETS_GUI', true ); I can't get into admin.
I didn't yet delete the toolset user from this site. Do you have the credentials?
We do not store access details, once ticket is marked resolved the parivate accessa details automatically deleted.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
I've removed the code from the snippet you added and I've adjusted the code added to "Custom Code" section with "toolset-custom-code" snippet as given under:
Ok, but when I did that, I couldn't get inside WP. There was this "There has been a critical error on this website..." Even recovery_mode didn't help. There's a way around that?
To get in to admin you have to uncomment that line and then I've deleted the unwanted code and modified the code I shared with you before so you will have working site.
Once site is working, I've comment out that code as we need to access the custom code section. I hope that clarifies things and this was not Toolset issue but you by mistake added wrong code.
I'm sorry, but this is excactly what I don't understand how this was done:
"To get in to admin you have to uncomment that line and then I've deleted the unwanted code and modified the code I shared with you before so you will have working site. "
1. "To get in to admin you have to uncomment that line" - which line? If I uncomment "define( 'TOOLSET_DISABLE_CODE_SNIPPETS', true );" I definetly can't get in because of the error.
2. "and then I've deleted the unwanted code and modified the code" - how can you edit the code, if it's not there.
And yes, I understand the code error is not Toolset issue, it was my bad PHP. But the steps how to get back in and be able to edit the code would be Toolset issue, right?
1. "To get in to admin you have to uncomment that line" - which line? If I uncomment "define( 'TOOLSET_DISABLE_CODE_SNIPPETS', true );" I definetly can't get in because of the error.
===>
Yes - but I access the wp-config.php file by loggedin usnig FTP/SFTP and then you can add/remove the said line.
2. "and then I've deleted the unwanted code and modified the code" - how can you edit the code, if it's not there.
===>
As said - I've access those custom code snippet using FTP and deleted the unwanted code. There is no Toolset issue involved here. I did not know tht you were copy/paste same function.
In such cases you should login using FTP/SFTP and try to check the file where you see the error and fix it accordingly.
Ok Minesh, this is the excact thing that I want Toolset answer since it's Toolset custom code:
You say: "As said - I've access those custom code snippet using FTP and deleted the unwanted code. "
Where is the Toolset custom code snippet (using FTP)? In which folder, what's the file name?
Thank you, I will not bother you more with questions when I get this info 🙂
Within "wp-content" folder you will see a folder namely "toolset-customizations" within that you will see all snippets you created using Toolset custom code.