[Resolved] Hooks disappeared after database restore

Home Forums Support [Resolved] Hooks disappeared after database restore

Home Forums Support Hooks disappeared after database restore

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #959084
    Giacomo

    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,
    Giacomo

    #959383
    Leo
    Staff
    Customer Support

    Hi 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.

    #959604
    Giacomo

    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.
    Best regards,
    Giacomo

    #959783
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Are you using the old hook system?

    If so, is “GP Hooks” activated (or present) in “Appearance > GeneratePress”?

    #959802
    Giacomo

    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.
    Best regards,
    Giacomo

    #959892
    Giacomo

    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?
    Best regards,
    Giacomo

    #960343
    Tom
    Lead Developer
    Lead 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 🙂

    #1394122
    Karl

    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?

    Thanks,
    Karl

    #1394247
    David
    Staff
    Customer Support

    Hi there,

    sounds like cutting and pasting from the database would be the best solution.

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.