Closed (outdated)
Project:
Acquia Content Hub
Version:
8.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Feb 2017 at 19:01 UTC
Updated:
27 Mar 2018 at 04:43 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
droath commentedComment #3
it-cruPatch looks fine. But how we can manage to update a site with installed Acquia Contenthub module?
After module update I have no chance to install missing diff module. In CI deploy process you have sometimes no chance to do a two step update path.
Fatal Error after acquia_contenthub module update:
Raised to critical because a module update could break your complete site!
Comment #4
webflo commentedComment #5
it-cruMerge both patches
Comment #6
scor commentedDoes this happen when installing the module the first time on a new site, or does this only happen when upgrading from 1.3 or below to 1.4 or above? (1.4 is when the diff module became a dependency).
Comment #7
webflo commentedIt happens in the update path from 1.3 or below to 1.4
Comment #8
scor commentedAm I the only one to get confused that we have to duplicate the dependency on diff in the composer.json file, when we have it already in the .info.yml file? As far as I can tell, this is only required for sites upgrading to 1.4 or above, but not for new sites installing content hub for the first time. I'm happy to commit this patch, I'm just trying to understand why this is required, and also for future reference if we ever need to add a new dependency again later on.
Edit: https://www.drupal.org/docs/8/creating-custom-modules/let-drupal-8-know-... indicates that the dependencies in your .info.yml file are "A list of other modules your module depends on.", but nowhere does it say that they also have to go into composer.json. Additionally, https://www.drupal.org/docs/8/creating-custom-modules/add-a-composerjson... does not mention anything about .info.yml, and says that composer.json is where "You may optionally define external dependencies for your module in composer.json." So the way I read both these pages is that .info.yml is for d.o module dependencies, and composer.json is for external composer dependencies. As a result, I see the diff module as being listed in the .info.yml file only because it's a Drupal module.
Comment #9
webflo commentedThe change in the composer.json is not required at all. The composer endpoints from drupal.org take care of it. Composer should add diff as dependency automatically if you update from 1.3 to 1.4, because it is as unmet dependency. http://packages.drupal.org/8 shows the dependency on diff already. You can verify it via "composer info --all drupal/acquia_contenthub 1.4.0".
The patch in #4 is required because diff is a new dependency of acquia_contenthub and has been introduced after the initial installation.
Comment #10
scor commented@webflo I've tried to test your patch in #4, that is just the update function without the composer change. I've confirmed diff is added and downloaded when running
composer require drupal/acquia_contenthub:1.4.However I'm not able to upgrade from 1.3 to 1.4 seamlessly when applying the patch for the update function. Here are the steps I took:
In the above I ran the same code manually, and it failed. If I apply the patch after running the composer command, and then run drush updb, I get the same error. @webflo what steps did you take for your update function to actually work?
Comment #11
grasmash commentedFYI, I resolved this issue on my own installation by downgrading to acquia_contenthub 1.3, clearing caches, manually installing the diff module, then upgrading to 1.5.
Comment #12
webflo commented@scor "drush ev" does a full Drupal bootstrap. It should work if you apply the patch and run "drush updb".
Comment #13
scor commented@webflo then I don't know why it's not working for me on a brand new site:
Comment #14
drupalninja99 commentedI was able to install the diff module through the UI which gave me an error but still "worked". That let me proceed with other steps (cim/updb). Not ideal but it did work. I think for now the workaround is to enable the diff module prior to upgrade.
Comment #15
scor commentedThis is outdated and I would not expect people to still have issues with this.