In the last attemptMagento 2 / Adobe Commerce Installation New ThemeAfter the failure. I am full of fear of Magento 2 installation of new themes ?. In fact, the fundamental problem is that PHP major versions are released too quickly, and backward compatibility is not done well, it is easy to have a situation that directly leads to the whole site hang.
But the theme still has to be installed, so today I tried the breeze evolution installation. The official address:
https://commercemarketplace.adobe.com/swissup-breeze-evolution.html
From the release notes, it looks like Magento 2.4.6 and PHP 8.2 are supported from version 2.1.1. (Yesterday I read the news that PHP 8.4 was also released, so I’m not a fan of it at all).
Magento 2.4.6 and PHP 8.2 compatibility added.
备份
Learn from the last failure and back up your database and related directories ahead of time.
- Backup Database
- Backup directories app and pub (but after this, I think it’s recommended to make a backup of this project directory for non-programmers with no PHP composer experience. You’ll be hard pressed to get a lot of weird composer dependency errors).
mounting
Since magento is deployed using docker, go to the docker compose configuration directory:
make fpm_bin
cd magento2/
Set the adobe key to install themes from the official marketplace:
cp auth.json.sample auth.json
vim auth.json
Install the breeze evolution theme using composer:
composer require swissup/breeze-evolution
Or specify a version:
composer require swissup/breeze-evolution:2.2.0
All sorts of weird errors
And then no surprise, a surprise:
Install of swissup/module-rtl failed
[Exception]
Higher matching version 2.3.1 of swissup/theme-frontend-breeze-evolution was found in public repository packagist.org than 2.3.0 in private https://repo.magento.com. Public package might've been taken over by a malicious entity,
please investigate and update package requirement to match the version from the private repository
Reference:
https://ift.tt/S1QH7Jz
Add the no plugins parameter to fix it:
composer require swissup/breeze-evolution:2.2.0 --no-plugins
Site crashed ? Error in background
Do you think that the installation is complete because it doesn’t report errors? That’s naive!
Now it’s the site’s turn to just hang up!!!!
Warning: require(=vendor/composer/../swissup/module-breeze/registration.php): Failed to open stream: No such file or directory in =vendor/composer/autoload_real.php on line 78
Fatal error: Uncaught Error: Failed opening required 'vendor/composer/../swissup/module-breeze/registration.php'
In a panic, I was going to kill the theme via composer remove, however, it didn’t help.
Go into the vendor/swissup/module-breeze/ directory and you will see that there is indeed no registration.php file. The github project for the library does have one. I don’t know what went wrong, so I simply, backed up the directory and git cloned it again (since essentially composer is just git cloning code from different dependencies all over the place)
vendor/swissup# git clone https://github.com/breezefront/module-breeze.git
This error disappears. But it will also usher in a new crash cause, solved in the same way:
vendor/swissup# git clone https://github.com/breezefront/theme-frontend-breeze-blank.git
Updating the database
bin/magento setup:upgrade --safe-mode=1
This will allow you to see the theme in the magento backend. Once enabled, it works fine.
Reference:
https://ift.tt/v7xCniZ
What a tosser, what a waste of life.
Here’s another way the record doesn’t work, ignore it
composer require swissup/module-marketplace &&\
bin/magento setup:upgrade --safe-mode=1 &&\
bin/magento marketplace:channel:enable magento
Nothing to import.
Media files stored outside of 'Media Gallery Allowed' folders will not be available to the media gallery.
Please refer to Developer Guide for more details.
bash: : command not found
Warning: Module "gd" is already loaded in Unknown on line 0
There are no commands defined in the "marketplace:channel" namespace.
bin/magento marketplace:package:require swissup/breeze-evolution &&\
bin/magento marketplace:package:install swissup/breeze-evolution