backdrop-contrib / backup_migrate

Port of the Drupal backup_migrate module to Backdrop
GNU General Public License v2.0
7 stars 14 forks source link

Error after update to Backdrop 1.19.0 #63

Closed opi closed 3 years ago

opi commented 3 years ago

Error : Cannot access protected property DatabaseConnection_mysql::$pdo dans backup_migrate_source_db_mysql->_get_db_connection() (ligne 425 dans /path/to/docroot/modules/backup_migrate/includes/sources.db.mysql.inc

Related Backdrop commit may be https://github.com/backdrop/backdrop/commit/4102cd21190e75e35e4274472565691f7e4fb6a9#diff-a30038705d970e43b622562028439144c59afc2abc9fb53048aff64286fbcfc3

MustafaDogan78 commented 3 years ago

Yes there is a problem. I also saw it. My friend also said.

bacdropnb commented 3 years ago

yes the same problem exists in my project

quackers8me commented 3 years ago

I've reviewed the code but cannot find why this error is occurring. I've posted this issue in the above noted issue to see what needs to change. https://github.com/backdrop/backdrop/commit/4102cd21190e75e35e4274472565691f7e4fb6a9

indigoxela commented 3 years ago

As a quick workaround: comment out line 425 in file includes/sources.db.mysql.inc (in module backup_migrate).

That should bring your sites back.

MustafaDogan78 commented 3 years ago

Very useful when moving site. I felt like my car broke down at the top of the mountain. I think backup migrate should have been in the box.

robnacnamha commented 3 years ago

Similar issue to opi I guess. I created a new vanilla site yesterday with backdrop 1.19.0 and installed backup_migrate using UI and when I came to enable module I got the following error and backup_migrate module not showing up configuration/system, despite appearing to be enabled in module list:

Error: Call to undefined method DatabaseConnection_mysql::exec() in backup_migrate_source_db_mysql->_get_db_connection()

quackers8me commented 3 years ago

It appears the error is because the sql statement has not been prepared first before executing. I will investigate further how to make the prepare on this particular object. @indigoxela workaround for commenting out line 425 $this->connection->exec("SET sql_mode=''");

indigoxela commented 3 years ago

@quackers8me I had no time to dig deeper, but I suspect that old code (from D6 I guess), might be obsolete anyway:

https://github.com/backdrop-contrib/backup_migrate/blob/af477a30f8d2bd3e5c818b79b57e0b8ff5e4ad4f/includes/destinations.db.mysql.inc#L432

At least, the comment above seems to be outdated.

Backups work fine even with that line commented out (did a quick test).

quackers8me commented 3 years ago

The Drupal module maintainer confirmed that this is obsolete code and has now removed it from the D7 module.

I seem to be unable to commit to the repository due to permission issues, so am awaiting a response to that before I can create a new release.

On Mon, May 17, 2021 at 8:16 AM indigoxela @.***> wrote:

@quackers8me https://github.com/quackers8me I had no time to dig deeper, but I suspect that old code (from D6 I guess), might be obsolete anyway:

https://github.com/backdrop-contrib/backup_migrate/blob/af477a30f8d2bd3e5c818b79b57e0b8ff5e4ad4f/includes/destinations.db.mysql.inc#L432

At least, the comment above seems to be outdated.

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/backdrop-contrib/backup_migrate/issues/63#issuecomment-842408496, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACQU5T724HGMP3USOOXIA3DTOEXLVANCNFSM447DS7CQ .

quackers8me commented 3 years ago

Fixed and release created