Problem/Motivation
I think this is important to fix before the new beta is released with Drupal 10 support.
In the latest dev version of Private Message the Upgrade status report still gives 6 problems found.
web/modules/contrib/private_message/private_message.libraries.yml:
┌──────────┬──────┬──────────────────────────────────────────────────────────────┐
│ STATUS │ LINE │ MESSAGE │
├──────────┼──────┼──────────────────────────────────────────────────────────────┤
│ Handmati │ 0 │ The 'inbox_block_script' library is depending on a │
│ g │ │ deprecated library. The core/jquery.once asset library is │
│ controle │ │ deprecated in Drupal 9.3.0 and will be removed in Drupal │
│ ren │ │ 10.0.0. Use the core/once library instead. See │
│ │ │ https://www.drupal.org/node/3158256 │
│ │ │ │
│ Handmati │ 0 │ The 'notification_block_script' library is depending on a │
│ g │ │ deprecated library. The core/jquery.once asset library is │
│ controle │ │ deprecated in Drupal 9.3.0 and will be removed in Drupal │
│ ren │ │ 10.0.0. Use the core/once library instead. See │
│ │ │ https://www.drupal.org/node/3158256 │
│ │ │ │
│ Handmati │ 0 │ The 'private_message_thread_script' library is depending on │
│ g │ │ a deprecated library. The core/jquery.once asset library is │
│ controle │ │ deprecated in Drupal 9.3.0 and will be removed in Drupal │
│ ren │ │ 10.0.0. Use the core/once library instead. See │
│ │ │ https://www.drupal.org/node/3158256 │
│ │ │ │
│ Handmati │ 0 │ The 'members_widget_script' library is depending on a │
│ g │ │ deprecated library. The core/jquery.once asset library is │
│ controle │ │ deprecated in Drupal 9.3.0 and will be removed in Drupal │
│ ren │ │ 10.0.0. Use the core/once library instead. See │
│ │ │ https://www.drupal.org/node/3158256 │
│ │ │ │
│ Handmati │ 0 │ The 'message_form' library is depending on a deprecated │
│ g │ │ library. The core/jquery.once asset library is deprecated in │
│ controle │ │ Drupal 9.3.0 and will be removed in Drupal 10.0.0. Use the │
│ ren │ │ core/once library instead. See │
│ │ │ https://www.drupal.org/node/3158256 │
│ │ │ │
│ Handmati │ 0 │ The 'uninstall_page' library is depending on a deprecated │
│ g │ │ library. The core/jquery.once asset library is deprecated in │
│ controle │ │ Drupal 9.3.0 and will be removed in Drupal 10.0.0. Use the │
│ ren │ │ core/once library instead. See │
│ │ │ https://www.drupal.org/node/3158256 │
│ │ │ │
└──────────┴──────┴──────────────────────────────────────────────────────────────┘
Steps to reproduce
Go to the latest dev version Commit 4e0703774c89305165edab9f8ccd84027e9c4b41 and run the Upgrade status.
Proposed resolution
Let's add the core/once library and rewrite the Javascript accordingly. I found a patch in https://www.drupal.org/project/private_message/issues/3297888#comment-15... which partially solves the problem.
Issue fork private_message-3391546
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
sarwan_verma CreditAttribution: sarwan_verma at Virasat Solutions commentedComment #3
jaapjan CreditAttribution: jaapjan at 25Knots for One Shoe commentedComment #5
jaapjan CreditAttribution: jaapjan at 25Knots for One Shoe commentedChanges are in the merge request. Would be great if this can be reviewed.
Patch file here: https://git.drupalcode.org/project/private_message/-/merge_requests/72.p...
Comment #6
jaapjan CreditAttribution: jaapjan at 25Knots for One Shoe commentedComment #7
jaapjan CreditAttribution: jaapjan at 25Knots for One Shoe commentedComment #8
heddnLooks good.
Comment #10
heddn