When I look at the Updates page of my Varbase project, it says I need new updated versions of several modules like Ace Code Editor 8.x-1.0 or Display Suite. Yet when I run "composer update", nothing gets fixed. When I run "composer outdated", I can see the old ones in red. Suggestions?

Comments

bogdog400 created an issue. See original summary.

Rajab Natshah’s picture

Thank you for reporting

Ace Code Editor is having some issues with the composer in the latest version
#3022330: composer installation fail
In Varbase Editor we are requiring the module with a wild card

"npm-asset/ace-builds": "~1.0",
"drupal/ace_editor": "~1.0",

As we are using ~1.0 so the composer is getting the working one avoiding any errors in the update or install build

Rajab Natshah’s picture

Released varbase_core 8.x-6.9
https://www.drupal.org/project/varbase_core/releases/8.x-6.9
and varbase_editor 8.x-6.3
https://www.drupal.org/project/varbase_editor/releases/8.x-6.3

We can update a number of modules at this time
But first, we need to remove the following from the project composer.json

    "drupal/image_resize_filter": "1.x-dev#c3f4b23b02005859092aaff746b9f21b794adc58",
    "drupal/login_destination": "1.x-dev#54be8b89fdc073ca40af6b9b2eeb050e0aeb7908"

And remove from vendor/vardot/varbase-updater/config/tags.json too

Then we can run
composer update

bogdog400’s picture

[See #5 below. I didn't delete the lines above.]

Thanks for the quick fix but now I'm getting this error:

The website encountered an unexpected error. Please try again later.
Error: Call to a member function setOptions() on null in login_destination_toolbar_alter() (line 87 of modules/contrib/login_destination/login_destination.module).

Here is the composer run:

Package operations: 0 installs, 17 updates, 0 removals
No patches supplied.
Gathering patches for dependencies. This might take a minute.
  - Updating drupal/ds (3.2.0 => 3.3.0): Loading from cache
  - Applying patches for drupal/ds
    https://www.drupal.org/files/issues/2019-03-03/2920868-12.patch (Issue #2920868: Fix fatal errors when we have missing layouts, on an update)

  - Updating drupal/ds_extras (3.2.0 => 3.3.0)
  - Updating drupal/varbase_core (6.8.0 => 6.9.0): Downloading (100%)
  - Updating drupal/varbase_editor (6.2.0 => 6.3.0): Downloading (100%)
Writing lock file
Generating optimized autoload files
> Varbase\composer\ScriptHandler::createRequiredFiles
> Varbase\composer\ScriptHandler::removeGitDirectories

And then I reran it perhaps creating this login_destination problem:

Removing package drupal/login_destination so that it can be re-installed and re-patched.
  - Removing drupal/login_destination (dev-1.x)
Deleting docroot/modules/contrib/login_destination - deleted
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 0 installs, 13 updates, 0 removals
Generating optimized autoload files
> Varbase\composer\ScriptHandler::createRequiredFiles
> Varbase\composer\ScriptHandler::removeGitDirectories

Finally, I used drush to update the db and clear the cache.

bogdog400’s picture

Sorry. I didn't read your text closely enough. I went back and deleted the two lines:

   "drupal/image_resize_filter": "1.x-dev#c3f4b23b02005859092aaff746b9f21b794adc58",
    "drupal/login_destination": "1.x-dev#54be8b89fdc073ca40af6b9b2eeb050e0aeb7908"

Composer fixed my mistake be reinstalling them. I couldn't find the tags.json file because there's no vendor/vardot directory in my version. But at least drupal is running again.

BTW, these three modules are listed as needing updates but composer isn't updating them.

Ace Code Editor	8.x-1.0	8.x-1.1   
Entity Browser	8.x-2.0	8.x-2.1 
Varbase Blog (Corporate Blog)	8.x-6.0	8.x-6.1 (Release notes)
mmjvb’s picture

As a user of this distribution suggest to use https://www.drupal.org/project/varbase/releases/8.x-6.4 instead. It shows whether there is an update on the right. When scrolling down it show the components and whether there is an update for it.

Don't know what this distribution suggests for updating, but according to Semantic Versioning you should be ok when sticking to the same major version. Which is why I suggest to use "composer outdated -mD" instead. It shows more relevant information to your situation. Obviously, it disregards the version constraints of your project. Use "composer update --dry-run" to find out what is going to happen before you do it for real.

When it doesn't mention the expected updates you need "composer prohibits <package>" to find out what prevents it from updating. You might need to change the requirements because of their version constraints. Use "composer require <package:version constraint> --no-update" to change composer.json for each. Use "composer update" or whatever you are told by the release notes and/or maintainer of this distribution.

Rajab Natshah’s picture

Released Varbase 8.x-6.6

https://www.drupal.org/project/varbase/releases/8.x-6.6

Cleaned up all hash commits so that vardot/varbase-project template and the composer.json looks clean.

https://github.com/Vardot/varbase-project/blob/8.6.6/composer.json

The update should work without issues, But we have to remove all old Hash commits!!!

bogdog400’s picture

Thanks for this. This cleaned up things quite a bit.

I'm still getting update messages for these two modules but I'm guessing that's because there are incompatibilities, right?

Ace Code Editor	8.x-1.0	8.x-1.1   
Entity Browser	8.x-2.0	8.x-2.1 
Rajab Natshah’s picture

Status: Active » Fixed
Rajab Natshah’s picture

Status: Fixed » Closed (fixed)