Closed (fixed)
Project:
Superfish Dropdown Menu
Version:
8.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
10 May 2020 at 00:41 UTC
Updated:
9 Aug 2023 at 12:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
arunkumarkUpdated the Issue details.
Comment #3
arunkumarkCreated the Patch to fix the Issues
Comment #4
wrd commentedI'm getting the following error when attempting to enable the module:
Comment #5
naresh_bavaskarFacing an issue while applying patch #3 in 8.x-1.x
Comment #6
iheb.attia commentedComment #7
iheb.attia commentedComment #8
meghasharma commentedHave run drupal-check & rector tools and scanned upgrade_status on superfish module:
rector is done and while scanning upgrade_status: No errors reported;
but while running the drupal_check
its giving errors:
my_site_name_dir % vendor/bin/drupal-check -ad web/modules/contrib/superfish
4/4 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
------ -------------------------------------------------------
Line src/Plugin/Block/SuperfishBlock.php
------ -------------------------------------------------------
56 Unsafe usage of new static().
💡 Consider making the class or the constructor final.
1466 Variable $type might not be defined.
------ -------------------------------------------------------
------ ---------------------------------------------
Line superfish.module
------ ---------------------------------------------
203 Function libraries_get_path not found.
208 Function libraries_get_path not found.
251 Function libraries_get_libraries not found.
------ ---------------------------------------------
------ -------------------------------------------------------------------------------------------------------------------------------------------
Line superfish.theme.inc
------ -------------------------------------------------------------------------------------------------------------------------------------------
31 Function template_preprocess_superfish not found while trying to analyse it - autoloading is probably not configured properly.
82 Function template_preprocess_superfish_menu_items not found while trying to analyse it - autoloading is probably not configured properly.
------ -------------------------------------------------------------------------------------------------------------------------------------------
[ERROR] Found 7 errors
my_site_name_dir % vendor/bin/rector process web/modules/contrib/superfish --dry-run
Rector 0.8.x-dev@8896f0a
Config file: rector.yml
12/12 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
[OK] Rector is done!
Comment #9
ankitsingh0188Comment #10
ankitsingh0188Apologies, unable to spare time for this. Unassigning so others may take this forward.
Comment #11
rishabhthakur commentedI will work on that..
Comment #12
rishabhthakur commentedPatch #6 failed to apply in Latest committed code, Some of cod already merged with last release
So, Re-rolled patch #6, Updated patch as per the changes suggested in #8 (drupal-check errors).
Please review and confirm
Comment #13
arno2mars commentedHello,
I have checked patch in #12.
Patch is working however after applying it upgrade_status still report the following deprecation:
FILE NAME LINE ERROR
\web\modules\contrib\superfish\superfish.module 208 Call to deprecated function libraries_get_path(): Will be removed before a stable Drupal 8 release. Please use the new library load and managment concepts described at: https://www.drupal.org/node/2170763
The patch indeed adds the following line containing the deprecated function it is supposed to remove:
+ $directory_path = libraries_get_path($library);
Hoping it helps!
Thanks :-)
Comment #14
ivnishComment #15
dontayeb commentedI got the same error as #13 using patch at #12
I changed line 208 to
$directory_path = superfish_libraries_get_path($library);
and that took care of the error and now Superfish is error/warning free.
Comment #16
ivnishAlready fixed