drupal-check report on dev branch

14/14 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ ------------------------------------------------------------------------------- 
  Line   modules/shs_chosen/src/Plugin/views/filter/ShsChosenTaxonomyIndexTidDepth.php  
 ------ ------------------------------------------------------------------------------- 
  85     Call to deprecated function db_select():                                       
         in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get                 
         a database connection injected into your service from the container and        
         call select() on it. For example,                                              
  87     Call to deprecated function db_or():                                           
         in drupal:8.0.0 and is removed from drupal:9.0.0. Create                       
         a \Drupal\Core\Database\Query\Condition object, specifying an OR               
         conjunction: new Condition('OR');                                              
 ------ ------------------------------------------------------------------------------- 

 ------ ---------------------------------------------------------------------------------- 
  Line   src/Plugin/Field/FieldFormatter/EntityReferenceShsFormatter.php                   
 ------ ---------------------------------------------------------------------------------- 
  60     Call to deprecated method urlInfo() of class Drupal\Core\Entity\EntityInterface:  
         in drupal:8.0.0 and is removed from drupal:9.0.0.                                 
         Use \Drupal\Core\Entity\EntityInterface::toUrl() instead.                         
 ------ ---------------------------------------------------------------------------------- 

 ------ ------------------------------------------------------------------------- 
  Line   src/Plugin/views/filter/ShsTaxonomyIndexTidDepth.php                     
 ------ ------------------------------------------------------------------------- 
  85     Call to deprecated function db_select():                                 
         in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get           
         a database connection injected into your service from the container and  
         call select() on it. For example,                                        
  87     Call to deprecated function db_or():                                     
         in drupal:8.0.0 and is removed from drupal:9.0.0. Create                 
         a \Drupal\Core\Database\Query\Condition object, specifying an OR         
         conjunction: new Condition('OR');                                        
 ------ ------------------------------------------------------------------------- 

                                                                                                                        
 [ERROR] Found 6 errors                                                                                                 
                                                                                                                        

Comments

drupalisme created an issue. See original summary.

drupalnesia’s picture

Title: Does not work on Drupal 8.8.x » Drupal 9 compatibility
Issue summary: View changes
nitesh624’s picture

Version: 8.x-1.0-alpha4 » 8.x-1.x-dev
Component: User interface » Code
Assigned: Unassigned » nitesh624
Category: Bug report » Task
Priority: Critical » Normal
Issue summary: View changes

Upating the version of issue and desscription

nitesh624’s picture

Issue tags: +Drupal 9 compatibility
nitesh624’s picture

StatusFileSize
new20.4 KB

drupal-check result after applying patch

/var/www/html/clean-drupal/web/modules/contrib/shs$ ../../../../vendor/bin/drupal-check ./
 14/14 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%


                                                                                                                        
 [OK] No errors                                                                                                         
                                                                                                                        
nitesh624’s picture

Assigned: nitesh624 » Unassigned
Status: Active » Needs review
atul4drupal’s picture

Status: Needs review » Needs work

Hello nitesh624 thanks for the patch it certainly seems to fix the deprecated code issue, though it needs a minor improvement with respect to the spacing in your patch... you seems to have used 4 spaces instead of recommended 2. Do this small change and it should be good.

Thanks.

suresh prabhu parkala’s picture

Status: Needs work » Needs review
StatusFileSize
new9.21 KB
new20.33 KB

Please review!

nitesh624’s picture

Assigned: Unassigned » nitesh624
nitesh624’s picture

Status: Needs review » Active
nitesh624’s picture

StatusFileSize
new8.08 KB
new20.24 KB

Fix spacing issue in #5

nitesh624’s picture

Status: Active » Needs review
wrd’s picture

StatusFileSize
new8.42 KB

The shs_chosen module also needs its core_version_requirement set. This updated patch does so. I'm assuming that shs_chosen actually *is* updated for D9, based on the rest of the patch, but I don't know how to check; if not, this is obviously premature.

atul4drupal’s picture

@wrd thanks for working on this... at #13 an interdiff would have been helpful though.
The patch at #13 looks clean for the fix. (courtesy to #11)

Its RTBC 1.

priyanka.sahni’s picture

Status: Needs review » Needs work
StatusFileSize
new21.13 MB

Issues is not fixed.I have tested the issue on Safari , Chrome and sandbox.

Steps to replicate-
1. Go to admin/modules.
2. Search for the Simple hierarchical select.
3.Enable the module by selecting the checkbox and click on Install.
4.Go to -> admin/structure/types/manage/article/form-display
5. In the tags field , select Simple hierarchical select and click on Save.
6. Go to create Article content type.
7. Verify by clicking on Add another item.

Current Result -
On clicking on add another item , it is moving to downwards direction and not able to add the created tags.

Attaching the video as well for reference.

nitesh624’s picture

StatusFileSize
new6.7 KB
new3.62 KB
new3.6 KB

Good find @priyanka.sahni have updated the patch #16. pls test it

nitesh624’s picture

Issue summary: View changes
Status: Needs work » Needs review
priyanka.sahni’s picture

Assigned: nitesh624 » priyanka.sahni

I have re-tested by applying the patch#16 , It is found fixed now.

Steps to test-
1. Go to admin/modules.
2. Search for the Simple hierarchical select.
3.Enable the module by selecting the checkbox and click on Install.
4.Go to -> admin/structure/types/manage/article/form-display
5. In the tags field , select Simple hierarchical select and click on Save.
6. Go to create Article content type.
7. Verify by clicking on Add another item.

Patch#16

Attached the video as well for reference

priyanka.sahni’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new246.76 KB
new28.41 MB

I have re-tested by applying the patch#16 , It is found fixed now.

Steps to test-
1. Go to admin/modules.
2. Search for the Simple hierarchical select.
3.Enable the module by selecting the checkbox and click on Install.
4.Go to -> admin/structure/types/manage/article/form-display
5. In the tags field , select Simple hierarchical select and click on Save.
6. Go to create Article content type.
7. Verify by clicking on Add another item.

patch#16

Attached the video as well for reference.

priyanka.sahni’s picture

After applying the patch#16 Issues is fixed.I have tested the issue.

Steps to test-
1. Go to admin/modules.
2. Search for the Simple hierarchical select.
3.Enable the module by selecting the checkbox and click on Install.
4.Go to -> admin/structure/types/manage/article/form-display
5. In the tags field , select Simple hierarchical select and click on Save.
6. Go to create Article content type.
7. Verify by clicking on Add another item.

Patch#16

Attached the video for reference as well.

priyanka.sahni’s picture

I have re-tested by applying the patch#16 , It is found fixed now.

Steps to test-
1. Go to admin/modules.
2. Search for the Simple hierarchical select.
3.Enable the module by selecting the checkbox and click on Install.
4.Go to -> admin/structure/types/manage/article/form-display
5. In the tags field , select Simple hierarchical select and click on Save.
6. Go to create Article content type.
7. Verify by clicking on Add another item.

priyanka.sahni’s picture

Assigned: priyanka.sahni » Unassigned
nikolas.tatianenko’s picture

Reviewed with Drupal 8.8 and Drupal 9-rc1
Also reviewed with a Chosen submodule. Looks great. Thank you

jastraat’s picture

This may need more work. I tested this patch + the dev version of the module on Drupal 8.8 and got the following error:

ArgumentCountError: Too few arguments to function Drupal\taxonomy\Plugin\views\filter\TaxonomyIndexTid::__construct(), 3 passed in /web/modules/contrib/shs/src/Plugin/views/filter/ShsTaxonomyIndexTidDepth.php on line 41 and exactly 5 expected in Drupal\taxonomy\Plugin\views\filter\TaxonomyIndexTid->__construct() (line 55 of core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php).

jastraat’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new7.81 KB

Updated patch to address issues from comment 24 + other depreciations. I did not test the chosen submodule, but the main module worked with Drupal 9.

rar9’s picture

On drupal 9.0.2 shs dev + patch 25 wont install

Problem 1
- Conclusion: remove doctrine/annotations 1.10.3

jastraat’s picture

I'm seeing that same composer error in a lot of tickets. This patch doesn't make any composer or dependency changes, so I'm not sure that's related.

What version of PHP are you running?

Is it only adding to the project with composer that doesn't work? Since the core version requirement addition to is part of this patch, I'm not sure that composer would see the project as compatible with D9 to pull and patch.

rar9’s picture

php 7.3x, but would like to use 7.4.x in future

rar9’s picture

I´m getting:

composer require 'drupal/shs:1.x-dev'
./composer.json has been updated
Gathering patches for root package.
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Installation request for drupal/shs 1.x-dev -> satisfiable by drupal/shs[1.x-dev].
- Conclusion: remove drupal/core 9.0.2
- Conclusion: don't install drupal/core 9.0.2
- drupal/shs 1.x-dev requires drupal/core ^8 -> satisfiable by drupal/core[8.0.x-dev, 8.1.x-dev, 8.2.x-dev, 8.3.x-dev, 8.4.x-dev, 8.5.x-dev, 8.7.x-dev, 8.8.x-dev, 8.9.x-dev].

jastraat’s picture

@Rar9 This patch hasn't been incorporated into the dev branch yet, so it is not compatible with D9. You wouldn't be able to require the module using composer.

rar9’s picture

@jastraat so this is a bit confusing... Title D9 Drupal 9 compatibility , and multiple patches.
Is there anyway to get this to work soon?

Hugo Chhor’s picture

@jastraat and @Rar9

Hello,

The patch #25 works for me like charm with Composer.

Because this module has not been declared as compatible with D9, you will have a dependency error when you perform the upgrade to D9 using Composer.

Fortunately there is a trick to subvert this issue :

Just add an alias to your target D9 version with your current D8 version :

composer require "drupal/core:9.0.2 as 8.9.2" --no-update && composer update

Hope it wood help.

rar9’s picture

This only messed up my Install as it downgrade other dev modules.... Thanks for this.

jastraat’s picture

@Hugo Chhor Cool trick!

Would you want to mark as reviewed?

Hugo Chhor’s picture

Thanks @jastraat for your feedback.

I have no downgrade issue on other dev modules as mentioned by @Rar9 (#33).
Perhaps because I use the last version of Composer installers :
"composer/installers": "^1.9"
My Drupal 9 project template is "drupal/recommended-project".

For instance, there wasn't downgrade on "drupal/field_group": "3.x-dev" and others.

But this trick have a major issue :
if you want to update your Drupal core, you'll have to modify the core version on your composer.json before performing your composer update like this example :
from "drupal/core:9.0.2 as 8.9.2" to "drupal/core:9.0.3 as 8.9.2"

As mentioned in its module page, there is "No further development" on this module.
So I delete the line "'drupal/shs": "1.x-dev'" from my composer.json
and I move the "shs" folder from the "contrib" folder to the "custom" folder after applying the patch #25 because I ignore the "contrib" folder in my ".gitignore"

After this, everything goes well...hope there won't be further issue.

rar9’s picture

The && Composer update is basically what forced the downgrade of some modules

So for the time being I'm forced to update each module manually till this module is updated to install via composer for drupal 9 :-(

I checked and i also use 1.9 for composer installer

rar9’s picture

Will this module be eventually be updated to be really Drupal 9 compatible, or might it be smarter to used the Client-side hierarchical select alternative?...
has anyone tried this with drupal 9

sam152’s picture

Status: Needs review » Reviewed & tested by the community

While the module is minimally maintained, I don't think the committers will have a problem with adding D9 compatibility for the existing users.

Patch works great for me, thanks @jastraat. I'll see if I can contact @jhedstrom to get this in.

  • jhedstrom committed ff3cef9 on 8.x-1.x authored by jastraat
    Issue #3133245 by nitesh624, Suresh Prabhu Parkala, jastraat, wrd,...
jhedstrom’s picture

Status: Reviewed & tested by the community » Fixed

Thanks all!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.