Hi getting the following error on update from 8.4.13 to 8.4.14 and for new installation of 8.4.14 during composer require command

- Installing drupal/core (8.4.4): Loading from cache
- Applying patches for drupal/core
    https://www.drupal.org/files/issues/1356276-408--8.4.4.patch (Issue #1356276: Allow profiles to provide a base_parent profile and load them in the correct order)
   Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/1356276-408--8.4.4.patch

                                                                                                                                  
  [Exception]                                                                                                                     
  Cannot apply patch Issue #1356276: Allow profiles to provide a base_parent profile and load them in the correct order (https:/  
  /www.drupal.org/files/issues/1356276-408--8.4.4.patch)!    

Any ideas?

regards,

Comments

mellowtothemax created an issue. See original summary.

Rajab Natshah’s picture

Please make sure that you have updated your project composer.json
with the latest changes in the following link:
https://github.com/Vardot/varbase-project/blob/8.4.14/composer.json

Have you followed the Varbase Update steps?
https://github.com/Vardot/varbase/blob/8.x-4.x/UPDATE.md

When we delete the "vendor" folder
And we delete the "composer.lock" file
And we run the "composer require vardot/varbase:8.4.14" command

Varbase Procedures to the varbase base code. not in any varbase-project project builders.

Given that we are at the root folder for varbase project, not the docroot
And we make sure that the current "Varbase-project" composer.json file and
files are the latest
When we delete the "vendor" folder
And we delete the "composer.lock" file
And we run the "composer require vardot/varbase:8.4.14" command
And wait for composer to finish work
Then we should not see any issues in the terminal
And we should see "Writing lock file" in the terminal
And we should see "Generating autoload files" in the terminal
When the composer finishes work with no errors
Then we will be ready to update the active config and database.

We could do this in the other way:

Given that we updated our project composer.json with the latest changes in the following link: https://github.com/Vardot/varbase-project/blob/8.4.14/composer.json and keep all your extra modules or libraries.
When we delete the "vendor" folder
And we delete the "composer.lock" file
And we run the "composer update" command

After that:

Updating the active config and database from Varbase 8.4.13 to Varbase 8.4.14

Given that we are in the docroot of the current Varbase project
And all files are updated using (copy and past) or (composer require/update
When we run drush "updb" or go to "/update.php"
Then we should see the steps of updates.
When we run drush "updb" or go to "/update.php" again
Then we will have the site update with the new Varbase 8.4.14 version
When we go to "/admin/config/development/features"
Then we should see "Changed"
When we follow with each feature to import new changes.

Then we will have the Varbase site updated to the latest version.

mellowtothemax’s picture

Thanks for the reply.

Yes, I did follow the instructions correctly.

Please note that this also occurs for a new installations of 8.4.14.

This is the full output

composer require vardot/varbase:8.4.14
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 192 installs, 0 updates, 0 removals
  - Installing drupal/drupal-library-installer-plugin (0.3): Downloading (100%)         
  - Installing cweagans/composer-patches (1.6.4): Downloading (100%)         
No patches supplied.
Gathering patches for dependencies. This might take a minute.
  - Installing composer/installers (v1.4.0): Downloading (100%)         
  - Installing composer/semver (1.4.2): Downloading (100%)         
  - Installing drupal-composer/drupal-scaffold (2.4.0): Downloading (100%)         
  - Installing webflo/drupal-finder (1.0.0): Downloading (100%)         
  - Installing webmozart/assert (1.2.0): Downloading (100%)         
  - Installing webmozart/path-util (2.3.0): Downloading (100%)         
  - Installing vardot/ace (1.2.8.1): Downloading (100%)         
  - Installing vardot/slick (1.6.0.1): Downloading (100%)         
  - Installing vardot/blazy (1.8.2.1): Downloading (100%)         
  - Installing vardot/dropzone (4.3.0.1): Downloading (100%)         
  - Installing sunra/php-simple-html-dom-parser (v1.5.2): Downloading (100%)         
  - Installing ezyang/htmlpurifier (v4.9.3): Downloading (100%)         
  - Installing caxy/php-htmldiff (v0.1.6): Downloading (100%)         
  - Installing mkalkbrenner/php-htmldiff-advanced (0.0.8): Downloading (100%)         
  - Installing zendframework/zend-stdlib (3.1.0): Downloading (100%)         
  - Installing zendframework/zend-escaper (2.5.2): Downloading (100%)         
  - Installing zendframework/zend-feed (2.9.0): Downloading (100%)         
  - Installing psr/http-message (1.0.1): Downloading (100%)         
  - Installing zendframework/zend-diactoros (1.7.0): Downloading (100%)         
  - Installing twig/twig (v1.35.0): Downloading (100%)         
  - Installing symfony/yaml (v3.2.14): Downloading (100%)         
  - Installing symfony/polyfill-mbstring (v1.6.0): Downloading (100%)         
  - Installing symfony/translation (v3.2.14): Downloading (100%)         
  - Installing symfony/validator (v3.2.14): Downloading (100%)         
  - Installing symfony/serializer (v3.2.14): Downloading (100%)         
  - Installing symfony/routing (v3.2.14): Downloading (100%)         
  - Installing paragonie/random_compat (v2.0.11): Downloading (100%)         
  - Installing symfony/http-foundation (v3.2.14): Downloading (100%)         
  - Installing symfony/psr-http-message-bridge (v1.0.2): Downloading (100%)         
  - Installing symfony/process (v3.2.14): Downloading (100%)         
  - Installing symfony/polyfill-iconv (v1.6.0): Downloading (100%)         
  - Installing symfony/event-dispatcher (v3.2.14): Downloading (100%)         
  - Installing psr/log (1.0.2): Downloading (100%)         
  - Installing symfony/debug (v3.4.3): Downloading (100%)         
  - Installing symfony/http-kernel (v3.2.14): Downloading (100%)         
  - Installing symfony/dependency-injection (v3.2.14): Downloading (100%)         
  - Installing symfony/console (v3.2.14): Downloading (100%)         
  - Installing symfony/class-loader (v3.2.14): Downloading (100%)         
  - Installing symfony-cmf/routing (1.4.1): Downloading (100%)         
  - Installing stack/builder (v1.0.5): Downloading (100%)         
  - Installing masterminds/html5 (2.3.0): Downloading (100%)         
  - Installing guzzlehttp/psr7 (1.4.2): Downloading (100%)         
  - Installing guzzlehttp/promises (v1.3.1): Downloading (100%)         
  - Installing guzzlehttp/guzzle (6.3.0): Downloading (100%)         
  - Installing doctrine/lexer (v1.0.1): Downloading (100%)         
  - Installing egulias/email-validator (1.2.14): Downloading (100%)         
  - Installing easyrdf/easyrdf (0.9.1): Downloading (100%)         
  - Installing doctrine/inflector (v1.2.0): Downloading (100%)         
  - Installing doctrine/collections (v1.4.0): Downloading (100%)         
  - Installing doctrine/cache (v1.6.2): Downloading (100%)         
  - Installing doctrine/annotations (v1.4.0): Downloading (100%)         
  - Installing doctrine/common (v2.7.3): Downloading (100%)         
  - Installing asm89/stack-cors (1.2.0): Downloading (100%)         
  - Installing drupal/core (8.4.4): Downloading (100%)         
  - Applying patches for drupal/core
    https://www.drupal.org/files/issues/1356276-408--8.4.4.patch (Issue #1356276: Allow profiles to provide a base_parent profile and load them in the correct order)
   Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/1356276-408--8.4.4.patch

                                                                                                                                  
  [Exception]                                                                                                                     
  Cannot apply patch Issue #1356276: Allow profiles to provide a base_parent profile and load them in the correct order (https:/  
  /www.drupal.org/files/issues/1356276-408--8.4.4.patch)!                                                                         
                                                                                                                                  

require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [<packages>]...

regards,

Rajab Natshah’s picture

I think you had this issue before:
#2931026: Cannot update to 8.4.13

delete the "vendor" folder
delete the "composer.lock" file
and your composer.json should follow:

{
  "name": "vardot/varbase-project",
  "description": "Project template for Varbase distribution.",
  "type": "project",
  "license": "GPL-2.0+",
  "authors": [
    {
      "name": "Vardot",
      "homepage": "https://github.com/vardot",
      "role": "Maintainer"
    }
  ],
  "support": {
    "issues": "http://drupal.org/project/issues/varbase",
    "source": "http://cgit.drupalcode.org/varbase"
  },
  "repositories": [
    {
      "type": "composer",
      "url": "https://packages.drupal.org/8"
    }
  ],
  "require": {
    "composer/installers": "1.4.0",
    "cweagans/composer-patches": "1.6.4",
    "drupal-composer/drupal-scaffold": "2.4.0",
    "drupal/drupal-library-installer-plugin": "0.3",
    "webflo/drupal-finder": "1.0",
    "webmozart/path-util": "2.3",
    "vardot/varbase": "8.4.14",
    "drupal/views_bootstrap": "3.x-dev#ec4e7872315db6a7287014b029c3167962647588",
    "drupal/extlink": "1.x-dev#8a773a6c5519ccb167e18cc39d68551b30b0e4b3",
    "drupal/image_resize_filter": "1.x-dev#c3f4b23b02005859092aaff746b9f21b794adc58",
    "drupal/entity_clone": "1.x-dev#9265e359bd31bda693dac9ad84ad52fe63531488",
    "drupal/pathologic": "1.x-dev#4f9f3fdcf1e0b224c4d8650e383a769f40abf9bf",
    "drupal/tour_ui": "1.x-dev#5cf793c071aeddea0ecd20d80b541606bfe2aff1",
    "drupal/tour_builder": "1.x-dev#d70e898949b7ec4095efb391a0dbec56d0117558",
    "drupal/l10n_client": "1.x-dev#9bf8d597732870bdca301512c71b6e5d74d48db2",
    "drupal/node_edit_protection": "1.x-dev#902339c08222f838030c07aaea23bdc51ababebd",
    "drupal/security_review": "1.x-dev#35ebae445bb260e961e47c4c58efe7c50c228999",
    "drupal/menu_position": "1.x-dev#d134276b4bbd08b3c9678943d0225fbef7dd05b5",
    "drupal/mail_edit": "1.x-dev#bcd0041830d8581b36e6211f0c8eabd8caf9652b",
    "drupal/libraries": "3.x-dev#061ead081c92a6209b09eaf23b4e3103f360946e",
    "drupal/google_analytics_reports": "3.x-dev#2b6bb8efbc7f61ce3c1225638075aa6037b8db44",
    "drupal/login_destination": "1.x-dev#54be8b89fdc073ca40af6b9b2eeb050e0aeb7908",
    "drupal/betterlogin": "1.x-dev#f7cf1c5c9ec5e80c6ac0ef04ed605e25495232cd"
  },
  "config": {
    "bin-dir": "bin/",
    "secure-http": false,
    "optimize-autoloader": true
  },
  "scripts": {
    "drupal-scaffold": "DrupalComposer\\DrupalScaffold\\Plugin::scaffold",
    "post-install-cmd": [
      "Varbase\\composer\\ScriptHandler::createRequiredFiles",
      "Varbase\\composer\\ScriptHandler::removeGitDirectories",
      "@composer drupal-scaffold"
    ],
    "post-update-cmd": [
      "Varbase\\composer\\ScriptHandler::createRequiredFiles",
      "Varbase\\composer\\ScriptHandler::removeGitDirectories"
    ],
    "post-drupal-scaffold-cmd": ["Varbase\\composer\\ScriptHandler::postDrupalScaffoldProcedure"]
  },
  "minimum-stability": "dev",
  "prefer-stable": true,
  "conflict": {
    "drupal/drupal": "*"
  },
  "extra": {
    "branch-alias": {
      "dev-8.x-4.x": "8.4.x-dev"
    },
    "installer-paths": {
      "docroot/core": ["drupal/core"],
      "docroot/profiles/{$name}": ["type:drupal-profile"],
      "docroot/modules/contrib/{$name}": ["type:drupal-module"],
      "docroot/themes/contrib/{$name}": ["type:drupal-theme"],
      "docroot/libraries/{$name}": ["type:drupal-library"],
      "docroot/modules/custom/{$name}": ["type:drupal-custom-module"],
      "docroot/themes/custom/{$name}": ["type:drupal-custom-theme"],
      "drush/contrib/{$name}": ["type:drupal-drush"]
    },
    "enable-patching": true,
    "composer-exit-on-patch-failure": true
  }
}

Please check your php, composer and git versions

php --version

rajab@vardot-dev:~$ php --version
PHP 7.1.11-0ubuntu0.17.10.1 (cli) (built: Nov  1 2017 16:30:52) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.1.11-0ubuntu0.17.10.1, Copyright (c) 1999-2017, by Zend Technologies

composer --version

rajab@vardot-dev:~$ composer --version
Composer version 1.6.2 2018-01-05 15:28:41

to update composer
$ composer self-update

git --version

rajab@vardot-dev:~$ git --version
git version 2.15.1
mellowtothemax’s picture

Ok, so the issue was that my server runs cloudlinux, this adds users to cagefs that causes the problem with composer (as it is currently setup, it will not use system composer that has been updated so composer remains on an old version for cagefs users.)

Removing my user from cagefs allows the user to use the system composer (updated version) and the command to update finishes correctly.

Thank you for the feedback.

I think now I know why there have been issues in past updates too.

regards,

Rajab Natshah’s picture

Assigned: Unassigned » Mohammed J. Razem
Status: Active » Needs review

Good to know that :)
This issue will be archived in case other Developers face this issue.

Rajab Natshah’s picture

Assigned: Mohammed J. Razem » Unassigned
Status: Needs review » Closed (works as designed)