Drupal Version
9.3.9
Domain module version
1.0-beta6
Expected Behavior
[What did you try to do? What URL did you use to do it?]
Install domain_content module without explicitly enabling domain_access
Actual Behavior
[What actually happened?]
Error: Class 'Drupal\\domain_access\\DomainAccessManagerInterface' not found in /home/www/domainsite/web/modules/contrib/domain/domain_content/domain_content.install on line 24 #0 [internal function]: domain_content_requirements()
Steps to reproduce
[A bullet list of steps to reproduce the error. Note if the error always happens or sometimes happens.]
Install domain on its own first, and then try to install domain_content on its own.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | domain-domain-install-fatall-error-for-windows-os-3272765-12.patch | 646 bytes | levmyshkin |
| #5 | 3272765-domaincontent-install-fatal-5.patch | 1.58 KB | aimai |
Issue fork domain-3272765
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3272765-domaincontent-install-fatal
changes, plain diff MR !14
Comments
Comment #2
brad.bulger commentedThe problem is that other module classes are not available in the 'install' phase of hook_requirements():
Directly including the necessary class file, and then using the full path to the constant instead of the 'use' statement, works:
Comment #5
aimai commentedAttached a copy of the current status of the MR as a patch.
Comment #6
tostinni commentedWorking fine for us, switching to needs review to trigger the tests.
Comment #7
agentrickardWell that's just odd.
Comment #9
agentrickardI guess tests always passed because the installer explicitly installs domain_access first....
Merged.
Comment #12
levmyshkinI have a Fatal error in Windows OS, because of slashes instead of backslashes. DIRECTORY_SEPARATOR helps to solve it. Attached a patch.
Error: Failed opening required 'C:\Repos\X2\home\doc9.site.com\web\modules\contrib\domain\domain_content./../domain_access/src/DomainAccessManagerInterface.php' (include_path='C:\Repos\X2\home\doc9.site.com\vendor/pear/archive_tar;C:\Repos\X2\home\doc9.site.com\vendor/pear/console_getopt;C:\Repos\X2\home\doc9.site.com\vendor/pear/pear-core-minimal/src;C:\Repos\X2\home\doc9.site.com\vendor/pear/pear_exception;.;C:/Repos/X2/data/PHP-8.3-FCGI/default/composer') in domain_content_requirements() (line 13 of modules\contrib\domain\domain_content\domain_content.install).