Disable broken Drupal 8 module - drupal

Can't seem to manage to disable a broken D8 module, I'm suffering from WSOD right now, and can't seem to
get this off. I'm getting
PHP error
Uncaught PHP Exception ReflectionException: "Class \Drupal\restui\Controller\RestUIController
does not exist" at /mnt/www/html/xxxxx/docroot/core/lib/Drupal/Core/Entity/EntityResolverManager.php
line 132 request_id="v-210c8b9e-9aaa-11e4-9d97-22000a1f8652"
In my Acquia Cloud logs, I'm really just trying to get this out of there, but no dice. There was a hack for removing a module by modifying the active services yml, but it's not listed in the local repo.
Also this seems like part of a bigger problem - https://www.drupal.org/node/2225029
but there is little answer. Someone must know, right?

Try removing the module from your module folder and run rebuild.php

Remove routing file if any or module file such that there is only info file remaining inside your module folder, that way module will exits enabled but won't produce any error due to its faulty code.

Related

Throwing Fatal Error after trying to Login in WordPress project

When i try to login in my project and i got the following exceptions:
Fatal error: Uncaught Error: Cannot create references to/from string
offsets in
C:\xampp\htdocs\wordpress\group-delphi-museums\wp-includes\user.php on
line 56
Error: Cannot create references to/from string offsets in
C:\xampp\htdocs\wordpress\group-delphi-museums\wp-includes\user.php on
line 56
Any ideas ?
can you provide more information please? When did it happen? themes, plugins that may be affecting it. Most likely its a theme issue, if you log into your server or cpannell navigate to /wp-content/themes and delete your theme. Then reinstall 2017 theme, deactavate all your plugins, re-install your theme and use a process of elimination through your plugins to find out the error. If you were editing your theme, you probably just broke it thus no issue with your plugins. It should be sorted then.

2sxc: 404 Error after adding App module on the page. API is missing?

I have a problem when placing an App module(v 8.4.8) on a page. When I placed an App module on a page I got a pop up saying "Had an error talking to the server (status 404). if you are an advanced user you can learn more about what went wrong - discover how on 2sxc.org/help?tag=debug".
This error happens on whatever action I try to do: trying to add and app, refresh page etc.
I checked a communication to the server using Firebug and seems that one of APIs are missing:
~/desktopmodules/2sxc/api/view/Module/GetSelectableApps
Referer: ~/desktopmodules/tosic_sexycontent/dist/dnn/ui.html?sxcver=8.4.8.19191
Did I missed something? Should I make some configuration after SexyContent module install (v 8.4.8)?
I just checked a video by Daniel Mettler where he showed how to install a module and seems that process is simple. Nothing to worry about.
Does anybody has any idea what might went wrong here?
The same actually happens when I install and Content module: Error about missing APIs:
~/desktopmodules/2sxc/api/view/Module/GetSelectableContentTypes
~/desktopmodules/2sxc/api/view/Module/GetSelectableTemplates
Thanks a lot for your time
My best guess is that it's an issue with the dnn domain/path configuration. So basically my guess is that
you have multiple domains, and if this is configured incorrectly, the paths in the js-calls won't fully match the original one
you have sub-portal (with paths like /products/) or something, and this isn't configured correctly in dnn
languages in portal-paths are causing similar issues.
So please compare EXACTLY the full base path and see if that's the issue.

Drupal - White Screen of Death after updates (and login page returning 403 error)

I have just updated a site that is using Drupal and have now experienced the horrible WSOD.
I have searched through Google looking for any sort of solution/error log to help me find and fix the issue but nothing has worked. I have tried adding in the 'display errors' code in the index.php file and looked at the error_log file in the public directory and nothing.
I can not login to the admin page and check any modules as the login page for this is returning a 403 error.
Any suggestions?
Please go to Apache Error log. You will exact error messages there.
The log file's location is different for different OS and versions.
e.g httpd/log/error.log
Maybe your Drupal registry is broken.
Fix this using the registry_rebuild script (this is no module!)
There are times in Drupal 7 when the registry gets hopelessly hosed and you need to rebuild the registry (a list of PHP classes and the files they go with). Sometimes, though, you can't do this regular cache-clear activity because some class is required when the system is trying to bootstrap.
You might get something like:
PHP Fatal error: Class 'EntityAPIControllerExportable' not found in ...sites/all/modules/rules/includes/rules.core.inc on line 11
If this happens when you're trying to run update.php, and happens when you're trying to clear your cache, well, you have some trouble. That's what Registry Rebuild is for.
It also may happen that you've moved some module that Drupal requires to bootstrap, and you get a horrible error. Registry Rebuild will also rebuild the system table to get the modules in the right place so you can bootstrap.
You will need PHP-CLI or drush to run this.
https://drupal.org/project/registry_rebuild

How to Fix Irreversible damage due to a module in Drupal

This has been extremely frustrating. I installed a module Finder in Drupal installation. I was tweaking some settings in it and then after changing some settings it started showing off some Ajax errors and then there was the White Screen, showing this error:
Fatal error: Call to undefined function views_include() in /var/www/drupal/sites/all/modules/views/includes/plugins.inc on line 9
Using Drush, I disabled the Finder module and cleared the cache. But nothing happened. Then I disabled the Views module. The White Screen was now gone.
And now I am stuck. I had some pretty good work done in this site and when I re-enable the Views, White Screen reappears. It seems to me like the Finder module made some irreversible changes somewhere in Views. I mean how come my Views is not working when I've cleared the cache and Finder is disabled?
Has anybody ever come across such a thing in Drupal? How did you solve it?
UPDATE
I just found that the developer of the "Finder" module is claiming it to be a bug in Views. See here: http://drupal.org/node/1611106. As suggested, commenting out that particular line 9 in plugins.inc of Views module does work. However, I'm still skeptical to accept to be a bug in Views.
It's not Finder; it's either Drush botching an update or perhaps you relocating the module, causing the registry to become out-of-date. Check that views.module actually exists, Views is enabled in the system table and then rebuild the registry as nmc suggested.
That should fix it but, at worst, you can comment out the views_include('base'); call at the top of plugins.inc as a quick hack to recover your site.
I just got this error too. Funny enough it was also while playing around with settings in the finder module. Playing with the ajax settings to be precise.
Anyway, to get your site back when you get the error and white screen, close your browser and reopen it a a page other than your site and clear all the browser cache. You should then be able to see your site again.
It happen to me after setting 'Ajax' to 'yes' under the form heading on the edit finder page.
After you have reopened your browser and cleared the browser cache, go straight to the edit page for the finder that is the culprit and set 'ajax' to 'no'.
Perhaps the Registry Rebuild module may help you.
When would you need Registry Rebuild?
You might get something like:
PHP Fatal error: Class 'EntityAPIControllerExportable' not found in
...sites/all/modules/rules/includes/rules.core.inc on line 11
If this happens when you're trying to run update.php, and happens when
you're trying to clear your cache, well, you have some trouble. That's
what Registry Rebuild is for.
I've never used it myself so I recommend that you look into the code before running it but I hope it helps you.
See
http://randyfay.com/node/105 and
http://drupal.org/project/registry_rebuild
For me, rebuilding the registry with drush rr didn't work. Disabling the module, uninstalling ad reinstalling didn't help also. The only thing which worked was to clear the sessions table.

finding out what is causing dreaded "The website encountered an unexpected error. Please try again later." message

while doing a drupal 6 to 7 upgrade I am getting the not so helpful message
"The website encountered an unexpected error. Please try again later." everytime I go to certain pages.
ex) /admin/config
What is the best way to find out what is causing the fatal error so that I can fix it?
All I can think of right now is to start disabling contributed modules until that page works or looking through the logs.
Thanks.
If dlog/watchdog and php error log aren't working, try this:
go on /includes/error.inc
comment line line 245
print theme('maintenance_page', array('content' => t('The website encountered an unexpected error. Please try again later.')));
and put this
print theme('maintenance_page', array('content' => t('The website encountered an unexpected error. Please try again later.'.$fatal.' '.var_export($error,true))));
Very similar, you put var_export($error,true)) at end of error
By clearing the logs at /admin/reports/dblog then reloading the broken page I easily could identify the offending module when I rechecked the log.
Site is working fine now : )
You definitely should be disabling all contrib modules to perform the upgrade.
Then enable them a few at a time after they have been replaced with the D7 version. When replacing the module, be sure to clean out the entire module directory, just in case some old files remain.
This should help narrow down the problem and be sure to check the php error log in case you find something there. (Although that is usually in the case of the White Screen Of Death.)
As gyozo mentioned if you are not able to log into the site, then it might be difficult to debug.
Then probably you could try
Log into database and run delete from watchdog;
Refresh the page
Then execute the database query select variables from watchdog;
Look out for the text near message
Am replying on 8 years old thread. But wanted to share my inputs to fix this error. I am using Drupal 8.*
I faced the same error when I tried to clear the cache (From performance). I tried several things mentioned in most of the blogs or drupal help.
In the end I came to know that, there was some YML formatting issue in my Drupal 8 theme files. I removed tabs and validated my YML files from online YML validator.
In Drupal 8.7 you can do this in core/lib/Drupal/Core/EventSubscriber/FinalExceptionSubscriber.php line 126:
$content = $this->t('The website encountered an error. Please try again later.' . var_dump($error));

Resources