- ๐ฎ๐ณIndia sukr_s
- Changed the title.
- Couldn't locate the MR comment. Nevertheless added a comment at the place of change. - ๐ณ๐ฟNew Zealand quietone New Zealand
@sukr_s, thanks for working on an older issue!
I read the issue summary, comments and the MR. There are no unanswered questions.
I left a comment in the MR asking for a comment to be changed. The title here needs to be updated because it refers to 'password' but the MR makes no changes to password, only to password_confirm. Both of those should be simple to complete.
I answer to myself. finally i've solved my issue by fixing 2 points:
The first point was a mistake from my side : the "value" used in the definition must be a "string". In my code, i used an entity reference id defined as an integer.
The second point was linked to my select field defined as a "multiple" one. To address this point it's necessery to alter the "compare" function of core/misc/states.js. I add this js library into my module
/** * @file * Extends core/misc/states.js. */ (function($) { //correction core : can't add a #states on a select with multiple = true function _compareCustom(a, b) { if (a !== "undefined" && typeof b === 'object' && b instanceof Array) { if (b.includes(a)) { return true; } } if (a === b) { return typeof a === 'undefined' ? a : true; } return typeof a === 'undefined' || typeof b === 'undefined'; } //hack : surcharge function compare from core/states.js to use _compareCustom instead of _compare2 Drupal.states.Dependent.prototype.compare = function compare(reference, selector, state) { var value = this.values[selector][state.name]; if (reference.constructor.name in Drupal.states.Dependent.comparisons) { return Drupal.states.Dependent.comparisons[reference.constructor.name](reference, value); } return _compareCustom(reference, value); }; })(jQuery);
This solution works with all drupal version from 8.x to 10.3.1.
Sorry, but the last version of Drupal 10.3.1 break all my "select" based conditional fields.
My conditional fields works well on Drupal 10.2.6Here an extract from my form where the field_child is visible when the taxonomy term (tid:1234) is selected
$form['field_child']['#states'] = [ 'visible' => [ ['select[name="field_parent[]"]' => '1234', ], ];
- ๐ฌ๐งUnited Kingdom welly
This was a long time coming! I remember starting work on this issue 8 years ago :) Glad to see it finally get over the line!
- ๐บ๐ธUnited States damondt
Just ran into this, steps to reproduce:
- Site had existing term reference field
- New term reference field added to facilitate manual content entry changes before feature launch
- Original term reference field deleted on feature launch
- Term pages show content for field that no longer exists - ๐ฉ๐ฐDenmark ressa Copenhagen
Yet another little paper cut bites the dust, thanks everyone who made this happen!
- ๐ฌ๐งUnited Kingdom longwave UK
Committed to 11.1.x and backported to 10.4.x as a usability bug fix. Not eligible for 11.0.x or 10.3.x as it changes the user interface.
Committed and pushed afdee270cb to 11.x and c0a5216300 to 10.4.x. Thanks!
The suggested followup already exists, will un-postpone it after submitting this comment.
-
longwave โ
committed afdee270 on 11.x
Issue #2502637 by bnjmnm, shumer, smustgrave, cilefen, Wim Leers,...
-
longwave โ
committed afdee270 on 11.x
-
longwave โ
committed c0a52163 on 10.4.x
Issue #2502637 by bnjmnm, shumer, smustgrave, cilefen, Wim Leers,...
-
longwave โ
committed c0a52163 on 10.4.x
- ๐บ๐ธUnited States smustgrave
Tested MR 5685
Verified I was getting the same results as @quietone
On a standard profile install
I was able to toggle the default Full HTML text format to disabled/enabled@steveoriol would see #157 and #161 to see why it could be an issue to delete a text format.
- ๐ณ๐ฟNew Zealand quietone New Zealand
I think this is a duplicate of an issue that was opened the day before this one. #1291592: D8UX: Batch API for the Modules page โ .
I am closing this as a duplicate and adding credit over there