Hello, 

I got to migrate a website which is created in Drupal 8 and it's located in one of the Ubuntu server. I'm trying to migrated it to Drupal 8.2.6 in CentOS.

I have manually setup LAMP on CentOS. I was able to access php, Drupal and apache from the browser. Then I took a back up of previous Drupal DB with the help of "Backup and Migration" module. On the current Drupal, I have imported the DB using "import" in phpmyadmin and copied all the config files from previous Drupal server to the current in the Drupal directory. 

From the time, the DB and the config files are brought into the new Drupal server, the website has stopped working. 

I get an error " The website encountered an unexpected error. Please try again later. " whenever I try http://myip/drupal

Any leads on this would be appreciated. 

Thanks,

Vijay

 

  

Comments

VM’s picture

did you edit settings.php to update the related database connection parameters?

Anything in related logs? Drupal watchdog table, apache or php logs?

V J’s picture

Hi, 

Thank you for responding. 

No. I haven't changed anything in the settings.php. 

I see my db info by default: 

 'database' => 'xxx',
  'username' => 'xxx',
  'password' => 'xxx',
  'prefix' => '',
  'host' => 'localhost',
  'port' => '3306',
  'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
  'driver' => 'mysql',
);

are all set. No change yet. Anything else needs to be modified under settings.php?

And yes,  I found this one under /httpd/error_log

" Uncaught PHP Exception RuntimeException: "Unable to determine class for field type 'simplenews_issue' found in the 'field.storage.node.simplenews_issue' configuration" at /var/www/html/drupal/core/modules/field/src/FieldStorageConfigStorage.php line 157  "

 when I go to line 157, it says

" throw new \RuntimeException("Unable to determine class for field type '{$record['type']}' found in the '$config_id' configuration");  "

Also, where can I get Drupal watchdog logs?

Thanks

V J’s picture

I'm able to browse phpmyadmin in the browser though. But not the website. 

VM’s picture

nothing else would need to be altered in settings.php.

phpmyadmin to check watchdog table and empty all cache tables.

I'd research the error posted above in the simplenews.module issue queue.

V J’s picture

Didn't get any solution to that error. 

I tried researching on the error from past 3 days. I couldn't find any resolution to it. 

I'm new here to Drupal. Could you help me out in getting thru it. 

Thanks in Advance. 

Jaypan’s picture

Did you clear the cache tables as recommended by VM?

Also check to ensure that all your files were properly migrated. It may be a missing file.

V J’s picture

Yes, I did. 

MariaDB [(none)]> flush query cache;
Query OK, 0 rows affected (0.00 sec)
 

I believe I have imported all the files. 

Note: I'm trying to migrate from mysql to mariadb. Will it cause any difference or issues?

mmjvb’s picture

Suggest to read more carefully:

and empty all cache tables

This is about truncating all tables that start with <prefix>cache_
Nothing to do with how the RDBMS works, it is about how Drupal caches. To be honest, the content of these tables shouldn't have been imported (exported). They contain runtime data, not be used when changing the underlying infrastructure.

Even when building the site, it is the first step in troubleshooting when something appears not to be working.  

V J’s picture

   I tried Truncating the tables starting with cache_. 

"

MariaDB [drupal8]> show variables like 'cache';
Empty set (0.00 sec)

MariaDB [drupal8]> SHOW VARIABLES LIKE 'cache_';
Empty set (0.00 sec)

MariaDB [drupal8]> TRUNCATE cache_data;
Query OK, 0 rows affected (0.01 sec)

MariaDB [drupal8]> TRUNCATE cache_dynamic_page_cache;
Query OK, 0 rows affected (0.01 sec)   "

So does that mean that there are no cache present? (How can that be possible?)

What could be a way to get this working?

mmjvb’s picture

Suggest to use SHOW TABLES LIKE 'cache_';

But, because you can't trust the result, use SHOW TABLES; and filter visually on cache_.

cache_bootstrap                             |
| cache_config                                |
| cache_container                             |
| cache_data                                  |
| cache_default                               |
| cache_discovery                             |
| cache_dynamic_page_cache                    |
| cache_entity                                |
| cache_menu                                  |
| cache_page                                  |
| cache_render                                |
| cache_toolbar   
V J’s picture

Truncating all the 'cache_ ' tables worked and got rid of the error “ The website encountered an unexpected error. Please try again later.  “

It takes me to the website but it's just the plain website with no style. I can see the contents from old DB but Drupal style is missing. 

 What could be causing the style to miss?

V J’s picture

It worked like a charm. It took me days to resolve this. Thank you very much!!

V J’s picture

It's just that images are missing. Everything else looks good except images. 

VM’s picture

view the source and review the URL to images. Does the url align properly with the moved site?

V J’s picture

Perfect! But for some reason, not all the images file paths are getting changed except few. When I try to change the file path it still shows me the old path. 

Also, when I upload new images from Drupal, it says "Cannot upload". 

I have the set the file permissions as 777 for /files. 

VM’s picture

You'll need to elaborate on how your image handling is being accomplished? what modules? are the images in file fields? etc.

V J’s picture

Sorry for the delay. The problem got fixed. It was permission issue.