Closed bdalomgir closed 9 months ago
@bdalomgir Are there any other issues showing up in the Backdrop error log or is this the error that is blocking any progress?
Maybe if there are other errors showing up and we fix them, it will help with the bootstrapping process?
@stpaultim I did not find any other errors in the Backdrop error logs, it shows only one error I mentioned above without mentioning the file name or line numbers. Please check the screenshot.
I don't think $conf
is a global variable anymore.
@jenlampton Shared this feedback in Zulip.
I'd remove the line from your settings file (step 3) and try again.
That's not a safe way to include files anyway, and there may be something in that file that's causing issues.
See if the module will install without whatever's in that file.
@bdalomgir - I don't have an answer, but a possible clue. I installed the Object Log module and in file domain.module on line 97, which is just before that error is generated, I added the following line.:
object_log('domain_init:$_domain', $_domain);
Looking in Object Log (admin/reports/object_log
) I see that this is an empty array so somewhere the list of domains is not being loaded, which is triggering that error.
This module could be helpful, but it will only help once backdrop is bootstrapped; no good in the initialization phases.
I've also spotted some Coder Upgrade relics - search for "dynamic variable" . I don't think any of these are the cause though.
@yorkshire-pudding or @bdalomgir
How could it have a list of domains before it's been bootstrapped. This needs to be configured later.
@stpaultim - I'm probably not understanding this but it didn't look like hook_init() is called before bootstrap
@jenlampton
I'd remove the line from your settings file (step 3) and try again.
That line was not there. The Drupal readme suggests adding that line. We've tried it with and without that line and the results are the same.
@bdalomgir or @sudipto68 I just noticed that despite getting that error, the module is installed and has a menu item for configuration (/admin/structure/domain). When I try to go to that page, I get this error.
Fatal error: require_once(): Failed opening required '/app/modules/domain-1.x-3.x/domain.admin.inc' (include_path='.:/usr/local/lib/php') in /app/core/modules/system/system.module on line 2619
Why don't we move on and work on this error and see where it takes us.
@stpaultim - just noticed that your module folder does not match the module machine name. I.e. domain-1.x-3.x
rather than domain
. That may be the problem here as I think I was able to open the admin page and do some stuff there, albeit with errors.
Fatal error: require_once(): Failed opening required '/app/modules/domain-1.x-3.x/domain.admin.inc' (include_path='.:/usr/local/lib/php') in /app/core/modules/system/system.module on line 2619
@yorkshire-pudding I figured that one out myself and was able to resolve the above error.
I'm now this far, but everything I do generates the original error message.
Yes, same one I'm stuck with.
EDIT: Oops, pressed wrong button, subconscious wishful thinking maybe
@stpaultim @bdalomgir I could solve this Domain access failed to load during phase: bootstrap include error by changing this following code in the domain.module file on line no #99.
$_domain = domain_default(TRUE);
// Error handling in case the module is not installed correctly.
if (!isset($_domain['domain_id'])) {
$_domain['error'] = 'bootstrap include';
}
I have just placed the $_domain = domain_default(TRUE);
line before the if condition. Because I think, on the first time we have a default domain, so we can set $_domain = domain_default(TRUE)
. If anything goes wrong and it could not find default domain_id then, it can go to the if block.
I have found another issue, this domain access options form was not showing on the node add/edit form.
I saw that they were checking, if this is node form then show the domain access options form, on all other form it will return nothing, the code was previously like this(on line number #2946 in domain.module file).
// Apply to all node editing forms only.
if (empty($form['#node_edit_form'])) {
return;
}
I have changed the above code to this (But I think only this #node checking is not proper way).
if (empty($form['#node'])) {
return;
}
Because I think in backdrop cms there is no #node_edit_form in node add/edit form. After this change the domain access options is showing on node add/edit forms.
I have found another issue after installing this module, if we don't save this configuration then the default domain won't get saved and so that default domain was not showing on the domain list page. A default domain creates but just not show on the domain list page if we don't save this configuration after installing the module.
@sudipto68 - It was my experience last week, that the new domain does not show up on list immediately. But, eventually it did show up.
@sudipto68 - Can you create a Pull Request with the changes you made here?
@sudipto68 - Thanks for your work on this; I look forward to testing your PR. Minor point, please can you put code snippets in rather than screenshots of code snippets.
Open with
```php
and close with
```
and GitHub does syntax formatting
@sudipto68 and @bdalomgir - I'm going to close this issue for now, because I think the PR we just merged is at least a temporary fix. Let's move on to other issues.
We are trying to help with the port of this module and are looking for help solving this problem.
I tried to install the domain module multiple times and each time I found the following error, seems we are stuck over here.
Steps to reproduce:
include BACKDROP_ROOT . '/modules/domain/settings.inc';
$conf['domain_hide_errors'] = TRUE;
Still, the error persists mentioned in step 5.
Any thoughts or suggestions for how we resolve (debug) this issue and move on to the next?