Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error "Class 'backup_migrate_destination_filesource' not found" #158

Open
jenlampton opened this issue Mar 27, 2024 · 16 comments
Open

Comments

@jenlampton
Copy link
Member

jenlampton commented Mar 27, 2024

After updating to 1.x-1.0.26 I get a fatal error every time I enable or disable a module or theme:

Error
Class 'backup_migrate_destination_filesource' not found

This could be related to (or the same as) #145

Downgrading to 1.x-1.0.25Update available solved the issue.

@argiepiano
Copy link
Collaborator

argiepiano commented Mar 27, 2024

@jenlampton I'm not able to reproduce. Upgrading to 1.0.26 did not produce any issues for me. The release has been out for over 3 weeks, and nobody has reported this (or other) issues.

My guess is that there must be a specific setting or interaction with other contrib modules that's causing this issue for you.

It would be helpful if you posted your site settings found on admin/config/system/backup_migrate/settings. Are there any specific custom destinations in your settings?

EDIT: I don't see how #145 is at all related to this. That issue was about a clumsy UI design.

@opi
Copy link
Contributor

opi commented Apr 2, 2024

Same here, on a proper LAMP stack on PHP 8.2.16 ;

Downgrade on 1.0.25 as suggested by @jenlampton fix the issue.

@opi
Copy link
Contributor

opi commented Apr 2, 2024

It should be related to the new implementation of hook_autoload_info() in 1.x-1.0.25...1.x-1.0.26#diff-e13008353617b65df8489186635357d2e81cdea31ba8f4e8a2ca25984dd37716R1972

@argiepiano
Copy link
Collaborator

@opi thanks so much for reporting and for the additional info. I'm not able to reproduce the problem, so it's very difficult to troubleshoot. Would you be able to provide more details?

When does this happen
Do you see other messages in the log
Can you provide a list of the installed contrib modules
Can you provide a snapshot of the settings UI page for backup and migrate, to see your profiles, sources and destinations

And if you have the time would you be willing to manually revert the autoload commit and try again to see if that is the culprit?

Thanks

@jenlampton
Copy link
Member Author

jenlampton commented Apr 3, 2024

It sounds like there is a larger underlying problem with updates. I wonder if fixing #160 would solve this too?

When does this happen

I had it happen on two sites when updating to 1.x-1.0.26. One was running version 1.x-1.0.25, the other was running 1.x-1.0.22.

It happened both on the production server (PHP 7.4.33), and also when I tested PHP 8.2.16 locally.

Do you see other messages in the log

Mostly 404s

Can you provide a list of the installed contrib modules

Site 1, running 1.x-1.0.25 (all the modules below are on the latest versions)

CAPTCHA 
Google Analytics 
Honeypot 
jPlayer 
Nodequeue
On The Web
reCAPTCHA

Site 2, running 1.x-1.0.22 (all the modules below are on the latest versions)

Custom Meta
Footnotes
Google Analytics
Image crop 
Metatag
Views Slideshow 

Can you provide a snapshot of the settings UI page for backup and migrate, to see your profiles, sources and destinations

Screenshot 2024-04-03 at 2 21 40 PM Screenshot 2024-04-03 at 2 25 42 PM

@argiepiano
Copy link
Collaborator

I wonder if fixing #160 would solve this too?

Possibly. I'll try to work on this over the weekend

@argiepiano
Copy link
Collaborator

@jenlampton thanks for all the details!

You say:

I had it happen on two sites when updating to 1.x-1.0.26. One was running version 1.x-1.0.25, the other was running 1.x-1.0.22. It happened both on the production server, and when running locally.

Is this happening on every page load? update.php call? Cache clearing?

@jenlampton
Copy link
Member Author

jenlampton commented Apr 3, 2024

Is this happening on every page load? update.php call? Cache clearing?

No, I only saw it on the modules and themes pages. Let me update a site again and see if I can reproduce it on cache clear too.

every time I enable or disable a module or theme

@argiepiano
Copy link
Collaborator

@jenlampton @opi, I've been trying to reproduce this problem on and off for the last 2 weeks. I even installed all the contrib modules form @jenlampton "site 2". I overrode the destinations, sources and profiles of backup_migrate. I just can't seem to reproduce, which makes it really hard to debug.

I wonder if you might have a sanitized version of the database of the site that gives you trouble, so that I could use for testing? Also question: is this happening only on those two sites? Have you found this issue on other sites as well? If it's only this site, it may have to do with a specific theme or a contrib module.

@argiepiano
Copy link
Collaborator

@jenlampton, @opi: I have a separate issue and PR that replaces all backup_migrate_include() invocations with require_once. This is something that was done years ago in the D7 version.

Can you please apply the patch in #162 to version 1.x-1.0.26 before upgrading from version 25, and test upgrading?

@manu-mei-singh
Copy link

Hi All,

We are getting this issue too, but for some reason only on production. We were getting #160 on staging. I resolved this issue on production by deactivating BM before running the DB update 1009 with Bee. Afterwards I re-activated BM, and it seems like it's running ok (as of now). We did the Backdrop before updating BM.

I am not sure if this deactivate/activate BM before/after the update is the best fix...

@argiepiano
Copy link
Collaborator

@manu-mei-singh can you please try applying the patch in #162 and try the upgrade again? This would help immensely, as I have still not been able to reproduce this problem.

@manu-mei-singh
Copy link

Hi @argiepiano, Apologies for the delay, other things came up.
But I finally had time to give this a try!

What I've tried:
update production to backup_migrate 1.x-1.0.26
used CLI Bee to to run bee updb
got the following error:

Warning: Cannot modify header information - headers already sent by (output started at /files/bee/commands/update.bee.inc:73)
in backdrop_send_headers() (line 1646 of /production/public/core/includes/bootstrap.inc).

Error: Class 'backup_migrate_destination_filesource' not found in require_once() (line 13 of /production/public/modules/backup_migrate/includes/BackupMigrateFilesDestinationDbConfigSource.inc

I wasn't sure about patching up a whole folder, so I downloaded a zip of backup_migrate-1.x-1.x-issue-161 and then replaced the file of production/public/modules/backup_migrate/ with backup_migrate-1.x-1.x-issue-161

got the same error:
Warning: Cannot modify header information - headers already sent by (output started at /files/bee/commands/update.bee.inc:73)
in backdrop_send_headers() (line 1646 of /production/public/core/includes/bootstrap.inc).

Error: Class 'backup_migrate_destination_filesource' not found in require_once() (line 13 of /production/public/modules/backup_migrate/includes/BackupMigrateFilesDestinationDbConfigSource.inc

things I will try next
Deactivate backup_migrate and rerun the update.

@manu-mei-singh
Copy link

Actually @argiepiano , it's probably more useful if I roll it back to the previous version of Backup_migrate. beyond that I'll wait to hear from you before I proceed

@argiepiano
Copy link
Collaborator

Thanks for trying @manu-mei-singh. It's good to know you tried the update with bee. The error about the headers is strange - not sure if this is related to bakcup_migrate.

Are you on Backdrop 1.28.0? If so, can you go to admin/reports/debug in your site and paste here the debug information? It'd be helpful to know that so that I can try to reproduce the issue.

@argiepiano
Copy link
Collaborator

@manu-mei-singh also please let me know your "sources" and "destinations" configurations for BM. Do you have a custom source / destination? Have you overridden the ones provided by default?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants