Closed yorkshire-pudding closed 6 months ago
@yorkshire-pudding @stpaultim I could recreate this. I tried to debug, why this is happening and I found that these blocks of code(on domain.admin.inc file line number 57) are not running when we install the module.
while ($domain = $result->fetchAssoc()) {
if(!empty(domain_api($domain))) {
$domains[$domain['domain_id']] = domain_api($domain);
}
}
That's Why it is not getting the default domain in the list and goes to this code
if (empty($domains)) {
$form['error'] = array(
'#markup' => t('No domains have been configured. <a href="!url">Add a new domain</a>.', array('!url' => url('admin/structure/domain/create'))),
);
return $form;
}
But When we save the settings page configuration then the above code while ($domain = $result->fetchAssoc())
runs and we get the default domain in the domain list.
@yorkshire-pudding and @sudipto68
I think that this problem was the result of some inaccurate default settings in default config file. See: https://github.com/backdrop-contrib/domain/issues/19
@yorkshire-pudding See if this is still a problem.
I think this is now fixed.
This is with the diff from #12 added.
Steps to reproduce
domain
)admin/structure/domain
Expected result Current domain is populated as primary domain
Actual result Domain list is empty although primary domain is visible on
admin/structure/domain/batch
admin/structure/domain/settings
Save
admin/structure/domain
Primary domain is now listed here.