Problems you may come across and tips on how to solve them.
Package Magic works with packages both good and bad and all ways in-between. As such, the vast majority of problems you may encounter are to do with issues in packages.
Overall, the objective of Package Magic is to prevent packages are being loaded to or generated from a site from breaking that site or others.
Package Magic always errs on the side of caution. Its purpose is to protect sites from faulty packages.
As such, you may find a package is reported with proiblems, but you want to upload it anyway. The first thing you need to do is review the reported problems, understand what the problems are, resolve them where you can, and be sure that problems will not break your site.
With that in mind:
Compile checks are implemented by running PHP through exec and the server CLI. Whilst checks are made to confirm the CLI is available, on some servers those checks can return a false positive.
With that in mind, since Package Magic Starter v1.2.6, the making of system exec calls is disabled by default during installation. Prior to that version, exec calls remain enabled at installation. At any time that an exec call fails, including calls to the PHP compiler, the exec_unavailable may be automatically set.
The availability of exec and compile is controlled by two file configuration values:
There can also be circumstances where exec calls are available, but compile checks are not, such as when the server CLI does not support compiling the same version of PHP as the web server uses. Hence the second flag that only limits use of compile.
When exec or compile is flagged unavailable, any use of Package Magic that involves a compile check will return the message Compile check unavailable.
When compile is unavailable, as indicated by either of the above flags, PHP source will be tokenized as a very weak check. Many faulty source files will tokenize without failing. Hence tokenizing is never flagged as a pass, only as a fail or as Compile check unavailable.
In full Package Magic, you can disable compile checks on uploaded files with a checkbox in the dialog. If you only have Package Magic Starter, compile checks will not be reported if unavailable during upload a package.
Whilst Package Magic is useful during site build out, once a site is stable, perhaps you don't want the full Package Magic.
Package Magic is not required in any way to continue running a site. Packages installed with Package Magic or Package Magic Starter will continue to function.
You can safely uninstall the full Package Magic and operation will revert to Package Magic Starter. You can safely uninstall Package Magic Starter.
Package Magic is designed to be exceptionally robust because it has to deal with faulty code. The most likely reason for Package Magic hanging is that the CLI exec function is banned silently by web server security settings.
If you suspect that is the case:
Package Magic will then continue to make all other checks, but compile checks will be downgraded to a considerably weaker tokenizer check.
A development system that has all kinds of hidden files and directories, .dot files, _underscore files, Thumbs.db files, is not an unusual problem.
There is often a lot of messing about to create clean package zips.
Package Magic can solve this instantly
During development, the Package Tools part of Package Magic can be used to identify many detailed issues with code.
Perhaps you are unable to connect your site directly to the ConcreteCMS marketplace to install an addon or theme. This manual install or update process works for all addons and themes - not just mine.
The process is exactly the same for addons and themes, except themes have an extra step of activating the theme after installing.
Sometimes step 3 above can run out of PHP execution time. This is most likely when installing an addon or theme that installs a large amount of sample content. You should not run into such an issue with any of my addons or themes.
If you do run into such issues, you can run the install manually from the shell command line.
$ concrete/bin/concrete5 c5:package-install my_package_handle
or
$ concrete/bin/concrete5 c5:package-update my_package_handle
When updating, be sure to replace the previously installed package directory rather than adding to it. If not, you could end up accumulating obsolete debris from a previous version of the package. In general you should not uninstall - uninstalling will loose existing data and blocks. Just replace the /packages/_addon_handle_/ directory with the unzipped package update.
If you find yourself often needing to install or update many addons or themes manually, consider my Package Magic addon. Once Package Magic is installed, through the marketplace or manually, all further installs can be handled from the site dashboard using Package Magic. If you build custom code in packages, Package Magic can do a lot more. Package Magic can analyze package structure, zip up packages, upload and download zip files directly to various stores.