ui_patterns
ui_patterns copied to clipboard
Issue #267: Don't store absolute base path to avoid cache issues.
This should resolve the issue discussed in #267. By moving the str_replace of the drupal root to earlier in the process, it keeps it from being cached in the cache_discovery table, which avoids problem when code is deployed on a cloud environment and the storage binding changes in the path on the server.
A cleaner way to do this: Change this line in \Drupal\ui_patterns_library\Plugin\Deriver\LibraryDeriver::getExtensionLocations that adds this prefix in the first place (and maybe clean up the 'root' property):
$this->extensionLocations[$this->root . DIRECTORY_SEPARATOR . $extension->getPath()] = $name;