Category: Troubleshooting

Shortcode Not Working -Shortcode Showing Instead of Content

Shortcode Not Working -Shortcode Showing Instead of Content

While testing many short-codes all at once I run into a self-made problem that could happen to anyone. When pasting shortcodes the WordPress block-editor applied code-blocks automatically. This happened on multiple pages I was creating quickly and on visiting the front-end I found none of the short-codes worked.

Example of a WordPress shortcode in a code-block.

You can tell the shortcode in the image is in a code-block because it has an outline. If you see this on your site, you need to remove the code-block and try again.

Missing Client ID

Missing Client ID

The client_id value is missing from the URL because it was not sent by TwitchPress

A message or error that includes “missing client id” will be caused by either a new installation or a bug. When the Client ID (aka App ID) has not been entered by the administrator and someone attempts to use the Twitch Login feature or a number of other actions, this response will be giving by the Twitch API.

Initial Setup

This is best done using the TwitchPress Setup Wizard which can be accessed through the WP Help tab when on any TwitchPress view. There is also a settings page where app credentials can be entered/updated quickly at anytime.

Twitch API credentials form showing an empty Client ID field.

If this doesn’t appear to be the cause if your problem please report a possible bug and description the causing action as this API response can be caused by many things. That makes it difficult to pin-point the cause.

trim() expects parameter 1 to be string

trim() expects parameter 1 to be string

When activating the BugNet feature within TwitchPress you may see the following PHP log entry…

PHP Warning:  trim() expects parameter 1 to be string, object given in \wp-includes\class-wp-user.php on line 206

This warning begun to appear many weeks before I got around to investigating it. My findings confirm that the core is to blame. A back-trace I setup in class-wp-user.php near line 206 points to the dashboard.

PHP back-trace shows dashboard.php to be involved in the warning

On examining the dashboard source I can confirm that the warning happens within the Recent Comments widget and will not investigate this issue any further without evidence that suggests a cause by TwitchPress.

PHP error in WordPress dashboard page 2019