Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Comment | File | Size | Author |
---|---|---|---|
#49 | language_content_type.patch | 1.19 KB | catch |
#43 | language-default-1827038-43.patch | 8.02 KB | tim.plunkett |
#35 | 1827038-language-cmi-25-35.interdiff.txt | 2.03 KB | penyaskito |
#35 | 731724-222.patch | 337.2 KB | penyaskito |
#25 | 1827038-language-cmi-25.patch | 23.6 KB | vijaycs85 |
Comments
Comment #1
Albert Volkman CreditAttribution: Albert Volkman commentedI'm sure this is going to need more work.
Comment #3
Albert Volkman CreditAttribution: Albert Volkman commentedEep. *embarrassed*
Comment #5
japicoder CreditAttribution: japicoder commentedI take for review
Comment #6
BerdirShould be config()->set()->set()->save().
I haven't check what exactly this is doing but temporary variables which are only in test modules shoud use state(), not config().
Comment #7
japicoder CreditAttribution: japicoder commentedCorrected some typo and a few vars not being corrected by the initial patch.
Corrected a "Call to undefined function theme()" error when doing clean install.
Comment #9
japicoder CreditAttribution: japicoder commentedThanks for your review, Berdir. I've added the changes that you suggest.
Anyway, I'm running in troubles with the installation, when it's installing the modules at field module it stops with a 500 server error. After debugging this, I can't figure why its happening, so y upload the last patch if someone can help me to find the error.
Comment #10
japicoder CreditAttribution: japicoder commentedMore corrections to the patch and finally I found where is crashing at install, but don't understand why.
Problem is at this function, on bootstrap.inc
If revert the changes, using again the variable_get() function, installation goes right. If I use state() instead of config() function, it crashes when accessing /core/install.php, and if I leave as is on the patch, it works for the 4-5 first modules.
Can someone explain me what I'm doing wrong?
Comment #11
dagmar@japicoder: I had the same problem during #1799440: Convert Filter variables to Configuration System.
The issue here is, make language.detection.count should not be part of the language module but system module. In fact maybe it can be a state instead of a config. See http://drupal.org/node/1790518
Comment #12
japicoder CreditAttribution: japicoder commented@dagmar: thank you for your suggestions, after seeing http://drupal.org/node/1799440 I think it's now more clear to me and I have to try some improvements on the patch and see if now everything works as expected
Comment #13
japicoder CreditAttribution: japicoder commentedNew revision, I've corrected some state calls and changed all the language.detection.count to state, but fails on install. This still needs work.
Comment #14
Cameron Tod CreditAttribution: Cameron Tod commentedComment #16
Cameron Tod CreditAttribution: Cameron Tod commentedCould the install fails be related to the issues with the installer being worked on here? #1798732: Convert install_task, install_time and install_current_batch to use the state system
Comment #17
swentel CreditAttribution: swentel commentedIndeed, there is a call to drupal_language_initialize() in install.core.inc which calls language_multilingual(). That function is converted to use the state() system in the patch which is not available yet. We'll have to wait for that other one to land to get this one forward.
Comment #18
dawehnerThis is just a rerole.
Comment #19
aspilicious CreditAttribution: aspilicious commentedComment #21
vijaycs85#18: drupal-1827038-18.patch queued for re-testing.
Comment #23
vijaycs85#18: drupal-1827038-18.patch queued for re-testing.
Comment #25
vijaycs85Re-rolling...
Comment #27
vijaycs85#25: 1827038-language-cmi-25.patch queued for re-testing.
Comment #29
vijaycs85#25: 1827038-language-cmi-25.patch queued for re-testing.
Comment #31
Gábor HojtsyTagging up with some tags.
Comment #32
penyaskitoThe patch does not need a reroll, but some Language Negotiation tests are failing. I will try to find why.
Comment #33
Gábor HojtsyRestore lost tags.
Comment #34
penyaskitoDebugged the issue and found that there were some missing variable_get not changed. Trying to do that, I hit the #1862202: Objectify the language system wall, so maybe this should be postponed on that issue.
Comment #35
penyaskitoTotally useless, but here is my patch, interdiff, and the exception I finally got:
Comment #36
aspilicious CreditAttribution: aspilicious commentedlets run this
Comment #38
swentel CreditAttribution: swentel commenteder #35 contains a completely different patch
Comment #39
swentel CreditAttribution: swentel commentedalso #1862202: Objectify the language system is going much further, so I think we can more or less close this one
- edit - rather wait until that one is done.
Comment #40
alexpottThis is a release blocker as we can't have a half deployable multilingual system through CMI
Comment #41
Gábor HojtsyLooking at the proposed patch, this is not actually an API change. Those who wanted to use the variables should have used the API functions to access them anyway.
Comment #42
jair CreditAttribution: jair commentedNeeds reroll
Comment #43
tim.plunkettThe last patch was from February 17th. A lot changed, so I'm just starting over. language_default is first.
The previous patch placed it into language.detection.yml, I'm not sure if that's correct.
Comment #45
tstoecklerI think getDefaultLanguage() would be a more intuitive name.
Also, considering that the previous patch was 300 KB I would prefer if we could do this in batches, i.e. one variable at a time or something.
Comment #46
Gábor Hojtsy@tim.plunkett: well, the default language used to be a very integral part of language selection. Now that is configurable, so the detection may never consider the default language. Also, the default language may be applicable to other things, etc. all content/config entities created get that assigned when created unless configured otherwise. So the default language is applied to so many other things.
Comment #47
plachPart of the language variables are addressed in #1862202: Objectify the language system. There we are introducing
getLanguageDefault()
, however I agreegetDefaultLanguage()
would be better.Comment #48
vijaycs851. Created new issue #2078511: Rename getLanguageDefault() to getDefaultLanguage() for renaming method and postponed on this issue
2. Looks like getLanguageDefault() trying to get the default before static::$container is in place.
Comment #49
catchlanguage_content_type variable is just cruft at this point since that was already converted. Here's an interim patch to clean that up.
Comment #50
ianthomas_ukAgreed. I can see these being upgraded in node_update_8001() and then re-upgraded in following hooks until they are added to \Drupal::config('language.settings'). Therefore we don't need to manually delete them on uninstall.
RTBC.
Comment #51
ianthomas_ukI should clarify my RTBC was for #49 for language_content_type_* only.
Many of the other variables have already been converted in other issues, the only remaining one that I could see that did not already have an open issue was language_default which I've split into #2108599: Convert language_default to CMI.
Comment #52
catchComment #53
Gábor HojtsyTag on sprint for easier tracking.
Comment #54
catchSince Alex is away and it's my patch, assigning to webchick.
Comment #55
webchickOh, that's a far less scary patch than I was picturing from the title. :)
Committed and pushed to 8.x. Thanks!
Comment #56
Gábor HojtsyThanks!