Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
configuration system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
3 Dec 2012 at 12:42 UTC
Updated:
29 Jul 2014 at 21:36 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
ACF commentedadd patch
Comment #3
ACF commented#1: 1856976-language_count_to_state-drupal8-1.patch queued for re-testing.
Comment #5
aspilicious commentedThis is failing because we need a memory keyvalue store in early bootstrap. I added that and than the installer proceeds to the database settings page. After filling in the correct data it blow up again with the message: "keyvalue.memory" is not available.
Thats because we had to change the default to keyvalue.memory to make the installer work but when we enter the database settings a new container will be build that contains the database keyvalue store (*I think*) so we have to clear the keyvalue.memory default so that it takes the databse one.
I tried that but it still tells me "keyvalue.memory is not defined". If someone else can figure out where we have to add an aditional check or where we have to reset/rebuild something please let me know (or fix the patch yourself :p).
Comment #6
gddThey had similar problems in #1804380: convert color variables to config/state, see the patch there.
Comment #7
soul88Am working on this on the CodeSprint: https://drupal.org/node/2009672
Comment #8
soul88try to reroll
Comment #9
soul88Adding tag and changing status
Comment #10
andypostreplace with $language_count = state()->get('language.count') ?: 1;
Comment #11
soul88Fixed those changes.
As for the KeyValue storage problems, I suppose that they could've already been solved by the patch from https://drupal.org/node/1804380 that was commited in feb.2013. If not, I'll add some code to "core/includes/install.core.inc"
Comment #12
andyceo commentedComment #13
soul88Unforunately it still needs work. I've ran into coke and egg issue. I can't make a change to the LanguageManager.php file.
But even besides that some tests fail for now.
Comment #14
vijaycs85Re-rolling #11
Comment #16
vijaycs85#14: 1856976-language_count_to_state-drupal8-14.patch queued for re-testing.
Comment #18
andypostRe-roll after #1947720: Use Drupal::state() to replace state()
Fixed install, @todo language manager requires 'state' service injection
Comment #19
andypostThis kind of injection does not work.
EDIT we can use optional injection
Comment #21
andypostThe container is not accessible somehow
Comment #22
andypostAnother approach
Comment #24
andypostFixed a bit of cache troubles.
The state service is optional
Comment #26
Tor Arne Thune commented#24: language-state-1856976-24.patch queued for re-testing.
Comment #27
dawehnerI try to figure out why we couldn't use a memory based key value store during validation.
Should be the full namespace.
Let's also document that it is optional.
Comment #28
andypostNo reason for conversion to add new service for install time.
Memory based storage would be added in #1862202: Objectify the language system because it changes a way like language manager registred.
So for now just simple check for that
Here's a check for install time and absence of the state
Comment #29
dawehnerWell, isn't it a reason that we hack around stuff which is actually not needed if we do it properly,
especially because we already know how to do it properly?
Comment #30
andypost@dawehner Because this task is independent from #1862202: Objectify the language system so just trying to not duplicate a work
Comment #31
penyaskitoComment #32
jibran#28: language-state-1856976-28.patch queued for re-testing.
Comment #34
dawehnerComment #35
dawehnerThere we go.
Comment #36
aspilicious commented$javascript_parsed_count = count($this->container->get('state')->get('system.javascript_parsed') ?: array());
slightly unrelated but I get why you're doing this in there as the service is injected now. Looks good to me otherwise...
Comment #37
aspilicious commentedGood to go!
Comment #38
alexpottCommitted 566ebfd and pushed to 8.x. Thanks!