0

I had 2.4.2 working fine and decided to update to 2.4.2.p1.

$ php composer.phar require magento/product-community-edition=2.4.2-p1 --no-update
Magento Open Source 2.4.2-p1 is trying to change the existing order of the required section.
Local order:
   [
      magento/composer-root-update-plugin,
      magento/product-community-edition
   ]
Magento Open Source 2.4.2-p1 order:
   [
      magento/product-community-edition,
      magento/composer-root-update-plugin
   ] but it will not be changed. Re-run using --use-default-magento-values or --interactive-magento-conflicts to override with the Magento order.
Updating composer.json for Magento Open Source 2.4.2-p1 ...
./composer.json has been updated

Then I thought I should do backups so did backups for --code and --DB

Then I ran $ PHP composer.phar update and it ran through a load of removing and upgrading and installing all the modules and extensions we have. All seemed fine except one patch from one extension (not sure it's important but putting it here for sake of completeness)

Gathering patches for root package.
Removing package firebear/import-export so that it can be re-installed and re-patched.
  - Removing firebear/importexport (3.6.0-alpha.1)
Loading composer repositorIn Laminas\DependencyPlugin\DependencyRewriterV2::onPrePoolCreate
Updating dependencies
Lock file operations: 3 installs, 83 updates, 2 removals
  - Removing xtento/customattributes (1.7.4)
  .....
Removing Xtento/Orderexport
Removing Xtento/Customattributes
  - Applying patches for firebear/importexport
    SUPPORT-10090.patch (SUPPORT-10090)
   Could not apply the patch! Skipping. The error was: Cannot apply patch SUPPORT-10090.patch


  [Exception]
  Cannot apply patch SUPPORT-10090 (SUPPORT-10090.patch)!


update [--with WITH] [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-install] [--no-autoloader] [--no-scripts] [--no-suggest] [--no-progress] [-w|--with-dependencies] [-W|--with-all-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] [<packages>]...

Then I ran

 rm -rf var/cache/*
$ rm -rf var/page_cache/*
$ rm -rf generated/code/*
$ php bin/magento setup:upgrade

And got

Could not open input file: bin/magento

And the whole site is gone from the front end 404 Not found. Nothing in the bin/ folder. I can't even restore the backups because that uses bin/magento too.

I went back to composer.json and changed the order of those lines from the very beginning, in case that was an issue, and ran the update again, and it didn't make any difference. What can I do at this stage?

2 Answers 2

1

It's a permission issue. I've had this before whereby the user didn't have enough permissions to create directories.

Do you still have the composer.json file to run updates - Check the main directory permissions and see about running it again after giving full write permissions and then revert once complete.

I think I ended up just copying the bin directory from another installation to get back quickly, but if you don't have the, etc directory you'll have problems with passwords if you haven't got the database hash.

This was the quickest solution I could think of

0

Thank you. I ended up unzipping the backup on the server and manually copying and pasting the bin, setup, and most of the vendor folders back in. Still not really sure what caused it but after doing this and a few more tries at updating, finally got it working.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.