Development Guides Home >> Guide to the Feature Showcase

Guide to the Feature Showcase - Troubleshooting

Introduction

If you have problems creating a new Feature Showcase entry, use this document to troubleshoot it.

To test your new Feature Showcase item, log in to WHM as the root user. Then, navigate to https://hostname:2087//scripts3/feature_showcase, where hostname is your hostname.

Log file

The system sends errors to the /usr/local/cpanel/logs/error_log log file.

For example, an error could look like this:

warn [whostmgr3] The following fatal warnings were in the warning_1 driver:
     The meta->first_appears_in field is missing or invalid.
     You must define either enable and disable overrides or a handle_showcase_submission override for interactive feature showcases.
     The meta->last_appears_in field is missing or invalid.
     The meta->meta_version field is missing or invalid.
The warning_1 driver will not be loaded.

warn [whostmgr10] The following non-fatal warnings were in the warning_1 driver:
     The spec_version field is missing or invalid. The system will assume a v2 driver.
The warning_1 driver will still function, but possibly not as intended.

Useful commands

Some Feature Showcase items, such as AutoSSL, depend on other criteria that will appear in the driver’s META module’s showcase() method.

You can use these commands to find and troubleshoot issues:

Display dismissed Feature Showcase items

ls /var/cpanel/activate/features

Display a specific, dismissed Feature Showcase item

cd /var/cpanel/activate/featuresrm-rf name

In this example, name is the name of the feature to display.

Check JSON syntax and clean up formatting

perl -MJSON -e '$j;$/=undef;$j=<>;$d=JSON->new->allow_nonref;print $d->pretty->encode($d->decode($j));'  < draftdrivername.json

In this example, draftdrivername.json is the name of the driver in progress.

Output a command to a file

perl -MJSON -e '$j;$/=undef;$j=<>;$d=JSON->new->allow_nonref;print $d->pretty->encode($d->decode($j));'  < drivername.json > yourfinaldriver.json

In this example, draftdrivername.json is the name of the driver in progress and drivername.json is the driver's final name.

Validate JSON while using the vim text editor

:%!perl -MJSON -e '$j;$/=undef;$j=<>;$d=JSON->new->allow_nonref;print $d->pretty->encode($d->decode($j));'

View dismissed Feature Showcase items or items that the system has not displayed on a new installation

rm -rf /var/cpanel/activate/features