No Code Attached Yet
avatar sergeytolkachyov
sergeytolkachyov
3 Dec 2022

It is assumed that <libraryname> is the name of the folder and the name of the xml manifest file. So <libraryname> should be 'mylib', the name of the folder in libraries will be 'mylib', the name of the manifest file is "mylib.xml ". The 'mylib' folder will contain the 'src' folder, which we specify in the path attribute of the <namespace> element.

However, we have the ability to specify a <libraryname> of the form "iAmALibraryVendor/MyLib". If <libraryname> is specified in such a way that the library will be installed in the "libraries/iAmALibraryVendor/MyLib" folder. In Joomla 3, we registered namespace using a system plugin. We could install different sets of independent libraries in our "iAmALibraryVendor" folder, varying from project to project. Everything was ok. In Joomla 4, the installation of a library with such a <libraryname> occurs correctly. If you register namespace in the old way using the system plugin, then everything is ok.
But, we have the <namespace> element and we cannot use it in this case, since we cannot specify a slash in the name for the xml manifest file name. But this is necessary in order for the manifest file to load when updating the namespaces map.

See libraries/namespacemap.php function getNamespaces

private function getNamespaces(string $type): array

Steps to reproduce the issue

Expected result

Actual result

System information (as much as possible)

Additional comments

avatar sergeytolkachyov sergeytolkachyov - open - 3 Dec 2022
avatar joomla-cms-bot joomla-cms-bot - change - 3 Dec 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 3 Dec 2022
avatar SharkyKZ
SharkyKZ - comment - 3 Dec 2022

#39348 should fix this.

avatar richard67 richard67 - close - 3 Dec 2022
avatar richard67
richard67 - comment - 3 Dec 2022

Closing as having a pull request. Please test #39348 . Thanks in advance.

avatar richard67 richard67 - change - 3 Dec 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-12-03 12:01:35
Closed_By richard67
avatar sergeytolkachyov
sergeytolkachyov - comment - 5 Dec 2022

Closing as having a pull request. Please test #39348 . Thanks in advance.

Tested #39348 successfully.

Add a Comment

Login with GitHub to post a comment