- This topic has 8 replies, 2 voices, and was last updated 10 months, 1 week ago by David.
July 16, 2019 at 4:55 am #959084Giacomo
Hi, I made a restore of the wordpress database. After that I saw that my hooks code disappeared. It is not present either in the new element legacy hooks section a
or in the old one.
Could you please help me to solve this problem?
GiacomoJuly 16, 2019 at 9:10 am #959383LeoStaffCustomer SupportJuly 16, 2019 at 12:34 pm #959604Giacomo
Hi Leo, thanks for your answer.
I restored the database and the website with a backup made yesterday (before the accidentally deletion of part of wp_posts table) but the hooks code is still missing.
Then I found an old hook export made from Generatepress setting page (generate-hooks-export.json). The import completed but the hook code continue to be missing.
Have you any idea to solve my problem?
Thanks for support.
GiacomoJuly 16, 2019 at 5:42 pm #959783TomLead DeveloperLead DeveloperJuly 16, 2019 at 6:34 pm #959802Giacomo
Yes, I am still using the old hook system and it is visible and active in Appearance > GeneratePress. But when I access to the old (now called legacy) hook page, I find it empty and there is not any effect of my hook code into the website.
For me it is not a problem to switch to the new solution if you indicate to me where I can find the my hook code so I could move it.
Thank you for your support.
GiacomoJuly 16, 2019 at 11:27 pm #959892Giacomo
Hi again, I solved the problem… I found in the db my hook code inside the option table (generate_hooks row) and I reinserted it in the legacy hook page after having renamed the hook row in the db.
Now the website works again well but I haven’t yet understood what the cause of the problem was. Do you have any idea?
GiacomoJuly 17, 2019 at 9:02 am #960343TomLead DeveloperLead Developer
I’m not sure why that would have happened. The table in the database should be backed up/restored like any other table.
Glad you got it sorted 🙂August 9, 2020 at 8:37 am #1394122Karl
Hi, I have the same problem but I’m not sure how to fix it. I go to Apperance > Elements > Legacy hooks. Here I can only create. All scripts I’ve previously added with hooks are gone. But they are still working!
And when I check phpMyAdmin generate_hooks table, I see all my scripts. So what should I do? Should I just cut the code from the table and paste the code in new element hook?
KarlAugust 9, 2020 at 10:12 am #1394247
- You must be logged in to reply to this topic.