- Issue created by @deminy
- πΊπΈUnited States jrockowitz Brooklyn, NY
I am not sure I will be able to replicate the issue but the attached patch should fix it.
- Status changed to Needs review
over 1 year ago 1:59pm 18 June 2023 - last update
over 1 year ago 534 pass - Status changed to Needs work
over 1 year ago 1:10am 19 June 2023 - π¨π¦Canada deminy Canada
Thanks for taking a look at the issue so quickly. I gave the patch a try but unfortunately the issue still exists. It seems that array field $build['#attached']['library'] already exists as a string (and thus it won't be overidden). Here is a customized change I made:
public static function attachLibraries(array &$build) { $build += ['#attached' => []]; $build['#attached'] += ['library' => []]; file_put_contents(__DIR__ . 'log.txt', var_export($build['#attached'], true)); // ... }
The log contains the following:
array ( 'library' => 'core/drupal.dialog.ajax', )
- π¨π¦Canada deminy Canada
I took a look at Drupal core and noticed the following MR created for issue #2253257 π Use a modal for entity delete operation links Fixed (Use a modal for entity delete operation links):
https://git.drupalcode.org/project/drupal/-/merge_requests/3700/diffs#8d...
And, here is the merged commit for that issue:
https://github.com/drupal/drupal/commit/bab4e14492b807364137f4b4075c86cb...
Hope it helps.
- πΊπΈUnited States jrockowitz Brooklyn, NY
That helps a lot.
The below code is a mistake coming from Drupal Core.
'#attached' => [ 'library' => 'core/drupal.dialog.ajax', ],
...it should be...
'#attached' => [ 'library' => ['core/drupal.dialog.ajax'], ],
You should file a new major issue and add a note to π Use a modal for entity delete operation links Fixed .
For now, I can provide a reasonable patch workaround.
After applying the patch I get this error Warning: Undefined array key "#attached" in Drupal\webform\Utility\WebformDialogHelper::attachLibraries() (line 64 of modules/contrib/webform/src/Utility/WebformDialogHelper.php). So I added a fix to this patch. My core version is 10.1 and webform "drupal/webform": "^6.2@beta".
- Status changed to RTBC
about 1 year ago 6:14pm 13 September 2023 - last update
about 1 year ago 537 pass - Status changed to Fixed
about 1 year ago 2:03pm 14 September 2023 -
jrockowitz β
authored 71d184a4 on 6.1.x
Issue #3367466 by jrockowitz, biancaradu27: Unable To Access Tab...
-
jrockowitz β
authored 71d184a4 on 6.1.x
-
jrockowitz β
authored 71d184a4 on 6.2.x
Issue #3367466 by jrockowitz, biancaradu27: Unable To Access Tab...
-
jrockowitz β
authored 71d184a4 on 6.2.x
-
jrockowitz β
authored 71d184a4 on 6.x
Issue #3367466 by jrockowitz, biancaradu27: Unable To Access Tab...
-
jrockowitz β
authored 71d184a4 on 6.x
Automatically closed - issue fixed for 2 weeks with no activity.