Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable deprecated and remove modules during D7 upgrade #51

Closed
herbdool opened this issue Jan 14, 2021 · 10 comments
Closed

Disable deprecated and remove modules during D7 upgrade #51

herbdool opened this issue Jan 14, 2021 · 10 comments

Comments

@herbdool
Copy link
Contributor

herbdool commented Jan 14, 2021

Perhaps we can disable i18n_variable, i18n_user, i18n_block in an update hook in i18n.install. And perhaps remove it altogether. Not sure the code is necessary if we have an upgrade path for variables defined in variable_store.

@herbdool herbdool changed the title Disable i18n_variable during D7 upgrade Disable deprecated modules during D7 upgrade Jan 14, 2021
@herbdool
Copy link
Contributor Author

@indigoxela I think this is the best we can do. During the D7 upgrade we can disable the deprecated modules so it won't prevent subsequent upgrades. I haven't figured out yet how to start the upgrade (other than manually disabling in the system table or adding dummy modules).

@herbdool herbdool changed the title Disable deprecated modules during D7 upgrade Disable deprecated and remove modules during D7 upgrade Jan 15, 2021
@herbdool
Copy link
Contributor Author

herbdool commented Jan 15, 2021

Just thinking about this now: maybe we should be putting all the update hooks (which I added to other issues) in i18n.install so that we can remove these submodules now or later.

@herbdool
Copy link
Contributor Author

herbdool commented Jan 15, 2021

This PR #55 addresses this issue now (makes it easier to keep most update hooks in i18n.install in one PR).

@indigoxela
Copy link
Member

indigoxela commented Jan 16, 2021

Thinking this over...

We need the database tables and/or variables of the following modules:

  • i18n_block (has no table)
  • i18n_user (has no table)
  • i18n_variable (stores data in the variable_store db table)

What we do not need is the code. Correct me, if I'm wrong. So the module code could get removed anyway, empty "dummy modules" should be sufficient.

I'd agree, we should put all update hooks regarding these deprecated modules in i18n.install.
Then we grab the data we need from database tables. And when we're done we drop the obsolete table and delete the variables. Is that correct so far?

@indigoxela
Copy link
Member

A suspicion, why the i18n_variables module might be so tricky in the upgrade process: its value in the "bootstrap" system column is "1", which means:

Boolean indicating whether this module is loaded during Drupal’s early bootstrapping phase (e.g. even before the page cache is consulted).

But I'm only guessing.

@indigoxela
Copy link
Member

Already done in this branch https://github.com/backdrop-contrib/i18n/tree/d7-upgrade-path

Testing is welcome.

Note: if you update the code locally, in case you're not using git, do not just unpack the file over the old code, but completely replace the whole i18n directory.

@herbdool
Copy link
Contributor Author

It's not easy to review and test when I don't see a complete diff of what you've changed/added and how it compares to my PR. Can you provide a link for that?

@herbdool
Copy link
Contributor Author

I checked each new commit on that new branch. I don't see any major issues but I haven't tested it. I might not be able to test it until the other PR I created is incorporated (where the variable_store and custom block translations are migrated). I have to keep an eye on the time I can spend - I've already spent a few hours on it.

@indigoxela
Copy link
Member

I might not be able to test it until the other PR I created is incorporated (where the variable_store and custom block translations are migrated).

That's the next step on my todo list. Again, many thanks for your PRs, they give me helpful hints.

I have to keep an eye on the time I can spend - I've already spent a few hours on it.

I can understand that, fiddling with i18n is time consuming because of the module's complexity.

@herbdool
Copy link
Contributor Author

I'm closing my issue since it's addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants