Hi

Following on from:

https://forum.backdropcms.org/forum/migrate-bd-bd

I'm getting the following error in the Status Report:

If I click on the convert link I get:

Looking at the server setup on my ISP:

and

Or do I just ignore the error and carry on?

KR
Mike

Accepted answer

OK, add this:

 

$databases = array (
  'default' => 
  array (
    'default' => 
    array (
      'database' => 'mrkdemom_back819',
      'username' => 'username',
      'password' => 'password',
      'host' => 'localhost',
      'port' => '',
      'driver' => 'mysql',
      'prefix' => 'bd63_',
    ),
  ),
);

Comments

You may have found a bug in Backdrop. Some time ago Backdrop started allowing a simplified syntax for database definition in settings.php. It may be the case that the simplified syntax is causing that fatal error you saw, in system_utf8mb4_convert_form_submit().

Can you please post your database definition from settings.php? Obviously please remove the username and password from there.

This what you need?

$database = array(
  'database' => 'mrkdemom_back819',
  'username' => 'username',
  'password' => 'password',
  'host' => 'localhost',
  'prefix' => 'bd63_',
);

 

Yes. Can you try switching to the "complex" syntax and see if that helps? In this case it will be:

$databases = array (
  'default' => 
  array (
    'default' => 
    array (
      'database' => 'mrkdemom_back819',
      'username' => 'username',
      'password' => 'password',
      'host' => 'localhost',
      'prefix' => 'bd63_',
    ),
  ),
);

Notice the variable name $databases  (remove $database)

Pasted in and added username & Password. Settings updated. Now get this when I browse to the site:

 

 

OK, add this:

 

$databases = array (
  'default' => 
  array (
    'default' => 
    array (
      'database' => 'mrkdemom_back819',
      'username' => 'username',
      'password' => 'password',
      'host' => 'localhost',
      'port' => '',
      'driver' => 'mysql',
      'prefix' => 'bd63_',
    ),
  ),
);

Sorted. Status Report no longer has the error.

OK, so, did you use what I suggested to fix it? Can you be more specific? If you did, then this is a bug that needs to be reported in the issue queue. Please verify.

Yes, I added the port and driver lines and reloaded the website and the Status Report no longer has the error. I am unable to check the conversion link as I can no longer see it.

Thanks. Would you please file an issue at https://github.com/backdrop/backdrop-issues/issues?

The idea there is to say that a site that uses a DB prefix defined in the simplified database definition syntax creates a false report of "Database needs conversion" to 4-byte UTF-8 support. Also, running a conversion throws that fatal error.

Thank you for reporting this!