Tag: 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.

Plugin Installation, Configuration and Setup Wizard

Plugin Installation, Configuration and Setup Wizard

TwitchPress offers a step by step installation wizard that can be bypassed because the options offered are also available elsewhere in the plugins settings. This guide will focus on the Setup Wizard.

Find Setup Wizard

You should be taking to the Setup Wizard when you activate TwitchPress but if you aren’t already there, begin by going to any TwitchPress plugin admin page. Then open the Help tab, top-right.

WordPress admin Help tab offers support for TwitchPress

Select Installation

Click on Installation and then click the Setup Wizard button.

Primary installation options are in the Help tab

Developer Services Agreement

Clicking on the Setup Wizard button will take you to the first step where you are encouraged to click the Read Agreement button. If you are a developer who has already read and fully understand the official Twitch Developers Services Agreement you can skip it and click Accept Agreement.

First part of the TwitchPress Setup Wizard

Create A Twitch Application

You are on the Application step. It is the most important step in configuring the plugin and technically it begins on the Twitch.tv domain because we require a set of security details that can only be provided by creating a new app on Twitch.

I won’t go into how to create an app. Click on the Manage Twitch Apps button and get familiar with the Twitch Developers site and Console the procedure. Then return to the Setup Wizard to enter the app credentials provided.

TwitchPress Setup Wizard – Application Step

Twitch Application Credentials Form

Scroll down to the four application fields. This is where you will enter your new application. Do not press enter after entering the fourth field because there are more fields further down the page.

I would like to mention the App Redirect URL because it has a key technical design behind it. The URL doesn't need to point to a specific location on your site but the option to make it point to specific file is also available for technical reasons.  
TwitchPress application credentials form

Permissions Scope for Administrators

Below the app part of the form is a column of check-boxes that toggle permissions. The first group of permissions relate to the security of your personal/team/business account on Twitch. Permissions are associated with a secret token, generated and received from Twitch.tv when you finally submit the form.

In short, you need to select which permissions are acceptable (only you can decide) when allowing your site to access your Twitch channel. Most owners allow all permissions. When done, scroll further down the page to the second group of check-boxes.

TwitchPress Permissions for Administrators

Admin Permissions Explained

While the app credentials alone can be used to obtain much data from Twitch. The plugin is not permitted to request/receive a lot of channel data without the channel owners permission. This requires completion of the oAuth2 procedure commonly seen when registering on a website using Google or Facebook etc.

In this case, you will not be registering but accepting a range of permissions between your own website and Twitch. It’s a different scenario than accepting permissions on another website and giving that site access to your social account…because your the owner of the site in this scenario.

Permissions Scope for Visitors

Scrolling further down the Application page, you will come to a second column of check-boxes that look identical to the group of boxes for administrators. This second group of boxes is where we tell TwitchPress which permissions we need our visitors to accept to provide the services and features you intend to setup.

TwitchPress Permissions Scope for Visitors

You can change these settings later so don’t be worried about not selecting one you need later. When your ready, submit the form by clicking on the Continue button. If you see the following notice, everything went well…

Your application credentials have been stored and your WordPress site is ready to communicate with Twitch.
Success notice displayed on the Files step.

Files Step

If you haven’t been taking to the Files step and see the success notice, something went wrong, let me know. I’ll assume things are going well throughout this guide and cover troubleshooting elsewhere. The Files step currently offers information only, click Continue.

Database Step

The Database step was added for planned features still to come. So for now the Database step does nothing. Click continue.

Services Step

Services are experimental only – please ignore these for now. The options are displayed for very limited public testing and as a hint to what may come as standard in future. Please click continue.

List of services offered through TwitchPress

Extensions Step

The extension system allows developers to integrate other plugins with TwitchPress. The official extensions have already been consumed by the core plugin for various reasons. The only purpose those ones have is to support older versions of the core plugin and as examples for integration development.

Feel free to install extensions using this step, just select the ones that interest you and click Continue. Extensions comes from WordPress.org and are installed by the WP core just like any other plugin, with all the same safety.

Options Step (oAuth2)

Firstly, on submitting the options form, you will be taking to Twitch.tv for authorization (oAuth2). The step itself intends to capture information that will be used to improve the plugin, customize installation and change the way TwitchPress operates. When ready click Continue and expect to arrive on Twitch.

Twitch login form

If you aren’t already logged into Twitch.tv you will be shown a log-in form first. Log-in alone does not complete authorization, that will come after. What is very important, is that you log-in using the Twitch account that is permitted to be fully accessed by your website. So don’t accidentally log-in using a personal account if you are doing this for a team with a shared account or a client who needs you to log-into their own Twitch account. In the event you (or your auto-filler) make a mistake here, logout of Twitch and go back in the browser to submit the Options Step again.

Twitch authorize account form

You should arrive on the official authorization form after log-in. You have the opportunity to and your WordPress.

In the image above my application is named "WordPress Plugin October 2019" but you will see a different text, depending on what you named your application. 
Twitch authorize app button

When you are ready, click authorize. As stated on the page, you will be returned to your own website, shown as “localhost” in my image above.

Ready Step (Final)

TwitchPress setup wizard Ready step

When returned to your website, my plugin will detect the response from Twitch.tv and redirect you back to the Setup Wizard. You should arrive on the Ready step and see a success notice (shown below) that confirms the receipt of a token.

Success Notice: Twitch.tv provided a token to allow this site to access your channel based on the permissions (scopes) you selected. 

If you do not see this notice, please take a screenshot and report it on Discord. If everything went smoothly, the plugin and your WP is now ready to begin receiving data from Twitch. Congratulations!

Check Plugin Status Post-Installation

The plugin has features to help monitor the status of our ability to request data from Twitch. Open the core WP Help tab, while you’re on any of the plugins own views – else nothing to do with TwitchPress will be in the Help tab.

TwitchPress Troubleshooting open Help tab
Open the standard WP Help tab to see information (some tools) that apply to all views.
TwitchPress troubleshooting Help tab
You will find a group of Status sections in the Help tab.
TwitchPress User Status you do not have a token
You’re own Twitch account authorization and permissions are tested in the User Status section.


TwitchPress User Status ready setup working
This is how the User Status section will look once you complete the Setup Wizard.


TwitchPress App Status no application token not ready
The status of your Twitch app credentials can be viewed in the App Status section.


TwitchPress App Status ready working setup
Now we see that app credentials have been entered into the Setup Wizard or Settings page.


TwitchPress Channel Status no channel token found
This section tests the main channel, the official channel, probably you’re own channel.


Always run the Setup Wizard if your problem appears to be related to getting data from Twitch. If you are unsure, please come to the projects Discord and show some screenshots or videos of your issue.

The plugin is complex. Standard troubleshooting approaches can often be a waste of time. Always assume the plugin is at a fault or there is a flaw in the usability of the interface that has misled you – then complain to me. I can get us on the correct path to making TwitchPress work well.