Giter Club home page Giter Club logo

Comments (7)

GheorgheP avatar GheorgheP commented on August 17, 2024

Debugging the backup is very funny as backup is working similarly in a parallel thread so you need to activate the WP_DEBUG_LOG in wp-config.php: https://codex.wordpress.org/Debugging_in_WordPress#WP_DEBUG_LOG
So you'll get errors in /wp-content/debug.log.

Also you get this error during backup or demo installation process?

from unyson-backups-extension.

spatricius avatar spatricius commented on August 17, 2024

Yeah, I've seen the code. I'm impressed with the architecture you guys did there, but also it makes problems tricky to debug.

The problem happens at demo installation during db restore. I tried debug.log, but nothing seems to be generating any kind of PHP error. Also I got no luck finding the cause by putting error_log in \wpdb::query ( all queries results are ok ).

What happens is wordpress logs user out on some stage ( why? ), therefore ajax response is 0 ( no wp_ajax_nopriv_ actions on status check present ) and installation stops with an error ( nevertheless, everything seems to be imported correctly ).

My db json file is about 5MB. The importer used to work correctly when that was smaller, so I guess this is some kind of performance related issue. But let me clear this should probably not be considered as a timeout issue, as it all happens in less than 60 seconds.

PS. Everything works fine when installing demo content on same page it was exported from.

from unyson-backups-extension.

GheorgheP avatar GheorgheP commented on August 17, 2024

Hmmm, you say during import.

I had this problem before too, and really could not find the issue, but it wasn't even a big issue, as I refreshed my page and the content import was continuing without problems.

But I think it may be because when we import the backup it replaces all the tables in database, and even the row with database state so wordpress see that database state was changes and signs out you, and if you are not logged in, you cannot make a backup, that's why I just had to refresh the page to login and continue the backup.

The problem is that I cannot reproduce this problem to test it out.

from unyson-backups-extension.

spatricius avatar spatricius commented on August 17, 2024

Well, it doesn't seem a big issue to me personally, but I believe this can be a user experience bummer.

Previously, I thought wp_users isn't touched at all during import, but since you say all the tables are replaced, then that's probably the cause. Still, I'm unable to find the piece of code that logs user out. Should it be \wp_clear_auth_cookie or \wp_destroy_current_session? Perhaps we could add a hook to relogin the user after this logging out happens to prevent error modal from showing up?

As far as reproducing the problem goes, it should be easy. I will send you my db json backup. It crashes everytime.

from unyson-backups-extension.

GheorgheP avatar GheorgheP commented on August 17, 2024

The wp_users is not touched, as we do not replace the wp_users table.

from unyson-backups-extension.

spatricius avatar spatricius commented on August 17, 2024

I've sent you the demo content file.

I've just noticed content exported from multisite imports without problems on another multisite, and content exported at single site installation imports flawlessly on single sites. I wasn't aware of that previously. I guess I overlooked this important detail.

Still, is it not supposed to work multisite -> single site, single site -> multisite ? ( content backup, not full )

from unyson-backups-extension.

spatricius avatar spatricius commented on August 17, 2024

Hi,

Any luck recreating the issue? I sent you an e-mail 3 weeks ago. Have you received it?

from unyson-backups-extension.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.