- This topic has 8 replies, 2 voices, and was last updated 3 years, 8 months ago by David.
-
AuthorPosts
-
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?
Best regards,
GiacomoJuly 16, 2019 at 9:10 am #959383LeoStaffCustomer SupportHi there,
There is no way for us to retrieve your code unfortunately.
I would recommend checking with your host to find a backup that still has your hooks content and restore to that one.
July 16, 2019 at 12:34 pm #959604GiacomoHi 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.
Best regards,
GiacomoJuly 16, 2019 at 5:42 pm #959783TomLead DeveloperLead DeveloperHi there,
Are you using the old hook system?
If so, is “GP Hooks” activated (or present) in “Appearance > GeneratePress”?
July 16, 2019 at 6:34 pm #959802GiacomoYes, 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.
Best regards,
GiacomoJuly 16, 2019 at 11:27 pm #959892GiacomoHi 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?
Best regards,
GiacomoJuly 17, 2019 at 9:02 am #960343TomLead DeveloperLead DeveloperI’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 #1394122KarlHi, 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?Thanks,
KarlAugust 9, 2020 at 10:12 am #1394247DavidStaffCustomer SupportHi there,
sounds like cutting and pasting from the database would be the best solution.
-
AuthorPosts
- You must be logged in to reply to this topic.