Fatal error when I try to import JCB Package #979
Labels
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: joomla/Component-Builder#979
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Steps to reproduce the issue
JCB > Import JCB Package
Use Upload tab or Directory tab
Expected result
To upload the package
Actual result
Warning: require_once(.../libraries/phpseclib/vendor/autoload.php): failed to open stream: No such file or directory in .../administrator/components/com_componentbuilder/helpers/componentbuilder.php on line 4293
Fatal error: require_once(): Failed opening required '.../libraries/phpseclib/vendor/autoload.php' (include_path='.:/opt/alt/php74/usr/share/pear') in .../administrator/components/com_componentbuilder/helpers/componentbuilder.php on line 4293
System information (as much as possible)
Additional comments
I did a small investigation, and I saw that in the JCB install package, there is no phpseclib, but a phpseclib3.
And in administrator/components/com_componentbuilder/helpers/componentbuider.php is asking for phpseclib.
After I renamed the folder from phpseclib3 => phpseclib, I get this error:
The \phpseclib\Crypt\AES library\class is not available! This library\class should have been added to your libraries/phpseclib/vendor folder. Please contact your system administrator for more info!
so the path it should be:
libraries/phpseclib/vendor/phpseclib/Crypt/AES
But in JCB package 3.1.17 the path is:
/libraries/phpseclib/vendor/phpseclib/phpseclib/phpseclib/Crypt/AES
Apologies with Explanation:
First of all let me apologies for having caused this inconvenience, I removed version 2 of phpseclip from JCB prematurely.
We are in the transition to version 3, since it is PHP 8+ compatible while version is not.
I have already written most of the code so we can now use the new phpseclib version 3, but I have not fully linked it up across JCB itself. Here are all the places you can see the new library version 3 being used:
I have already added these changes to the compiler, in a few places. But I have not completed the JCB packaging area. Though I started, as you can see the new packaging area code here.
Okay for the easy fix:
Just renaming the folder from phpseclib3 to phpseclib will not work and will break more things, so you first make sure the new folder is still phpseclib3.
Then you download JCB v3.1.12 and unzip the package locally and move the library/phpseclib folder, into your joomla websites library folder.
That should cause all things to work as before. Let me know if you still not having success!
We should have this resolved soon, and then you will no longer need to do these gymnastics.
This should now be fixed in JCB 3.1.19 that was just released. Meaning you should be able to import packages without the need of the old pspseclib version 2 loaded.