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

bin/grav cli unknown CacheCommand class error #2442

Closed
nex84 opened this issue Apr 12, 2019 · 9 comments
Closed

bin/grav cli unknown CacheCommand class error #2442

nex84 opened this issue Apr 12, 2019 · 9 comments

Comments

@nex84
Copy link

nex84 commented Apr 12, 2019

Hello,

Since the 1.6.2 upgrade, the bin/grav cli doesn't work with the following error :

PHP Fatal error:  Uncaught Error: Class 'Grav\Console\Cli\CacheCommand' not found in /var/www/html/bin/grav:43
Stack trace:
#0 {main}
  thrown in /var/www/html/bin/grav on line 43

I may be wrong but it seems to be related to commit 7762f0c

@rhukster
Copy link
Member

rhukster commented Apr 12, 2019

It’s normal and a one time message. It does not effect the upgrade. So nothing to worry about.

I had changed this class name in 1.6 but it turns out it gave a much worse error for people not already on 1.6 when upgrading. I decided best to move it back to the old name as it would effect less people that way.

The functionality has not changed nor the actual command. You won’t see any message like this going forward.

@garytube
Copy link

mhh, I tried to use the bin/grav CLI tools but it fails.

bin/grav PHP Fatal error: Uncaught Error: Class 'Grav\Console\Cli\CacheCommand' not found in .../bin/grav:43 Stack trace: #0 {main} thrown in.../bin/grav on line 43

I upgraded from 1.6.0 rc4 to 1.6.2

am I missing something

@rhukster
Copy link
Member

rhukster commented Apr 12, 2019

If you scroll up I think you willl find the upgrade was successful, but cache clear was not.

SOLUTION: #2442 (comment)

@garytube
Copy link

the upgrade to 1.6.2? that worked fine..

im trying to execute bin/grav by myself to clear the cache manually - that does not work anymore

@nex84
Copy link
Author

nex84 commented Apr 12, 2019

I upgraded from 1.5.10 to 1.6.2 without any issue.
The problem is that I can't do a backup using CLI anymore (and probably any other actions using bin/grav).

For example, if I try to launch the following command (as per 1.6 documentation) : bin/grav backup 1 it fails immediatly and does nothing :

$ bin/grav backup 1
PHP Fatal error:  Uncaught Error: Class 'Grav\Console\Cli\CacheCommand' not found in /var/www/html/arcanexus.com/www/bin/grav:43
Stack trace:
#0 {main}
  thrown in /var/www/html/arcanexus.com/www/bin/grav on line 43

It happens everytime I try to launch the command, so no backups can be done.

@rhukster
Copy link
Member

Grr. Looking

@rhukster
Copy link
Member

rhukster commented Apr 12, 2019

dammit, missed that one...

on line 43 in bin\grav change it to:

new \Grav\Console\Cli\ClearCacheCommand(),

I thought I got all the references updated, but seems this one was missed for some reason. Annoying as I hate to release a new version for this one minor change, but there's really nothing else for it. I'll see if any other issue crops up today.

@nex84
Copy link
Author

nex84 commented Apr 12, 2019

I suppose that it should be easily fixed by renaming that class in bin/grav code too (line 43), but I don't know if there will be impacts.

rhukster added a commit that referenced this issue Apr 12, 2019
@rhukster rhukster added fixed and removed by design labels Apr 12, 2019
@rhukster
Copy link
Member

Fixed in 1.6.3

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

No branches or pull requests

3 participants