Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
In Drupal 7 you can get the location of a module/profile even if it's not installed . Now we lost this feature. Moreover this is not true for themes. In D8 you can still detect uninstalled theme locations. The attached test proves this regression.
We need the ability to localize also uninstalled modules/themes/profiles. At least this is useful for #1308152: Add stream wrappers to access extension files.
Proposed resolution
Fix.
Remaining tasks
None.
User interface changes
None.
API changes
None.
Data model changes
None.
Comment | File | Size | Author |
---|---|---|---|
drupal_get_filename.patch | 3.42 KB | claudiu.cristea | |
Comments
Comment #2
claudiu.cristeaOuch.
Comment #7
dawehnerThis could also be resolved as part of #2208429: Extension System, Part III: ExtensionList, ModuleExtensionList and ProfileExtensionList
Comment #8
cilefen CreditAttribution: cilefen commented@claudiu.cristea Thank you for noticing this and for the test.
At a meeting of the core committers, it was decided to downgrade this and to move it to the extension system. My view is that as written, this issue doesn't make a case for its being major priority, so I have tagged it for a summary update. @effulgentsia expressed concern this could have surfaced a possible race condition depending on whether system_rebuild_module_data() was called before or not. If that can be shown to be the case, a re-evaluation of priority is in order.
Comment #17
quietone CreditAttribution: quietone at PreviousNext commenteddrupal_get_filename was removed in #2347783: Deprecate drupal_get_path() and drupal_get_filename() and replace with ExtensionList::getPath() and ExtensionList::getPathname().
I tested this in Drupal 9.4.x and was not able to reproduce the problem.