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

Remove backpack:publish-assets command from v6 #5246

Closed
fronbow opened this issue Jul 31, 2023 · 8 comments
Closed

Remove backpack:publish-assets command from v6 #5246

fronbow opened this issue Jul 31, 2023 · 8 comments
Assignees

Comments

@fronbow
Copy link

fronbow commented Jul 31, 2023

Bug report

What I did

Type php artisan backpack:publish-assets

What I expected to happen

Any updated assets to be published

What happened

php artisan backpack:publish-assets

   INFO  Publishing [public] assets.  


   ERROR  Can't locate path: <vendor/backpack/crud/src/public>.  



Is it a bug in the latest version of Backpack?

Yes

After I run composer update backpack/crud the bug... is it still there?

Yes

Backpack, Laravel, PHP, DB version

When I run php artisan backpack:version the output is:

PHP VERSION:

PHP 8.1.12-1ubuntu4.2 (cli) (built: Jun 28 2023 13:56:12) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.12, Copyright (c) Zend Technologies
with Zend OPcache v8.1.12-1ubuntu4.2, Copyright (c), by Zend Technologies
with Xdebug v3.2.0, Copyright (c) 2002-2022, by Derick Rethans

LARAVEL VERSION:

10.16.1.0

BACKPACK PACKAGE VERSIONS:

backpack/basset: 1.0.2
backpack/crud: 6.1.1
backpack/generators: v4.0.2
backpack/logmanager: v5.0.0
backpack/permissionmanager: 7.0.0
backpack/pro: 2.0.9
backpack/theme-coreuiv4: 1.0.5
backpack/theme-tabler: 1.0.6

@fronbow fronbow added the triage label Jul 31, 2023
@pxpm
Copy link
Contributor

pxpm commented Jul 31, 2023

Hello @fronbow

Backpack does not publish any assets anymore. All the assets we use are from CDN, and then internalized using the backpack/basset package.

Did you see this command mentioned in v6 docs somewhere ? Can you point me where you found it so I can remove it ?

What are you trying to achieve by publishing Backpack files ?

Going to close as there is no bug here AFAIK. Please feel free to continue the conversation, and we can re-open if needed.

Cheers

@pxpm pxpm closed this as completed Jul 31, 2023
@fronbow
Copy link
Author

fronbow commented Jul 31, 2023

Cheers @pxpm , the command was in my composer.json, and it's also still a command in the repo so probably just needs removing from the artisan console commands or rather than doing anything, just echo a message to the developer.

Cheers

@pxpm
Copy link
Contributor

pxpm commented Jul 31, 2023

Thanks for the feedback @fronbow I will open an issue for it and remove it from our core 🙏

@pxpm pxpm reopened this Jul 31, 2023
@pxpm pxpm changed the title [Bug] backpack:publish-assets fails Remove backpack:publish-assets command from v6 Jul 31, 2023
@karandatwani92
Copy link
Contributor

PR Submitted #5248

@karandatwani92 karandatwani92 assigned pxpm and unassigned karandatwani92 Aug 1, 2023
@pxpm
Copy link
Contributor

pxpm commented Aug 1, 2023

PR's merged to remove mentions from docs and from code.

Thanks again @fronbow we will tag a new version shortly with a few more changes .

Cheers

@pxpm pxpm closed this as completed Aug 1, 2023
@AlonMoshe
Copy link

I came across the same error message when moving my project from development to production.

I actually can't even see the login page from backpack. It is as if backpack was not installed at all. I tried:

  1. php artisan vendor:publish
  2. chose option: public

And then I got the message.

I'd like to know how I can make backpack to work in production.

Thanks

@pxpm
Copy link
Contributor

pxpm commented Apr 14, 2024

Hey @AlonMoshe , hey there.

Can you please open a new issue for your problem, and give us some details about your environment ? php artisan backpack:version would help. Also doing a basset:check may highlight the error and give you a solution.

In Backpack v6 you don't need to publish any files, as there are no files to publish.

Everything is loaded from CDN, you can internalize those assets on your application by doing php artisan basset:cache. Note that if you are doing it locally you need to force BASSET_DEV_MODE=false in your .env. Otherwise when app environment is local that variable is always true.

Cheers

@AlonMoshe
Copy link

AlonMoshe commented Apr 14, 2024

Hey @pxpm , Thanks for your response.

Here I show you the outputs of the commands you requested:

php artisan backpack:version

PHP VERSION:

8.3.6

PHP EXTENSIONS:

Core, date, libxml, openssl, pcre, zlib, filter, hash, json, pcntl, random, readline, Reflection, SPL, session, standard, sockets, bz2, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, gettext, iconv, exif, mysqlnd, PDO, Phar, SimpleXML, sodium, sqlite3, tokenizer, xml, xmlwriter, xsl, mcrypt, mysqli, pdo_mysql, pdo_sqlite, xmlreader, zip, Zend OPcache

LARAVEL VERSION:

11.3.1.0

BACKPACK PACKAGE VERSIONS:

backpack/basset: 1.3.1
backpack/crud: 6.7.6
backpack/generators: v4.0.5
backpack/theme-tabler: 1.2.8

php artisan basset:cache

Looking for bassets under the following directories:

  • resources/views (2 blade files)
  • vendor/backpack/crud/src/resources/views (139 blade files)
  • vendor/backpack/theme-tabler/resources/views (69 blade files)

Found 55 bassets in 210 blade files. Caching:
Done in 0.02s

php artisan basset:check

INFO Checking Backpack Basset installation.

Initializing basset check ................................................................................................................... DONE
Checking cache storage ...................................................................................................................... DONE
Fetching a basset ........................................................................................................................... DONE
I have also added BASSET_DEV_MODE=false in the .env file.

The "relevant" things in the .env file are these:

.env

APP_NAME=teacherbook
APP_ENV=production
APP_KEY=base64:JoC6TcvI19qBzjYoJ+95/SeMhArwhPoxaXOYs7TZzYc=
APP_DEBUG=false
APP_TIMEZONE=UTC
APP_URL=https://www.myurl.com

APP_LOCALE=en
APP_FALLBACK_LOCALE=en
APP_FAKER_LOCALE=en_US

APP_MAINTENANCE_DRIVER=file
APP_MAINTENANCE_STORE=database

BCRYPT_ROUNDS=12

LOG_CHANNEL=stack
LOG_STACK=single
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=**************
DB_USERNAME=root
DB_PASSWORD=**************

SESSION_DRIVER=database
SESSION_LIFETIME=120
SESSION_ENCRYPT=false
SESSION_PATH=/
SESSION_DOMAIN=null

BROADCAST_CONNECTION=log
FILESYSTEM_DISK=local
QUEUE_CONNECTION=database

CACHE_STORE=database
CACHE_PREFIX=

MEMCACHED_HOST=127.0.0.1

REDIS_CLIENT=phpredis
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_MAILER=log
MAIL_HOST=127.0.0.1
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS="[email protected]"
MAIL_FROM_NAME="${APP_NAME}"

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false

VITE_APP_NAME="${APP_NAME}"

BASSET_DEV_MODE=false

When I browse to the app_url I see the Laravel screen, but when I try app_url/admin, I get file not found from the server

Once again, many thanks for the help

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

No branches or pull requests

4 participants