Hi all,

I am currently testing a migration of a Drupal 7 site and post migration I have a large number of notices turning up in the logs and on screen. I assume there is something in the migrated data or structure that is causing the issue but I really don't know where to start looking? Can anyone offer some incite as to why they are appearing and how to fix it. 

If I navigate to the status report or dashboard I get two notices

  • Notice: Undefined index: name in system_requirements() (line 33 of W:\wwwroot\backdrop\core\modules\system\system.install).
  • Notice: Undefined index: version in system_requirements() (line 35 of W:\wwwroot\backdrop\core\modules\system\system.install).

If I navigate to the Modules page I get a additional notice

  • Notice: Undefined index: distribution_name in backdrop_install_profile_distribution_name() (line 222 of W:\wwwroot\backdrop\core\includes\install.inc).

The rest of the website appears to be working and I can edit content without notices on those screens.

Drupal version was 7.77

Backdrop version is 1.17.4

I tried flushing the cache just in case but that did not make any difference.

I have added some screenshots below

Accepted answer

Hmm, it appears this is a bug: https://github.com/backdrop/backdrop-issues/issues/4799

That function should return 'Backdrop CMS' if the profile doesn't have a 'distrubution name' set. As it is, the profile doesn't set a name, and 'Backdrop CMS' isn't being returned, so you get that notice displayed...

It's safe to ignore it, though I realise it's annoying. If you're ok patching core you can try applying this fix and let us know if that works for you: https://github.com/backdrop/backdrop/pull/3436/files

Most helpful answers

Hi bevan,

do you have access to the database? I see a "::1" in one of your screenshots and assume "yes". ;-)

If you have phpmyadmin installed, try to figure out, which profile is enabled by inspecting the Backdrop "system" table:

SELECT * FROM `system` WHERE `filename` LIKE '%profile'

Check "status" column - is it "0" or "1"?

Also check your system.core.json. Go to admin/config/development/configuration/single/export and select "Configuration" and "System core settings".

That should contain a line with "install_profile". What is it set to?

If both, the database and config, have the same profile set, and it's either "minimal" or "standard", but its status is "0" you can fix the notices by setting the status to "1" in the database.

I'm assuming this is no live site (yet) and you have backup of everything.

Comments

This is related to using an install profile/distribution I believe. Is that how the D7 site was originally setup, with a different install profile or distribution?

If so, this issue might be some help: https://github.com/backdrop/backdrop-issues/issues/2518 It contains some advice about how to possibly change this to remove the notices.

Thanks for the reply,

I checked the install profile, and in Drupal 7 it was "Minimal (minimal-7.77)".  I did notice that the profile was mentioned in the migrate instructions but was not aware of any way to change it from minimal to standard.

Thanks for the link to the issue. I tried the suggestion from there to edit the system.core.json file and changed the install_profile setting to "standard" and now 2 of the 3 errors have disappeared but I still have one notice that occurs every time I go to the Modules page.

Notice: Undefined index: distribution_name in backdrop_install_profile_distribution_name() (line 222 of W:\wwwroot\backdrop\core\includes\install.inc).

EDIT: I have just realised that since the migration I have also lost the ability to install and update modules and the same for themes.  Those two options are no longer listed in the admin menu for functionality or appearance?

Here is a list of the installed contrib modules in case that gives some additional clues.

Is there any other info I can provide to assist?

Olafski's picture

since the migration I have also lost the ability to install and update modules and the same for themes.

Hi bevan, maybe the "Project Installer" isn't enabled. Have a look at admin/modules?search=project, and enable it. This should make the installation and update pages work again.

Yep that was 100% the issue with the Modules and themes having no install or update, Thanks 

Still getting the Undefined index error though when I go to the Modules list?

  • Notice: Undefined index: distribution_name in backdrop_install_profile_distribution_name() (line 222 of W:\wwwroot\backdrop\core\includes\install.inc).

 

Hmm, it appears this is a bug: https://github.com/backdrop/backdrop-issues/issues/4799

That function should return 'Backdrop CMS' if the profile doesn't have a 'distrubution name' set. As it is, the profile doesn't set a name, and 'Backdrop CMS' isn't being returned, so you get that notice displayed...

It's safe to ignore it, though I realise it's annoying. If you're ok patching core you can try applying this fix and let us know if that works for you: https://github.com/backdrop/backdrop/pull/3436/files

A big thankyou to BWPandaOlafski and klonos  for all of your help, Between you, you have solved all of the issues I had post migration,

I applied the patch suggested by BWPanda to resolve the final notice and it all seems to be working correctly.  Since applying the patch I have not seen any notices on screen or in the logs.

I can now continue exploring Backdrop as an alternative to D8. 

Thanks again, it nice to find a product forum where you get quick, solid advice on an issue. 

indigoxela's picture

Hi bevan,

do you have access to the database? I see a "::1" in one of your screenshots and assume "yes". ;-)

If you have phpmyadmin installed, try to figure out, which profile is enabled by inspecting the Backdrop "system" table:

SELECT * FROM `system` WHERE `filename` LIKE '%profile'

Check "status" column - is it "0" or "1"?

Also check your system.core.json. Go to admin/config/development/configuration/single/export and select "Configuration" and "System core settings".

That should contain a line with "install_profile". What is it set to?

If both, the database and config, have the same profile set, and it's either "minimal" or "standard", but its status is "0" you can fix the notices by setting the status to "1" in the database.

I'm assuming this is no live site (yet) and you have backup of everything.

Thanks for all the info, The post that BWPanda linked was along this same line and I had edited the settings.core.json file using the instructions there.

As soon as I changed the install_profile setting in settings.core.json to "standard" it fixed the first two Undefined Index issues.

Out of interest I checked the setting you mentioned in the database and found that there were two profiles "minimal" and "standard" and both profiles had a status of 0?

Thanks to all of the help provided by the various responses I have now resolved all of the issues I had post migration.

Thanks

 

 

indigoxela's picture

Out of interest I checked the setting you mentioned in the database and found that there were two profiles "minimal" and "standard" and both profiles had a status of 0?

Right. As you now set the config value to "standard", setting the status value for the standard profile to "1" should also fix the undefined notice distribution_name issue (without additional patch).

I'm currently exploring possible solutions for this to make additional steps after the upgrade unnecessary. Many thanks for reporting!