- šŗšøUnited States oheller
If you open the browser inspector, you will see an error about Once not being a function. This is because jquery.once has been removed from core: https://www.drupal.org/node/3158256 ā .
We need to update the library to call core/once and update AppView.js, around ln:42 to properly use once. I've tried but haven't succeeded yet.
- šŗšøUnited States oheller
We have updated the js/views/AppView.js LN: 44 with:
once('shs', this.$el)[0].classList.add('hidden');
This adds the hidden class but we don't have the taxonomy terms added to the containers.
- šŗšøUnited States kreynen
@rahul1707 was that patch created from the current 2.0.x branch?
shs_d10_compatibility_issue_fixes-3349877-1_0.patch:153: trailing whitespace. $parents = []; error: patch failed: modules/shs_chosen/src/Plugin/views/filter/ShsChosenTaxonomyIndexTidDepth.php:6 error: modules/shs_chosen/src/Plugin/views/filter/ShsChosenTaxonomyIndexTidDepth.php: patch does not apply error: patch failed: src/Plugin/Field/FieldFormatter/EntityReferenceShsFormatter.php:69 error: src/Plugin/Field/FieldFormatter/EntityReferenceShsFormatter.php: patch does not apply error: patch failed: src/Plugin/views/filter/ShsTaxonomyIndexTidDepth.php:42 error: src/Plugin/views/filter/ShsTaxonomyIndexTidDepth.php: patch does not apply
I've created an issue branch and started making the changes there. If you could use that as a starting point, I'm happy to review.
Upgrade status ā has these D10 compatibility warnings against 2.0.0-rc3, and on a quick look, they still seem to apply latest 2.0.x-dev
Simple hierarchical select 2.0.0-rc3 Scanned on Thu, 03/23/2023 - 16:51. 4 warnings found. web/modules/contrib/shs/shs.libraries.yml: āāāāāāāāāāāā¬āāāāāāā¬āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā STATUS ā LINE ā MESSAGE ā āāāāāāāāāāāā¼āāāāāāā¼āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤ ā Check ā 0 ā The 'shs.form' library is depending on a deprecated library. ā ā manually ā ā The core/backbone asset library is deprecated in Drupal ā ā ā ā 9.4.0 and will be removed in Drupal 10.0.0. ā ā ā ā ā ā Check ā 0 ā The 'shs.form' library is depending on a deprecated library. ā ā manually ā ā The core/jquery.once asset library is deprecated in Drupal ā ā ā ā 9.3.0 and will be removed in Drupal 10.0.0. Use the ā ā ā ā core/once library instead. See ā ā ā ā https://www.drupal.org/node/3158256 ā ā ā ā ā āāāāāāāāāāāā“āāāāāāā“āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā web/modules/contrib/shs/shs.info.yml: āāāāāāāāāāāā¬āāāāāāā¬āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā STATUS ā LINE ā MESSAGE ā āāāāāāāāāāāā¼āāāāāāā¼āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤ ā Check ā 0 ā Value of core_version_requirement: ^8.8 || ^9 is not ā ā manually ā ā compatible with the next major version of Drupal core. See ā ā ā ā https://drupal.org/node/3070687. ā ā ā ā ā āāāāāāāāāāāā“āāāāāāā“āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā web/modules/contrib/shs/modules/shs_chosen/shs_chosen.info.yml: āāāāāāāāāāāā¬āāāāāāā¬āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā STATUS ā LINE ā MESSAGE ā āāāāāāāāāāāā¼āāāāāāā¼āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤ ā Check ā 0 ā Value of core_version_requirement: ^8.8 || ^9 is not ā ā manually ā ā compatible with the next major version of Drupal core. See ā ā ā ā https://drupal.org/node/3070687. ā ā ā ā ā āāāāāāāāāāāā“āāāāāāā“āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
Replacing
jquery.once
should be relatively straightforward. The larger issue is replacingcore/backbone
. There seems to be three ways forward:- Replace
core/backbone
dependency withcore/internal.backbone
. This would mean requiring at least D9.4. It is also highly discouraged by core maintainers to do this. #3258931: Deprecate backbone and tag it internal ā - Adding backbone.js as its own library directly in this module
- Refactoring the JS implementation to completely remove Backbone
Seems like the last one could be a separate issue to do over a longer term, and possibly be done in a 3.0.x branch. But in order to be D10 compatible in the short term, perhaps one of the first two approaches could be a short term fix?
- Replace
Also caught these two lines that need updating per Creating an instance of the class Drupal\Core\Database\Query\Condition with the new keyword is deprecated and an API addition with the method Drupal\Core\Database\Query\Query::getConnection() ā :
Drupal\shs_chosen\Plugin\views\filter\ShsChosenTaxonomyIndexTidDepth
l. 139
$or_condition = new Condition('OR');
Drupal\shs\Plugin\views\filter\ShsTaxonomyIndexTidDepth
l. 141
$or_condition = new Condition('OR');
Replacement for both should probably be
$or_condition = $this->database->condition('OR');
- š®š³India rahul1707
Created patch for 2.0.x-dev to fix Drupal 10 compatibility issues. Please review it.
- Status changed to RTBC
over 1 year ago 11:36am 5 April 2023 I have tested patch on latest 2x version which is applied cleany and working as expected on Drupal 9 & 10..making it RTBC
- šŗšøUnited States kreynen
"No issues" meaning SHS is fully functional?
It is not fully functional for me.
Not working Chosen widget and creating new items.- š¬šŖGeorgia almador
Hi, rahul1707, and thank you so much for the patch!
I'm using the latest shs-2.0.0-rc3 with your patch and I can confirm that it works with selecting hierarchical items.
BUT when I'm trying to allow creating new items on the form display widget:
admin/structure/types/manage/article/form-display"Allow creating new items
Allow users to create new items of the source bundle."
widget checkbox is gray and not available - š¬šŖGeorgia almador
This patch should help with shs_chosen search is not working
- @kreynen opened merge request.
- šŗšøUnited States kreynen
Chosen still seems buggy, but core SHS functionality seems to be working as expected in D10. I haven't tested in D9 yet. I opened an MR to the 2.x branch. Not sure if that's the direction @stBorchert and @jhedstrom want to do with this, but this unblocks me on š Automated Drupal 10 compatibility fixes Fixed . If we want to push these changes to a 3.x branch and make that D10 only, I'm happy to help with that.
HUGE thanks to everyone who has contributed!
- First commit to issue fork.
-
jhedstrom ā
committed 702b07ed on 2.0.x authored by
kreynen ā
Issue #3295761 by kreynen, rahul1707, almador: D10 Support
-
jhedstrom ā
committed 702b07ed on 2.0.x authored by
kreynen ā
- Status changed to Fixed
over 1 year ago 6:47pm 18 April 2023 - šØš±Chile Aneida
Hi, remember 'static' return type declaration is only allowed since PHP 8.0
In php 7.4 not working.
src/Cache/ShsCacheableJsonResponse.php:37 src/Cache/ShsCacheableJsonResponse.php:56
- šŗšøUnited States kreynen
@Aneida That's what I was afraid of. There's only 4 months of D7 support left, but trying to keep everything work with D9/PHP7 and D10/PHP8.1 is challenging. Probably should have gone with a 3.0.x release for D10.
- šØš±Chile Aneida
Another way would be to add the composer.json file, where the minimum php requirement is indicated. This way, you avoid creating a version that as you mention, will lose maintenance.
https://www.drupal.org/docs/develop/creating-modules/let-drupal-know-abo... ā
Greetings.
Automatically closed - issue fixed for 2 weeks with no activity.