apigee / apigee-devportal-kickstart-drupal

A fast demo and starting point for Apigee Developer Portals for Drupal
https://www.drupal.org/project/apigee_devportal_kickstart
GNU General Public License v2.0
26 stars 34 forks source link

apigee_devportal_kickstart_update_9002 failing trying to uninstall seven theme(d10 compatible) as some other module has it as a dependency. #684

Closed sindhuputti closed 2 months ago

sindhuputti commented 3 months ago

Description

As a part of D9 to D10 Upgarde, Trying to run db update is failing with error - unable to uninstall "seven"

Steps to Reproduce

Install D10 compatible seven theme and make it us a dependent for any other custom theme. Run drush updb

Actual Behavior

"apigee_devportal_kickstart_update_9002", failing with error - unable to uninstall "seven"

Expected Behavior

Bypass uninstalling the theme if it is bieng used by other module and is d10 compatible

Version Info

This can be the version you can see on admin/modules in Drupal or the output of this command: composer show. Add Drupal core and other version information if needed.

apigee/apigee-client-php 3.0.5
apigee/apigee-mock-client-php 1.1.2
apigee/apigee_devportal_kickstart 2.1.6
drupal/core 10.2.4
drupal/core-composer-scaffold 10.2.4
drupal/core-project-message 10.2.4
drupal/core-recommended 10.2.4
drupal/apigee_api_catalog 3.0.5 drupal/apigee_edge 3.0.6

kedarkhaire commented 3 months ago

Hi @sindhuputti Thanks for sharing the details with us.

I would like to know few more details to check the issue on my end. Please share the versions of Drupal 9 & Apigee Devportal kickstart before you updated Drupal core to it's latest version ?

Ideally, in major version migration, we first update the Drupal 9 to its latest version i.e. if we are at D9.3/9.4 then we first migrate to D9.5 latest version and then we run the update.php where the above stated update runs and the dependency of seven is removed. Post this Drupal 9.5.x latest updates, we are good to migrate to D10 migration. I think you might have missed this step. Can you please check this again with the above step ?

Currently our modules are not compatible for Drupal 10.2. We are working on it. Can you also prefer to choose Drupal 10.1 latest version for better experience.

Thanks!

sindhuputti commented 3 months ago

Hi Kedar,

The above provided list is after the composer upgrade to d10. But database update failed.

I followed the documentation and used upgrade status for site preparation to d10. As a part of it, I updated the site to Drupal 9.5.7.

Please Note: The composer Upgrade to D10 is good, But I encountered error while running database updates in the last step of migration to D10. The database update failed to uninstall the seven theme in this function apigee_devportal_kickstart_update_9002

If you look into the code in "apigee_devportal_kickstart_update_9002" function, it doesn't check to validate if "seven/bartik" theme is already d10 compatible or is in use by any other modules before trying to uninstall it.

Before upgrade versions:

drupal/core 9.5.7 drupal/core-composer-scaffold 9.5.7 drupal/core-recommended 9.5.7 apigee/apigee_devportal_kickstart 1.25.0

kedarkhaire commented 3 months ago

Hi @sindhuputti

When you are at Drupal 9.5.7 version, I recommend to run the updates here. So that any pending update related to Drupal 9 is resolved over there only.

So can you please run the updates before migrating to Drupal 10. That will solve the issue and wont give any issue in Drupal 10.1 migration.

Thanks!

sindhuputti commented 3 months ago

If I run database update prior-to migration, then I don't have to run db updates after migration to d10?.

kedarkhaire commented 3 months ago

Hi @sindhuputti

Whenever we update Drupal core in any minor or major version, it is recommended to run the db updates. So in Drupal 9.5.7, you need to run the db updates also post updating core to drupal 10.1 also you need to run db updates.

Thanks!

sindhuputti commented 3 months ago

I did the database update before and after the major version update, the issue still appears. So, are you planning to work on the fix?

kedarkhaire commented 3 months ago

Hi @sindhuputti

That is strange that the update apigee_devportal_kickstart_update_9002 still triggers in D10 migration though it was triggered earlier in Drupal 9.5.7 db updates.

I checked in my setup, I did not came with this scenario. The update uninstalls the seven theme as it is deprecated in Drupal 10, so we have added that to avoid further issue related to the deprecation. Normally, this should be done in Drupal 9 instance, when we run the database updates, this update run and then it wont trigger again.

Well a quick solution for you would be try installing seven theme before you run update on Drupal 10.1 to avoid the dependency error. composer require 'drupal/seven:^1.0'

Once you execute the above command, you can run the DB update successfully.

Do let us know, if it works for you.

Thanks!

bhanu951 commented 3 months ago

@sindhuputti It is already reported in https://github.com/apigee/apigee-devportal-kickstart-drupal/issues/669 and fixed in https://github.com/apigee/apigee-devportal-kickstart-drupal/pull/670 . Try to get latest 3.x version of Apigee Devportal as it is merged in 3.0.0.

kedarkhaire commented 2 months ago

Hi @sindhuputti Its been more than 2 weeks there is no response, considering, last comment helped you to solve the said issues. Closing this ticket for now. Thanks!