In src/Form/AutoTranslatorSettingsForm.php line 93
$media_types = $this->entityTypeManager
->getStorage('media_type')
->loadMultiple();
This would seem to assume that the core 'media' module is installed, yet that module is not listed as a dependency.
Solution:
if($this->moduleHandler->moduleExists('media')) {
$media_types = $this->entityTypeManager
->getStorage('media_type')
->loadMultiple();
}
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | Screenshot 2024-06-18 at 2.03.28 PM.png | 189.05 KB | kalpanajaiswal |
| #4 | Screenshot 2024-06-18 at 2.03.19 PM.png | 217.2 KB | kalpanajaiswal |
| #4 | Screenshot 2024-06-18 at 2.02.54 PM.png | 139.73 KB | kalpanajaiswal |
| #4 | media-dependency-updated-3454786-4.patch | 498 bytes | kalpanajaiswal |
Issue fork auto_translation-3454786
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:
- 3454786-media-dependency
changes, plain diff MR !1
Comments
Comment #4
kalpanajaiswal commentedBoth Patch and MR have been created to address the issue.
Comment #5
kalpanajaiswal commentedComment #6
bigbabertHi @kalpanajaiswal thank for the notice, i'll fix this weekend, not adding dependency but adding the control if media module is enabled before the relative translation logic.
Comment #9
bigbabertComment #10
bigbabertComment #11
bigbabertComment #13
bigbabert