I have a custom condition with the id of "uri", as on some parts of our site we needed to set context rules based on the uri.
* @Condition(
* id = "uri",
* label = @Translation("URI"),
* )
As a result when I go to create or edit an existing container, when I hit save I'm hitting an error as there is some logic in ContainerTrait.php that assumes we are on the google tag settings form purely on the assumption that a field with the name "uri" isn't null.
However as the ContainerForm uses conditionsForm() to build dynamic conditions, this now adds a "uri" field. This obviously isn't the uri field the settings form is expected, and therefore errors occur.
Adding an extra check to make sure we are saving a form with the id google_tag_settings before loading and using the uri field should resolve this.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 3115753-3-uri-condition-support.patch | 2.41 KB | thomwilhelm |
Comments
Comment #2
thomwilhelm commentedComment #3
thomwilhelm commentedComment #4
thomwilhelm commentedComment #5
thomwilhelm commentedComment #6
solotandem commentedThanks for reporting this. Changing category as one can argue the name clash is as much a 'bug' on your end; let's consider this a feature request.
Comment #8
solotandem commentedAbove commit implements proposed resolution.
Comment #9
thomwilhelm commentedThanks @solotandem much appreciated :)