Page 1 of 1

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

Posted: Sat Aug 26, 2006 6:00 pm
by Pix
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;
		};

Re: Component installation doesn't fail

Posted: Tue Oct 17, 2006 2:25 pm
by user deleted
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

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

Posted: Tue Oct 17, 2006 10:16 pm
by RobS
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.

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

Posted: Wed Oct 18, 2006 11:26 am
by diri
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.

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

Posted: Fri Oct 27, 2006 7:59 am
by user deleted
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