Closed (fixed)
Project:
Slick Carousel
Version:
7.x-3.0-rc2
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
3 Apr 2019 at 12:00 UTC
Updated:
11 Mar 2023 at 15:54 UTC
Jump to comment: Most recent
Comments
Comment #2
gausarts commentedThanks for the report!
May I know the autoloader module you use?
Comment #3
calbasiSure: X Autoload
Comment #4
gausarts commentedX Autoload sounds to have the same issue like Autoload mentioned here:
https://git.drupalcode.org/project/blazy/blob/7.x-1.x/docs/README.md#kno...
Last time I tested X Autoload I had no missing classes. Only with Autoload, I did.
I will add your findings to the docs. Thanks!
Comment #5
gausarts commentedComment #7
gausarts commentedAdded your info to docs. Thanks for contribution!
Comment #9
erwangel commentedStill having this error with 3.0. (Drupal 7)
I have had installed it successfully but when for some reason I had to rebuild registry with drush rr (registry_rebuild module) I came to this error and since unable to run "drush aur" and "drush cc".
WD php: Error: Class 'Drupal\slick\SlickManager' not found in slick() (line 28 of /path_to/web/sites/all/modules/contrib/slick/slick.module).
Drush command terminated abnormally due to an unrecoverable error.
It completely broke my site. HTTP ERROR 500. Unable to uninstall it, "drush dis slick" throws the same message. I don't know how to bring my site back without having to reload from backup.
Comment #10
gausarts commentedThanks for the report!
That is why I still leave Slick 3.x as a non-recommended for now, as I haven't covered edge cases, yet.
Your report is surely helping me get more edge cases for more complete documentation.
If using Autoload.module:
It is likely Autoload.module cannot rewrite classes into autoload.php file.
Try renaming (do not delete in case another failure) autoload.php in your drupal root to something, and re-run
drush aur, drush cc all.This way Autoload will _hopefully regenerate a new autoload.php with the missing classes. In case it fails, be sure to have the expected folder permissions for the Autoload to kick in for a while.
If still an issue, try installing registry_autoload.module.
It is okay as a combo with autoload.module. You can uninstall Autoload.module once okay with registry_autoload.module.
Comment #11
erwangel commentedThank you for the reply. I don't use autoload module, just registry_autoload.
I was able to have site back by executing registry_rebuild form inside the module dir
and since I don't have the errors
I still can't understand why "drush rr" is throwing these errors and fails to complete.
Is it safe to uninstall slick 3.0 and go back to the 2.x version ?
Also disabling or enabling slick (or blazy as well) with drush (drush dis slick) breaks the composer.json file removing everything from "require" section but "php": ">=5.3.10" and replaces the "autoload" section with "psr-0" info.
Comment #12
gausarts commentedYes, the registry_rebuild should normally fix most class registry issues.
Blazy requires PHP 5.6 in the least. Perhaps that is part of the reason?
If you meant "uninstall", it should be safe. Typically all module configs and optionsets will be just gone.
If you meant "disable", and "downgrade", to be honest I haven't tried a downgrade. So I cannot confirm about this, sorry.
The provided updates changed variables, and also optionsets.
However as long as you don't store optionsets in codes via Bulk Exporter, or Features, it should be likely fine.
But I am afraid I cannot guarantee it for now.
Be sure to re-run registry_rebuild again if you do so.
Perhaps you could try a dev environment, and see if any issue.
Please update this issue with your findings either failure or success. Thanks!
Comment #13
gausarts commented"drush aur" was available if Autoload.module were installed.
Comment #14
erwangel commentedIndeed I realized that "aur" was an autoload.module command, but the problem of running drush commands like "cc all" or "rr" remains as well as breaking the composer.json (perhaps this last one is due to composer-manager, I have to test further with this module disabled)
I don't think there is a problem with php version, or, if one, its with code upgrading compatibility as I'm using php7.
Anyway, I didn't had to uninstall or downgrade slick 3. As I said, I was able to get site back after rebuilding registry (with the method I mentioned, not with drush rr) and Slick is working as expected despite its usage remains to me something obscure by lacking a good documentation, but that's an other problem.
To resume, the main issue is when you have to run a registry rebuild with drush then slick throws the "WD php: Error: Class 'Drupal\slick\SlickManager' not found in slick() (line 28 of /path_to/web/sites/all/modules/contrib/slick/slick.module)" and the entire site becomes unavailable with a 500 WSD. Hope that helps
Comment #15
codekarate commentedI can confirm I have this same issue using the Registry Autoload module. I am able to get it to work by running the following DB query:
Followed by running
drush rrtwo times (the first time will fail, the second will finish). The problem is if you rundrush rragain, it will fail and you have do to the entire process over. Any ideas on a more permanent solution?I would like to use 3.0 in an upcoming production site, but this is the only problem that I seem to be having. Let me know if there is anything I can do to help debug or come up with a solution.
Comment #16
gausarts commentedInteresting. I ran drush cc all like many times, and didn't notice this issue. If I could, I already put a notice earlier.
Branch 3.x is not in recommended status, yet. due to holding issues like this.
Thank you for confirming this also happens with Registry autoload. We'll need to update docs with your findings.
Comment #17
codekarate commentedDid you try running `drush rr` to rebuild the registry? That is where I am noticing the problem. `drush cc all` always works fine. It's only when using registry rebuild that it seems to cause the problems.
Comment #18
gausarts commentedYou are right. I just noticed it with
drush rr.This type of CLI issue also happened with another issue on this project, I forgot the exact link. You will find one by searching "drush"
The solution is similar to both: when CLI fails, try the good old browser.
The solution was actually written in both Slick branches: "Know how to run registry_rebuild safely."
What I meant with "safely", is rename "registry_rebuild" to some random name, not easy to guess, or run once and delete it.
I am changing the status as it is obviously nothing to do with Slick, nor autoloader classes. And we had the solution, written there all along.
This should be no blocker no more.
Comment #20
cosolom commentedWas the same problem with xautoload (I can't enable module because this error), but all fine with registry_autoload
Comment #21
jenlamptonI hit the same problem with xautoload and 7.x-3.1 (which is now the currently recommended release). Downgrading to 7.x-1.2 solved the issue for me also.
Comment #22
matas.k commentedRan into this problem because of PHP 8.1 issues with autoload, dblog spams some error on any page load, could not find any solution or patch so decided to try alternatives.
Steps:
blazy, blazy_ui, slick, slick_fields, slick_extras, slick_views, slick_example, slick_uiblazy, blazy_ui, you cannot enable slick, it throws errors:7.x-1.x-dev 2023-Feb-28version.drush rrand using registry_rebuild. Don't forget to clear cachesdrush cc all.drush en blazy, blazy_ui, slick, slick_fields, slick_extras, slick_views, slick_example, slick_ui. All modules install no errors.There's also another autoloader module that is not documented, but is listed when trying to enable blazy with drush psr0.