backdrop-contrib / brush

Brush is a command line shell and Unix scripting interface for Backdrop CMS.
GNU General Public License v3.0
2 stars 0 forks source link

sudo brush archive-dump fails with PHP Fatal error: Uncaught Error: Call to undefined function config_get() #26

Closed cptX closed 1 year ago

cptX commented 3 years ago

Hi, these are my first attempts to use brush. Is brush supposed to run with sudo? When running "sudo brush archive-backup" in the corresponding site folder I get the following error:

count(): Parameter must be an array or an object that implements Countable archive.brush.inc:96                                                                                                                                    [warning]
PHP Fatal error:  Uncaught Error: Call to undefined function config_get() in /home/myron/Downloads_no_bak/backdrop/brush/includes/brush.inc:1809
Stack trace:
#0 /home/myron/Downloads_no_bak/backdrop/brush/includes/brush.inc(1838): brush_find_tmp()
#1 /home/myron/Downloads_no_bak/backdrop/brush/commands/core/archive.brush.inc(165): brush_tempdir()
#2 /home/myron/Downloads_no_bak/backdrop/brush/includes/command.inc(131): brush_archive_dump()
#3 /home/myron/Downloads_no_bak/backdrop/brush/includes/command.inc(836): _brush_invoke_args()
#4 /home/myron/Downloads_no_bak/backdrop/brush/includes/command.inc(236): brush_command()
#5 /home/myron/Downloads_no_bak/backdrop/brush/brush.php(102): brush_dispatch()
#6 /home/myron/Downloads_no_bak/backdrop/brush/brush.php(41): brush_main()
#7 {main}
  thrown in /home/myron/Downloads_no_bak/backdrop/brush/includes/brush.inc on line 1809
Brush command terminated abnormally due to an unrecoverable error.                                                                                                                                                                 [error]
Error: Uncaught Error: Call to undefined function config_get() in /home/myron/Downloads_no_bak/backdrop/brush/includes/brush.inc:1809
Stack trace:
#0 /home/myron/Downloads_no_bak/backdrop/brush/includes/brush.inc(1838): brush_find_tmp()
#1 /home/myron/Downloads_no_bak/backdrop/brush/commands/core/archive.brush.inc(165): brush_tempdir()
#2 /home/myron/Downloads_no_bak/backdrop/brush/includes/command.inc(131): brush_archive_dump()
#3 /home/myron/Downloads_no_bak/backdrop/brush/includes/command.inc(836): _brush_invoke_args()
#4 /home/myron/Downloads_no_bak/backdrop/brush/includes/command.inc(236): brush_command()
#5 /home/myron/Downloads_no_bak/backdrop/brush/brush.php(102): brush_dispatch()
#6 /home/myron/Downloads_no_bak/backdrop/brush/brush.php(41): brush_main()
#7 {main}
  thrown in /home/myron/Downloads_no_bak/backdrop/brush/includes/brush.inc, line 1809

Is this a bug?

alanmels commented 3 years ago

Thanks for reporting. It is a bug definitely. However, we have stopped further development of this project in favor of https://github.com/backdrop-contrib/bee, so if possible please use it instead. If for any reason (for example, lack of working commands on Bee), you need to keep using Brush, then please offer PR as AltaGrade team does not use brush archive-dump command and, unfortunately, at present we do not have time to debug and fix this issue.

cptX commented 3 years ago

Thanks for the feedback. What you mean PR? Just installed Bee. Can you please explain briefly why brush was abandoned for Bee?

alanmels commented 3 years ago

https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests

alanmels commented 1 year ago

https://github.com/backdrop-contrib/brush/blob/1.x-1.x/README.md