Problem Solving

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.

Uploading a package that has problems

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:

  • In Package Magic Starter, after an upload has failded and reported issues, you can elect to try again with all checks disabled.
  • In Package Magic, you can disable individual checks and even elect to remove unwanted parts of the package during the upload process.

Compile check unavailable

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:

  • jtf_resources.cli.exec_unavailable - flags that no exec calls can be made
  • jtf_resources.cli.compile_unavailable - flags that compile checks cannot be made via exec calls

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.

 

Can I uninstall Package Magic?

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 depends on Package Magic Starter, so Package Magic must be uninstalled before you unistall Package Magic Starter.

Package Magic hangs when uploading a package

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:

  1. Disable compile cheeks using the checkbox in the upload dialogue and try again.
  2. When you are sure that making a CLI exec is the root or the problem, set one of the file configuration flags:
  • jtf_resources.cli.exec_unavailable - flags that no exec calls can be made
  • jtf_resources.cli.compile_unavailable - flags that compile checks cannot be made via exec calls

Package Magic will then continue to make all other checks, but compile checks will be downgraded to a considerably weaker tokenizer check.

My Mac / development system creates zip files with all kinds of unwanted files

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

  1. Any package Downloaded from a development site with Package Magic will, by default, have all such files stripped from the package zip.
  2. When Uploading such a faulty package with Package Magic, you can elect to disable some or all checks and then to strip the unwanted files. You don't have install it, you can then Download the not installed package as in (1).

During development, the Package Tools part of Package Magic can be used to identify many detailed issues with code.

Manually Installing or Updating an Addon or Theme

Perhaps you are unable to connect your site directly to the ConcreteCMS marketplace to install an addon or theme. This manual process works for all addons and themes - not just mine.

  1. In your concrete account, find the addon/theme in your Purchase History > Licenses and download. Make sure to scroll down to the most recent version before downloading.
  2. Then copy the zip to your site /packages/ directory and unzip (not /concrete/packages !!!). This is usually easiest using your host cPanel file manager.
  3. In your site, visit the Dashboard > Extend page and the theme package will be ready to install or update

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.

If you find yourself needing to install or update many addons or themes manually, consider my Package Magic addon.

Once Package Magic Starter is installed, through the marketplace or manually, all further installs can be handled from the site dashboard using Package Magic.