Closed fronbow closed 1 year ago
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
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
Thanks for the feedback @fronbow I will open an issue for it and remove it from our core 🙏
PR Submitted #5248
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
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
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
Hey @pxpm , Thanks for your response.
Here I show you the outputs of the commands you requested:
php artisan backpack:version
8.3.6
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
11.3.1.0
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:
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="hello@example.com" 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
Bug report
What I did
Type
php artisan backpack:publish-assets
What I expected to happen
Any updated assets to be published
What happened
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