[KNOWN ISSUE/LIMITATION] Component installation doesn't fail

Locked
Pix
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Thu Mar 23, 2006 9:57 pm

[KNOWN ISSUE/LIMITATION] Component installation doesn't fail

Post by Pix » Sat Aug 26, 2006 6:00 pm

I was developing a new component, and did a mistake in the xml file writing twice the same file.
The function that install the files fails, but no error is reported and the installation completes "successfully".

I checked the code and found that in the file
administrator\components\com_installer\component\component.class.php
in the function install(...), on line 75 there is:

Code: Select all

		// Find files to copy
		if ($this->parseFiles( 'files' ) === false) {
			return false;
		}
		$this->parseFiles( 'images' );
		$this->parseFiles( 'administration/files','','',1 );
		$this->parseFiles( 'administration/images','','',1 );
So the installation fails only if there is a problem with main files, but it doesn't if the error occurs in images, administration/files or administration/images.

I think that the code should be changed to something like

Code: Select all

		// Find files to copy
		if ($this->parseFiles( 'files' ) === false ||
		    $this->parseFiles( 'images' ) === false ||
		    $this->parseFiles( 'administration/files','','',1 ) === false ||
		    $this->parseFiles( 'administration/images','','',1 ) === false)
                {
			return false;
		};
Last edited by Anonymous on Fri Oct 27, 2006 7:59 am, edited 1 time in total.

user deleted

Re: Component installation doesn't fail

Post by user deleted » Tue Oct 17, 2006 2:25 pm

Hi Pix,

Sorry for the late reply, thanks for the report. Can you let me know on which Joomla! version you experienced this problem?

Thanks and regards Robin


Q&T Note; Status > Under review

User avatar
RobS
Joomla! Ace
Joomla! Ace
Posts: 1366
Joined: Mon Dec 05, 2005 10:17 am
Location: New Orleans, LA, USA
Contact:

Re: [UNDER REVIEW] Component installation doesn't fail

Post by RobS » Tue Oct 17, 2006 10:16 pm

I haven't looked into this in great depth yet but my gut says that it is done that way because the main files are the only ones that are required.  images, administrator files and administrator images are optional.  To properly fix this to error out on no images, etc would require quite a bit of reworking and is not really in the scope of the 1.0.12 release.  I think this is more of a known limitation of the installer component.
Rob Schley - Open Source Matters
Webimagery - http://www.webimagery.net/ - Professional Consulting Services
JXtended - http://www.jxtended.com/ - Free and Commercial Joomla! Extensions

diri
Joomla! Guru
Joomla! Guru
Posts: 702
Joined: Wed Sep 21, 2005 9:27 am
Location: Somewhere

Re: [UNDER REVIEW] Component installation doesn't fail

Post by diri » Wed Oct 18, 2006 11:26 am

I'm not sure about declaring such behaviour a shortcoming or even bug.

It should be of interest of developer to distribute a correct installation sequence for his extension, shouldn't it?

When a user is confronted with installation errors he normally deletes this very extension when rest of system works fine.

user deleted

Re: [UNDER REVIEW] Component installation doesn't fail

Post by user deleted » Fri Oct 27, 2006 7:59 am

Q&T Note;
To properly fix this to error out on no images, etc would require quite a bit of reworking and is not really in the scope of the 1.0.12 release.  I think this is more of a known limitation of the installer component.
Closing report with status KNOWN ISSUE/LIMITATION


Locked

Return to “Known Issues - Archive”