Closed (fixed)
Project:
Drupal core
Version:
8.6.x-dev
Component:
language system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
31 Mar 2015 at 06:34 UTC
Updated:
15 Mar 2018 at 10:19 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
gábor hojtsyLooks like these were not converted when postSave() and postDelete() methods were introduced.
Comment #2
rpayanmPlease review.
Comment #4
sidharthapHere is a updated patch. Not sure if it is the right way.
Comment #5
rpayanm$this is not accessible in static context.
Let me try.
Comment #10
andypostProbably this affected by parent issue but anyway
Insert only!
if ($this->isLocked() || $update)
Use editable config, so save will happen once
Comment #11
segi commentedHere is the updated patch, based on @andypost feedbacks.
Comment #12
rpayanm@segi you must change the Status to "Need review" for testbot test it.
Comment #13
mon_franco commentedI have reviewed the last patch, everything seems correct. The only recommendation, after to talk with @tstoeckler about this issue, is to use the object instead of these two functions: language_negotiation_url_domains() and language_negotiation_url_domains_save
Comment #14
mon_franco commentedComment #15
xanoComment #16
yannickooComment #17
axe312 commented- just wanted to remove the hashtag from the issue tag ... yannickoo was faster -
Comment #18
segi commentedUpdated the patch, I removed call of language_negotiation_url_domains() and language_negotiation_url_domains_save() functions.
Comment #19
segi commentedComment #20
mon_franco commentedHi,
Issue reviewed, everything seems correct :)
Comment #21
mon_franco commentedComment #22
andypostwrong indent
Comment #23
andypostComment #24
segi commentedI fixed the text indent, but I used this indent because I saw it in the language_negotiation_url_domains_save() and language_negotiation_url_prefixes_save() functions, so the indent wrong there as well.
Comment #25
segi commentedComment #26
penyaskitoLooks good to me, and still applies.
Comment #27
alexpottLets not do an early return let's wrap the write to config in an
if (!$this->locked() && !$update) {.Let's just do one config getEditable() instead of the get()s in each of the methods here which will also fix some of the config override bleeding into active config issues.
The other issue can add the test and address the other problems with the procedural functions.
Comment #28
tim.plunkettWhy not just get this config object once (in each method) and manipulate it directly?
Comment #29
segi commentedI rerolled the patch. My plan is I will continue with the fixes based on feedbacks.
Comment #30
segi commentedComment #31
gábor hojtsyWhy are we using getCurrentLanguage() here? We are supposed to react to deleting of possibly multiple entities, not just one AFAIS.
Comment #32
segi commentedI tried to fix the patch base on feedbacks, but the requests for config management weren't clean for me, so I did a solution. I hope I step closer to final solution.
Comment #33
segi commentedComment #34
gábor hojtsy#2403229: language.negotiation configuration can have overrides bleed in already added the test coverage and resolved the bleeding. This one just cleans up the code now.
Comment #36
gábor hojtsyTrackertest GET http://ec2-52-88-182-40.us-west-2.compute.amazonaws.com/checkout/user/login returned 0 (0 bytes)does not seem related at all.Comment #38
gábor hojtsyComment #41
penyaskitoComment #42
alexpottYes this change makes sense and has no risk but it does not meet our beta guidelines for Drupal 8 inclusion at this time. In my opinion this can go in after Drupal 8 release. I don't think we need to wait to 8.1.
Tagging with a new tag "D8 patch release target" since I don't think we have a tag for this.
Comment #43
andypostsuppose the right tag
Comment #44
gábor hojtsyRemoving from sprint then.
Comment #49
berdiryeah.. 8.0 beta is over now :)
Comment #50
andypostreroll + fix unused use
Comment #51
andypostAnd one with cleaner patch
Comment #53
segi commentedI reviewed the last patch it looks good and the test went well.
Comment #54
segi commentedComment #55
tstoecklerThis can be written even more succinctly by using
$config->clear('url.prefixes.' $entity->id())(and the same for the domains).Comment #56
yogeshmpawarUpdated patch as per comment #55 & also added interdiff.
Comment #58
yogeshmpawarmaybe this patch will solve the PHPLint issue.
Comment #60
yogeshmpawarmy bad few things i missed.
Comment #61
berdirNice. We could save a few more charactes with chained calls, even skip the $config variable completely but not sure if that really is an improvements, lets see what @alexpott thinks.
Comment #62
alexpottAdding credit. The lack of chaining is okay. Makes no difference really.
Comment #63
alexpottCommitted 877e4a8 and pushed to 8.6.x. Thanks!