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

Grav 1.7 Installation fails because of undefined method #3523

Closed
karltlf opened this issue Jan 30, 2022 · 2 comments
Closed

Grav 1.7 Installation fails because of undefined method #3523

karltlf opened this issue Jan 30, 2022 · 2 comments
Assignees

Comments

@karltlf
Copy link

karltlf commented Jan 30, 2022

Cross posted to https://stackoverflow.com/questions/70916622/grav-1-7-installation-fails-bc-of-call-to-undefined-method

(sorry, I didn't know I wasn't supposed to cross post immediately)

Hey, I am not sure if this is the place to ask for help, so tell me if it's not (and maybe where to ask).

I am trying to update to the latest Grav release 1.7.29 from (originally 1.6.24, while troubleshooting today updated to) 1.6.31 (using direct-install.

I tried updating with self-upgrade and direct-install <latestVersionURL>.
But, while trying to install, it gives me the following error:

Installing upgrade... [30-Jan-2022 17:04:37 Europe/Cityxy] PHP Fatal error: Uncaught Error: Call to undefined method Grav\Common\Utils::basename() in /var/www/virtual/name/html/tmp/Grav-61f6b713f0bb9/zip/grav-update/system/src/Grav/Installer/VersionUpdate.php:29

Stack trace:

#0 /var/www/virtual/name/html/tmp/Grav-61f6b713f0bb9/zip/grav-update/system/src/Grav/Installer/VersionUpdater.php(126): Grav\Installer\VersionUpdate->__construct('/var/www/virtua...', Object(Grav\Installer\VersionUpdater))
#1 /var/www/virtual/name/html/tmp/Grav-61f6b713f0bb9/zip/grav-update/system/src/Grav/Installer/VersionUpdater.php(38): Grav\Installer\VersionUpdater->loadUpdates()
#2 /var/www/virtual/name/html/tmp/Grav-61f6b713f0bb9/zip/grav-update/system/src/Grav/Installer/Install.php(239): Grav\Installer\VersionUpdater->__construct('core/grav', '/var/www/virtua...', '1.7.29', Object(Grav\Installer\Versions))
#3 /var/www/virtual/name/html/tmp/Grav-61f6b713f0bb9/zip/grav-update/system/src/Grav/Installer/Install.php(184): Grav\Installer\Install->prepare()
#4 /var/www/virtual/name/html/system/src/Gra in /var/www/virtual/eduref/html/tmp/Grav-61f6b713f0bb9/zip/grav-update/system/src/Grav/Installer/VersionUpdate.php on line 29

From my understanding the files between versions have been changed, and looking at the Grav documentation, the called method basenames() is now in Grav/Common/URI, not in Grav/Common/Utils.

So I assume I located the problem, but have no idea on how to fix it. Since I am not very well versed on this whole topic of managing websites (never set up the site, only maintaining it), I would really appreciate a safe answer on how to update Grav to the newest version which doesn't risk me destroying the functioning of the website.
Thank you for helping! :)

Tried with:
PHP: 7.3 & 7.4
Grav: 1.6.24 & 1.6.31
Admin: 1.9.10
Host: Uberspace
via SSH

@mahagr
Copy link
Member

mahagr commented Jan 31, 2022

@eurokrl Thanks for reporting this -- I didn't remember that we had improved the installation process in 1.7 not to have this issue.

@karltlf
Copy link
Author

karltlf commented Jan 31, 2022

Thanks for the quick reponse @mahagr :)

still having (almost) the same issue, this time it's not the Grav-61f6b713f0bb9 folder, but Grav-61f81d0d41083.
Tried again w/ same PHP versions, old & fresh install of Grav 1.6.31 and selfupgrade & direct-install <LatestVersionURL>.

Installing package... [31-Jan-2022 18:31:57 Europe/city] PHP Fatal error: Uncaught Error: Call to undefined method Grav\Common\Utils::basename() in /var/www/virtual/name/html/tmp/Grav-61f81d0d41083/grav-update/system/src/Grav/Installer/VersionUpdate.php:29
Stack trace:
#0 /var/www/virtual/name/html/tmp/Grav-61f81d0d41083/grav-update/system/src/Grav/Installer/VersionUpdater.php(126): Grav\Installer\VersionUpdate->__construct('/var/www/virtua...', Object(Grav\Installer\VersionUpdater))
#1 /var/www/virtual/name/html/tmp/Grav-61f81d0d41083/grav-update/system/src/Grav/Installer/VersionUpdater.php(38): Grav\Installer\VersionUpdater->loadUpdates()
#2 /var/www/virtual/name/html/tmp/Grav-61f81d0d41083/grav-update/system/src/Grav/Installer/Install.php(239): Grav\Installer\VersionUpdater->__construct('core/grav', '/var/www/virtua...', '1.7.29', Object(Grav\Installer\Versions))
#3 /var/www/virtual/name/html/tmp/Grav-61f81d0d41083/grav-update/system/src/Grav/Installer/Install.php(184): Grav\Installer\Install->prepare()
#4 /var/www/virtual/name/html/system/src/Grav/Console/Gpm/Direct in /var/www/virtual/name/html/tmp/Grav-61f81d0d41083/grav-update/system/src/Grav/Installer/VersionUpdate.php on line 29

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

2 participants