Component installation issue with more than one manifest file
87 views
Skip to first unread message
tampe125
unread,
May 9, 2012, 12:41:43 PM5/9/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to joomla-...@googlegroups.com
Ok, this thing is kinda weird, but i think Joomla devs should take care o (sooner or later).
This is the situation: you
have a component that uses a library (in this case FrameworkOnFramework
developed by Nicholas of Akeeba - sorry man, i always forget your
surname-), so you should install it within your component installation.
My first thought was: - Let's do a package. Wrong! Since when you uninstall the package, you'll remove the library too, breaking any other extension that's using it. Moreover,
as far as I know, there is no way to check if the installed version is
newer than the one shipped with my component. This is very bad, since I
could overwrite the existant library with an older one (!!!)
So I have to do a trick: on postflight event, i call the JInstaller object and install it "manually".
Me
and Nicholas were trying to do that, but he got not problems while I
get some weird result: I keep installing the FOF library instead of my
component!
So I started debugging (God bless Eclipse) and I found an embarassing thing. Joomla!
starts searching for a manifest file, so he builds a stack of xml
files. But (and this is the weird thing)... it sorts the elements
alphabetically!!
Yep, that's right. So, in Nicholas component, everything worked fine since he had this folder structure: akeeba.xml backend (folder) `- access.xml `- config.xml [...] fof `- lib_fof.xml
Starts looking for a manifest file:
[0] access.xml not manifest file!
[1] config.xml not manifest file!
[2] lib_fof.xml Pass! Let's use it!
[3] j4schema.xml
So, I know this is a particular case, but I think we should take care of, since in the future more libraries will come.
Nicholas K. Dionysopoulos
unread,
May 9, 2012, 12:51:54 PM5/9/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to joomla-...@googlegroups.com
A quick fix (which just occurred to me) is that you could rename the fof directory to zzz_fof, forcing it to be scanned after j4schema.xml. Of course that's a stupid, crude approach. Another approach which I think wouldn't work in Joomla! 2.5 is renaming your component's manifest to com_j4schma.xml. Of course, the expected behaviour for JInstaller would be sorting the manifest files by path depth, alphabetically. This way the stack's order would be:
- access.xml
- config.xml
- j4schema.xml
- fof/lib_fof.xml
Sam Moffatt
unread,
Jun 5, 2012, 12:05:49 PM6/5/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to joomla-...@googlegroups.com
I think you will find the actual behaviour is operating system
dependent. I'm guessing you're using Windows which internally sorts
everything alphabetically however not all platforms behave this way.
Do a search through the various archives and you'll find references to
a similar problem.
Putting in a sort is probably not a bad idea to at least make it
consistent across the OS and resolve this particular problem.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to joomla-...@googlegroups.com
Hi Sam,
For what is worth, I've confirmed that using both Windows and Mac OS X (I didn't try on Linux). A sort would definitely be a good idea, making the behaviour consistent throughout all platforms.