sage-woocommerce icon indicating copy to clipboard operation
sage-woocommerce copied to clipboard

wp acorn vendor:publish tag returns "call to undefined function base_path()"

Open eduardoarandah opened this issue 2 years ago • 4 comments

I'm getting this on a fresh sage10 template

wp acorn vendor:publish --tag="WooCommerce Templates"

In VendorPublishCommand.php line 277:

  Call to undefined function Illuminate\Foundation\Console\base_path()

this one works:

wp acorn vendor:publish

Which provider or tag's files would you like to publish?:
  [0] Publish files from all providers and tags listed below
  [1] Provider: Genero\Sage\WooCommerce\WooCommerceServiceProvider
  [2] Tag: WooCommerce Template Hook Overrides
  [3] Tag: WooCommerce Templates

sage version: 10

commit 982ab458bbaa34ccd471c36446ff1e23674a1b2c
Author: Ben Word <[email protected]>
Date:   Thu Jul 1 12:16:45 2021 -0600

    Update sponsors [ci skip]

Other strange stuff happenning in console:

➜  wp core version
5.8
➜  wp plugin list

In Plugin_Command.php line 662:

  Trying to access array offset on value of type null


➜  wp theme list

In Theme_Command.php line 472:

  Trying to access array offset on value of type null


➜  wp option get home
http://mysite.localhost

what other information can I collect for this issue?

eduardoarandah avatar Jul 29 '21 22:07 eduardoarandah

These two issues are solved by upgrading to wp-cli 2.5.0 (from 2.4.0)

In Plugin_Command.php
Trying to access array offset on value of type null
  • wp plugin list
  • wp theme list

related:

https://github.com/wp-cli/wp-cli/issues/5422

eduardoarandah avatar Jul 29 '21 23:07 eduardoarandah

Call to undefined function Illuminate\Foundation\Console\base_path()

Seems to be an upstream issue in roots/acorn.

oxyc avatar Jul 30 '21 13:07 oxyc

See https://github.com/roots/acorn/issues/115

tombroucke avatar Aug 17 '21 15:08 tombroucke

Thanks for reporting it upstream and linking it @tombroucke. I'll leave this issue open until acorn/next is released since it's currently still a documentation issue in the README of this project.

oxyc avatar Aug 17 '21 16:08 oxyc