Generate: Debugging Issues

At times, Page Generator Pro may not produce the results that you expect.

Before opening a support request, please follow all of the below common issues, making changes as necessary.

Keyword could not be added to the database

Variations of this error may include:

  • Database error: Unknown error 1153
  • Database error: WordPress database error: Processing the value for the following field failed: data. The supplied value may be too long or contains invalid data.

Your WordPress database supports storing data in an individual database row field of up to 16mb in size (this applies to Local, CSV File and CSV URL Sources).  Therefore, one or more of the following applies if you’re seeing this error:

  1. You are attempting to supply Keyword Terms that exceed 16mb in size.
  2. The size of the Terms is under 16mb, however it exceeds your database’s maximum allowed packet size, which is not controlled by Page Generator Pro.

To resolve:

  • See this article and work with your web host accordingly, or
  • Split the CSV file into multiple files, uploading each to a different Keyword.

Cannot Edit Content Group

In the table of Content Groups, if the Content Group in question shows that it is in Draft mode:
Page Generator Pro: Generate: Content: Quick Edit: Draft

  • Click Quick Edit for the Content Group in question
    Page Generator Pro: Generate: Content: Quick Edit
  • Set the Status to Published
    Page Generator Pro: Generate: Content: Quick Edit: Status
  • Click Update

In the table of Content Groups, if the Content Group in question is generating content, edits are prevented to ensure the integrity of data for the content as it is being generated.
Page Generator Pro: Generate: Content: Status: Generating

To stop generation, refer to the Cancel Generation documentation

200 OK errors on Generation

This is caused by WordPress, or a third party plugin, outputting PHP warnings, notices or errors in the response received from the generation process.

To debug:

  1. Add /replace the following lines in your wp-config.php file:
    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', false );
  2. Run the generation process again
  3. Inspect the log file at wp-content/debug.log, noting any messages that appear.
  4. If the messages mention other Plugins, please work with those Plugin developers to resolve.
  5. If the messages mention our Plugin, review the below common issues.

200 parseerror on Generation

This is caused by WordPress, or a third party plugin, outputting PHP warnings, notices or errors in the response received from the generation process.

To debug:

  1. Add /replace the following lines in your wp-config.php file:
    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', false );
  2. Run the generation process again
  3. Inspect the log file at wp-content/debug.log, noting any messages that appear.
  4. If the messages mention other Plugins, please work with those Plugin developers to resolve.
  5. If the messages mention our Plugin, review the below common issues.

See section Certain characters do not display correctly

404 error on Generation

This is typically caused by your web host blocking multiple requests to wp-admin/admin-ajax.php.  Generate via Browser makes a call to this endpoint for each generated item in the generation process.

To resolve:

  • Set Stop on Error = Continue, attempting to regenerate the Content or Term again, and/or
  • Work with your web host to prevent a firewall rule or similar preventing multiple authenticated requests to wp-admin/admin-ajax.php, and/or
  • Use the Generate via CLI options.

500 Internal Server Error when viewing Pages, Posts

Allowed memory size exhausted

Enable all of the following Plugin settings:

If issues persist:

500 Internal Server Error on Generation

503 Service Unavailable on Generation

504 Error on Generation

If using OpenAI Dynamic Elements, reduce the number of OpenAI Dynamic Elements in the Content Group.

For OpenAI Dynamic Elements that are smaller and repetitive in nature (i.e. the topic is not very different between each generated Page, the request is to generate a short paragraph), consider use the Research Tool, to generate e.g. a paragraph, ensuring Return as Spintax is enabled.  This content will then be stored in the Content Group, in spintax format.

Enable all of the following Plugin settings:

Perform all of the following steps:

  • Add /replace the following lines in your wp-config.php file:
    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', false );
  • Use the Resume Index and Number of Page options to generate in smaller batches,
  • Use Test mode, in conjunction with the Resume Index, to attempt to find precisely which page fails to generate within the Content Group.
  • Inspect the resulting wp-content/debug.log file for errors relating to Page Generator Pro.
    • If no errors in this file, please raise a support ticket with your web host for them to provide error logs that advise to what the precise server error is.

Once the above steps are complete, if issues persist, please open a support request containing:

500 Internal Server Error on Delete Generated Content

503 Service Unavailable on Delete Generated Content

524 Error on Delete Generated Content

524 Error

See https://community.cloudflare.com/t/community-tip-fixing-error-524-a-timeout-occurred/42342, noting this is a Cloudflare / server configuration issue where your web host fails to return a response within 100 seconds.

Reasons for this may include, but are not limited to:

  • Generate Number of Items per Request setting is too high, resulting in no response from the server within 100 seconds.  Reduce this setting per Docs.
  • Content Group contains one or more Dynamic Elements, which will affect Performance.  In particular, use of OpenAI or other AI Dynamic Elements may result in slower generation times, again resulting in no response from the server within 100 seconds.  Consider reducing the number of OpenAI Dynamic Elements, and use the Research tool where possible.
  • Work with your web host and Cloudflare as necessary to whitelist your server’s IP address, removing said timeout limitation to ensure generation runs smoothly.
  • Enable necessary logging to understand why the web server fails to return a response within 100 seconds.

Once resolved, you will most likely then see the underlying 500 or 503 server error, which can then be fixed following the above steps.

db_insert_error: Could not insert post into the database

If a Keyword as the Content Group’s name and that keyword does not contain columns and delimiters, the Keyword must be free of quotation marks.

db_insert_error: Could not insert term into the database

A Term Group’s name cannot exceed WordPress’ 200 character limit. If using a Keyword as the Term Group’s name, ensure its Terms do not exceed 200 characters.

This is not a Page Generator Pro limitation. To understand:

  • Navigate to Posts > Categories
  • Add a New Category, with the Name set to a string with length greater than 200 characters
  • Click Add New Category
  • Observe on screen error.

PHP Parse error: syntax error, unexpected ‘|’, expecting variable (T_VARIABLE) in simplecache/CacheInterface.php on line 34

Your hosting must use PHP 8.0 or higher. Refer to the Documentation:
https://www.wpzinc.com/documentation/installation-licensing-updates/hosting-requirements/#php-version

Overwrite settings not honored for third party Plugin on Generation

If the Use Performance Addon setting is enabled, the third party Plugin must also be enabled at Page Generator Pro > Settings > Generate > Performance Addon: Load Plugins

The Group’s Status must be set to one of Private, Publish for Generation to function correctly

The Content Group must be published.  Refer to the Documentation:
https://www.wpzinc.com/documentation/page-generator-pro/generate-content/#save​

Generate via Browser Does Not Start / Appears Stuck

If generating via the browser, and the screen’s log does not update:

  • Check the browser’s console for any Javascript errors
  • Ensure that any Plugins which obfuscates the wp-content folder name do not apply this to https://www.wpzinc.com/wp-content/plugins/page-generator-pro-api/assets/js/min/generate-browser-min.js
  • Ensure that any Javascript minification Plugins do not attempt to modify the content or load order of https://www.wpzinc.com/wp-content/plugins/page-generator-pro-api/assets/js/min/generate-browser-min.js

Generation Stops without full completion

See Docs, noting options available to generate in batches via use of the Resume Index and Number of Post options:
https://www.wpzinc.com/documentation/page-generator-pro/generate-content/#fields–generation

The same Page continues to be generated over and over again

The Permalink defined in the Content Group must be unique.

Refer to the Documentation, section Permalinks:
https://www.wpzinc.com/documentation/page-generator-pro/generate-content/

Specifically, note:

When specifying a Permalink, it must be unique for each generated Page.  If it is not, existing generated Pages will be overwritten.

Two options are available:

  1. Define a dynamic Permalink by using keywords, ensuring that the output for each generated Page will always produce a unique slug,
  2. Leave the Permalink field blank, allowing WordPress to generate a unique, non-overwriting Permalink based on the Title.

For example:

  • https://yoursite.com/generated-page
  • https://yoursite.com/generated-page-2
  • https://yoursite.com/generated-page-3
  • https://yoursite.com/generated-page-4

To resolve:

  1. Confirm that the Permalink settings at WordPress Admin > Settings > Permalinks > Permalink structure are set to the expected output
  2. If using Test mode, the generated page will be a draft.  As such, it won’t have a Permalink.  This is how WordPress works (to understand, create a draft page in WordPress and observe the results when previewing).
  3. If the Content Group is configured to generate pages in Draft or Scheduled status, WordPress will not assign a fully qualified Permalink until the page is published by WordPress.  Again, to understand, create a draft or scheduled page in WordPress and observe the results when previewing.

Millions of Pages are Generated, when I only expected Thousands of Pages

Inspect the on screen log, triple checking that the Keywords specified are the only Keywords listed:
Page Generator Pro: Tutorial: Using a CSV File: Generate via Browser Log

If additional Keywords are listed in the log, you must:

  1. Slowly and carefully walk through the Content Group, ensuring that the additional unwanted Keyword(s) are removed.
  2. Create a new Content Group, slowly and carefully copying content and settings from the old Content Group, to ensure that orphaned metadata (i.e. Keywords specified in a third party Plugin that has been removed) is not copied across to the new Content Group.

If the Keywords listed in the log are correct, the Method used is incorrect. For example, assuming two keywords are used, each with 1,000 terms:

  • If your expectation is that 1,000,000 Pages be produced (that is, every single possible unique combination of keywords are used), ensure that the Content Group’s Method is set to All.
  • If your expectation is that 1,000 Pages be produced (that is, keyword terms are used on a sequential, one to one basis), ensure that the Content Group’s Method is set to Sequential.

Refer to the detailed Documentation, which explains precisely how Generation Methods work:
https://www.wpzinc.com/documentation/page-generator-pro/generate-methods/

Keyword(s) are being replaced that do not exist in the Content Group

Orphaned (or ‘old’) Post Metadata can remain in a Page, Post or Content Group if third party Themes or Plugins have not deleted their data when deactivated.

For example (but not limited to), you might have performed the following on the same individual Content Group:

  • Used a Page Builder, deactivated it and then used a different Page Builder,
  • Changed the SEO Plugin used on the site,
  • Imported a Content Group from a Page that contains orphaned metadata

As this data is not controlled by Page Generator Pro (but the metadata may include Keywords that you specified in e.g. an old Page Builder’s data), Page Generator Pro will attempt to ignore orphaned metadata based on the currently active Theme and Plugins, therefore ensuring the correct detection of Keywords.

However, there may be some third party Themes and Plugins where this is not possible.  In these cases, you may find more Keyword(s) are being replaced than expected.  In this situation, you would need to either:

  • Reactivate the old Theme/Plugin holding the data > edit Content Group > remove data as necessary > Save > Deactivate old Theme/Plugin (thereby removing the orphaned data),
  • Create a brand new Content Group.

Certain characters do not display correctly

If you’re using characters such as Ä and Ö, and they do not display correctly on generated content (or content does not display at all), there is a misconfiguration in your WordPress and/or database configuration.  You must verify that:

  1. Your MySQL database tables encoding is set to UTF-8 Unicode (utf8mb4).  Confirm this by viewing each WordPress database table information in your database editor (such as phpMyAdmin or Sequel Pro):
    Page Generator Pro: Debugging Issues: Database Settings
  2. Your MySQL database tables collation is set to utf8mb4 (ideally, utf8mb4_general_ci).  Confirm this by viewing each WordPress database table information in your database editor (such as phpMyAdmin or Sequel Pro):
    Page Generator Pro: Debugging Issues: Database Settings
  3. Your WordPress database character set is set to utf8mb4.  Confirm this by editing your wp-config.php file, noting the below setting:
    Page Generator Pro: Debugging Issues: wp-config Settings
  4. Your WordPress database collate set is blank. Confirm this by editing your wp-config.php file, noting the below setting:
    Page Generator Pro: Debugging Issues: wp-config Settings

Mixing database encoding, collation and WordPress’ database character set will result in content issues not just for Page Generator Pro, but for other plugins and content in general.

Failed to initialize plugin: page_generator_pro_autocomplete

Clear all server, browser and caching Plugins.