Hello

I have a D8.1.0 site running on a "old" server : Ubuntu 14.04 LTS with PHP 5.5

I want to move to a new sever : Ubuntu 16.04 LTS with PHP 7.0

I make a drush backup
and a drush restore on a new server.

I make drush cr before trying to access to the site.

But I receive error message :

The website encountered an unexpected error. Please try again later.

In the Apache2 log :

[Sun May 01 15:37:48.449412 2016] [:error] [pid 1281] [client 87.66.35.0:59742] Uncaught PHP Exception Drupal\\Component\\Plugin\\Exception\\PluginNotFoundException: "The "" plugin does not exist." at /home/mysite/public_html/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php line 52

No idea... as I only "drush backup / restore" ...

Thanks
;-)

Comments

harsh.behl’s picture

Same Issue But with no luck, in my case I am getting this error on file/image upload.

harsh.behl’s picture

Resolved In My case GD Library andImage toolit was not installed, on the server so please if any one finds this type of issue please check your logs or status report in reports section. It can be a server configuration issue.

Cyclonecode’s picture

Same here, my problem was also that the correct gd library was not installed since I just updated to php7.1 on my server. Installed the needed extension by executing `sudo apt-get install php7.1-gd`

Vivek Panicker’s picture

I too had the same problen. Was solved by installing the php gd library. Thank you for the suggestion.

Jitujain’s picture

Yes, in my case GD library was not installed. After installing it , it is working fine.

rich_dawson’s picture

I am experiencing the same issue when visiting the user settings page only. No idea when this started exactly, or what modules may be involved as the error is very unhelpful. Server logs on NGINX are non-existent for this particular error on my local machine. No errors reported on host servers either.

harsh.behl’s picture

This issue is particularly come inthe absence of any module either php or drupal, in my case it came due to the missing of image tool kit, gd library which was being used to upload images. In your case on user settings page there will be any module or php extension that may be missing, you need to dig into this yourself, One important thing you can recheck with admin/reports/status report section in admin panel. If any php extension is missing taht will be highlighted there otherwise it is purely module missing error.

Hope this helps.......

hugronaphor’s picture

This was my case after switching to ppa:ondrej/php
So, sudo apt-get install php5.6-gd fixed the issue in my case.

Thanks

Strompf’s picture

Hi folks,

Thank you for the solution, Hugronaphor! I had a similar problem: In Drupal Commerce 8, I couldn't upload images without running into this error.

This webserver is only a couple of months old. I started with PHP 7.1, but when that was too challenging for my patience, I switched back to PHP 7.0, but I forget to install the relevant libraries, including GD: I had the PHP 7.1 library, but only the needed PHP 7.0 library, after sudo apt-get install php7.0-gd

marquillo’s picture

Thank you very much!

This was the solution for me too.

r0ber’s picture

I was dealing with this issue for a long time, problem solved with "sudo apt-get install php5.6-gd"
Many thanks,

Vivek Panicker’s picture

Try installing a new Drupal site. If some php module is missing, which is most probably the case, then it will be visible in the list of requirements. 

I had just update to php7.0 and the gd library was missing. So I read the comments above and installed it and the site was working fine.

Then I got the idea of doing a new drupal installation to check if any php module required by Drupal is missing.

baltazarz3’s picture

Had the same problem with drush version: 8.1.15 on a Drupal 8.4.2 site, php 7.1. This got fixed by installing GD library
 

fazni’s picture

For PHP 7.2 sudo apt-get install php7.2-gd

For PHP 7.1 sudo apt-get install php7.1-gd

nexgeninnovators’s picture

This error comes when Drupal isn't getting some required configuration active to work. Like GD library updated version - which is being used by imageToolkit.

One solution - You have to resolve all issues in admin status - admin/reports/status

and things will be set!

Common error:

1. gd library not installed or outdated:

First, check your package using php -m

In list gd should be there - but sometimes it's outdate. to update check your php version. e.g I'm using php 7.0 then

To install PHP GD extension on an Amazon Linux AMI server, with php 7:
sudo yum install php 70-gd

For all who use php 7 and ubuntu
sudo apt-get install php7.0-gd

Do remember to restart Apache after the installation!
sudo service httpd restart

for more you can follow official documentation - https://www.php.net/manual/en/image.installation.php

After doing this - 

go back to the issue list in the admin panel and refresh the page. If the issue removed - you are done!

2. files are not writeable

go in root folder of your project and run following command:

chmod -R sites/default/files (It will make files and it's child folders writable)

No need server restart.

go back to the issue list in the admin panel and refresh the page. If the issue removed - you are done!

About NexGen
We are a community of young developers and providing quality support and IT services for drupal lovers. You can visit https://www.nexgi.com/ to hire us for help in your drupal project. Or you can reach to me directly via skype @kumaranup594

Didier Misson’s picture

Hello

Probably not GD problem, as I know that GD (php7-gd) is need for all sites.

or the folders permissions, I don't know.

It's a long time ago, but sure I will check folders permissions next time I will have this kind of problem.

Thanks

Merry Christmas

samhaldia’s picture

check errors at /admin/reports/status#error   to resolve issues