? Error

User tests: Successful: Unsuccessful:

avatar b92
b92
2 Aug 2014

Copy description from http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=34035&start=0

Issue

Errors uninstalling partially a package & reinstallint it (see how to reproduce) :
Into the Backend you will have the Warning messages :

Warning

JFolder: :files: Path is not a folder. Path: /administrator/components/com_mycomponent
JFolder: :files: Path is not a folder. Path: /administrator/components/com_ mycomponent
JInstaller: :Install: Cannot find XML setup file
JFolder: :files: Path is not a folder. Path: /components/com_ mycomponent
JFolder: :files: Path is not a folder. Path: /components/com_ mycomponent
JInstaller: :Install: Cannot find XML setup file

And into the apache error log :

Warning: array_unique() expects parameter 1 to be array, null given in \site-joomla33\libraries\cms\installer\installer.php on line 1873, referer: http://localhost/site-joomla33/administrator/index.php?option=com_installer

Testing

Have a Joomla package with a component and plugin

Uninstall the component ‘only’ (not the package) using Extensions/Manager (you will keep the package and plugin)

Reinstall the whole package (which include the extension: component & plugin)

You will have the error (displayed & error log)

avatar b92 b92 - open - 2 Aug 2014
avatar b92 b92 - change - 2 Aug 2014
Title
Update installer.php
[#34035] Update installer.php
avatar jissues-bot jissues-bot - change - 2 Aug 2014
Title
Update installer.php
[#34035] Update installer.php
Labels Added: ? ?
avatar Bakual Bakual - change - 2 Aug 2014
Title
[#34035] Update installer.php
[#34035] Errors uninstalling partially a package & reinstalling it 
avatar Bakual
Bakual - comment - 2 Aug 2014

I don't like having errors suppressed in the code. There must be a better way doing that.

avatar b92
b92 - comment - 2 Aug 2014

3 proposals

*With transtipage
Into the merge
$xmlfiles = array_unique(array_merge((array)$parentXmlfiles, (array)$allXmlFiles)) : false;

Or better when setting the 2 variables
$parentXmlfiles = (array) JFolder::files($this->getPath('source'), '.xml$', false, true);
$allXmlFiles = (array) JFolder::files($this->getPath('source'), '.xml$', 1, true);

  • With checks $xmlfiles = (is_array($parentXmlfiles) && is_array($allXmlFiles)) ? array_unique(array_merge($parentXmlfiles, $allXmlFiles)) : false;

Let me know which of the 3 solutions is your favorite, or may be another one.

avatar Bakual
Bakual - comment - 2 Aug 2014

I'd use

$parentXmlfiles = (array) JFolder::files($this->getPath('source'), '.xml$', false, true);
$allXmlFiles = (array) JFolder::files($this->getPath('source'), '.xml$', 1, true);

It actually looks like JFolder::files() has a bug in that it returns false when it fails. It should always return an array according to docblock (http://api.joomla.org/cms-3/classes/JFolder.html#method_files).

avatar b92
b92 - comment - 2 Aug 2014

So may be it's better to fix it ? and change into /libraries/joomla/filesystem/folder.php line 510
return false;
with
return array();

no (but risk of compatibility if there some test with null instead of empty(), I didn't found but ... ) ?

avatar Bakual
Bakual - comment - 3 Aug 2014

Imho, it would be the best fix. There is a small backward compatibility risk if someone explicitely checks for false. However I'd say most developers just use a boolean check or empty() and that would give the same result with an empty array.

avatar b92 b92 - reference | - 3 Aug 14
avatar b92 b92 - change - 3 Aug 2014
Title
[#34035] Errors uninstalling partially a package & reinstalling it 
[#34035] Errors uninstalling partially a package & reinstalling it
avatar b92 b92 - change - 3 Aug 2014
Title
[#34035] Errors uninstalling partially a package & reinstalling it 
[#34035] Errors uninstalling partially a package & reinstalling it
avatar b92
b92 - comment - 3 Aug 2014

deleted the @ into libraries/cms/installer/installer.php
return array() into /libraries/joomla/filesystem/folder.php line 510

avatar Bakual
Bakual - comment - 3 Aug 2014

I like that! Thanks!

avatar nicksavov nicksavov - change - 21 Aug 2014
Title
[#34035] Errors uninstalling partially a package & reinstalling it 
[#34035] Errors uninstalling partially a package & reinstalling it
Labels Removed: ?
avatar brianteeman brianteeman - change - 21 Aug 2014
Status New Pending
avatar brianteeman brianteeman - change - 2 Sep 2014
Title
[#34035] Errors uninstalling partially a package & reinstalling it 
[#34035] Errors uninstalling partially a package & reinstalling it
avatar jissues-bot jissues-bot - change - 17 Oct 2014
Title
[#34035] Errors uninstalling partially a package & reinstalling it
Errors uninstalling partially a package & reinstalling it
avatar brianteeman brianteeman - change - 17 Oct 2014
Category Installation Libraries Updating
avatar brianteeman brianteeman - change - 17 Oct 2014
Title
[#34035] Errors uninstalling partially a package & reinstalling it
Errors uninstalling partially a package & reinstalling it
avatar b92
b92 - comment - 26 Oct 2014

The actuel status for this error is 'pending' Error (into red)! Is there anything to do?

This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4057.

avatar Bakual
Bakual - comment - 26 Oct 2014

Try adding good testing instructions so people know how and what to test.

avatar b92
b92 - comment - 26 Oct 2014

Hi, the question was: what is the cause of Error — 'The Travis CI build could not complete due to an error · Details', (this is 'new') how to fix it?
For the error itself you said about 2 months ago 'I like that! Thanks!'. If you want more or something else, please details ('due to an error' is not really detailles) !!) (reproduce the issue is simple & I can't explain more: see the original text). Else close the case and keep the issue!?

avatar sovainfo
sovainfo - comment - 26 Oct 2014

Guess that the problem with travis is not to do with your PR. Haven't been able to find how to restart is on your PR. It should be possible, but nobody cares to document it. The only way I know is changing something to your PR.

In my opinion your PR can't be accepted because it breaks BC. Suggest you find a better solution for the issue than breaking BC. Considering the original issue is an administrator doing something wrong, suggest you find a solution to stop him making that mistake. Document the manual labour once you made the mistake. Nothing against making Joomla more robust, but only in a BC way!

avatar b92
b92 - comment - 26 Oct 2014

OK it's more efficient, to say it instead if change a status!

So for the issue, back to my 2° proposal with:

$parentXmlfiles = (array) JFolder::files($this->getPath('source'), '.xml$', false, true);
$allXmlFiles = (array) JFolder::files($this->getPath('source'), '.xml$', 1, true);

ok ?

This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4057.

avatar Bakual
Bakual - comment - 26 Oct 2014

Ah sorry, misunderstood then.

Usually you can retrigger Travis by adding a new commit. Maintainers can also do it on Travis itself.
I just did that but it still errors. But it's indeed unrelated to your PR except that the branch likely is outdated by now.

As for the fix, personally I would merge it since I don't think it will cause an issue. However since I suggested the fix, I let someone else decide on that :)

avatar Bakual
Bakual - comment - 26 Oct 2014

I added the issue description from JoomlaCode to the intial PR.

avatar CedricTakongmo
CedricTakongmo - comment - 21 Aug 2015

Hi guy,
I could not test this issue. I tried the testing instructions with the packages K2_v2.6.9, virtuemart.3.0.9 and jce_252 on joomla 3.4.4 dev, but I did not have any error. May be you can tell us with which package you tested it. It could be that this issue have been already treated on the core.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4057.

avatar CedricTakongmo CedricTakongmo - test_item - 21 Aug 2015 - Tested unsuccessfully
avatar zero-24 zero-24 - change - 23 Aug 2015
Status Pending Information Required
avatar b92
b92 - comment - 28 Aug 2015

For the test, you need to use a Joomla package witch use the Joomla mechanism for the package to install the component, plugin, component... referenced into the xml file (for the package), not installing a first component, which install itself the plugin like K2.

Take a look at: Zoo, BS MyJspace for example.

avatar Margreet137
Margreet137 - comment - 12 Dec 2015

Hello
We have tested installing and uninstalling both packages the Zoo and the BS MySpace package. In both cases the installation and uninstall goes allright. We couldn't encounter the errors related to JFolder and Jinstaller. Looking at the history of this issue I see it started in aug 2014.
The Joomla version is 3.5.0 beta. Probably this error is fixed in meantime


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4057.

avatar bxtrdturbo
bxtrdturbo - comment - 12 Dec 2015

Hello
We have tested installing and uninstalling both packages the Zoo and the BS MySpace package. In both cases the installation and uninstall goes allright. We couldn't encounter the errors related to JFolder and Jinstaller. Looking at the history of this issue I see it started in aug 2014.
The Joomla version tested on is 3.5.0 beta. Probably this error is fixed in meantime


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4057.

avatar roland-d roland-d - change - 12 Dec 2015
Status Information Required Closed
Closed_Date 0000-00-00 00:00:00 2015-12-12 13:30:54
Closed_By roland-d
avatar roland-d
roland-d - comment - 12 Dec 2015

@b92 Thank you for your contribution. As there have been multiple tests that can no longer confirm the issue and it is an older PR, I am going to close this PR. If you feel the issue still exists, feel free to open this PR with updated information.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4057.

avatar roland-d roland-d - change - 12 Dec 2015
Title
Errors uninstalling partially a package & reinstalling it
[#34035] Errors uninstalling partially a package & reinstalling it
avatar roland-d roland-d - close - 12 Dec 2015
avatar roland-d roland-d - close - 12 Dec 2015
avatar joomla-cms-bot joomla-cms-bot - change - 12 Dec 2015
Title
Errors uninstalling partially a package & reinstalling it
[#34035] Errors uninstalling partially a package & reinstalling it

Add a Comment

Login with GitHub to post a comment