• Resolved Tim in Seattle

    (@theframeguy)


    I’m using Pattern Manager version 0.3.0, and when creating a custom category, I get an error when I save the pattern. Then, trying to access anything outside the pattern post causes a WordPress fatal error. Removing the newly created pattern via FTP restores the website. If I save a post using a built-in category, the pattern saves as expected.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Phil Johnston

    (@johnstonphilip)

    Hey Tim,

    Sorry to hear! Do you happen to know what the fatal error message was?

    Thread Starter Tim in Seattle

    (@theframeguy)

    @johnstonphilip, thanks for the reply. Here’s a screen recording of the steps: https://taricco.d.pr/v/Nncx4V. Whenever I create a custom category, this error happens. When I delete the newly created pattern PHP file from the patterns directory, the website returns online.

    Plugin Contributor Phil Johnston

    (@johnstonphilip)

    Thank you for sending those steps! My first thought is that this might be a plugin conflict, as we aren’t seeing any other reports of this. If you’re able to try it with all other plugins disabled, that would help us narrow this down.

    If that doesn’t help, in order for WordPress to show the contents of that error (like the line number of the file causing the problem), you’d have to enable WP_DEBUG mode for your WordPress install. You can do this by manually editing the wp-config.php, and setting WP_DEBUG to “true”. Here’s a guide on that:

    https://www.ads-software.com/documentation/article/debugging-in-wordpress/

    Thread Starter Tim in Seattle

    (@theframeguy)

    @johnstonphilip, here’s what I have for you. I have deactivated ALL plugins except Pattern Manager. I’ve also cleared my child-theme functions.php of extra code. In debug mode, I get the error: Fatal error: Cannot use empty array elements in arrays in /nas/content/live/sbayfc/wp-content/themes/generatepress-child/patterns/my-new-pattern.php on line 14. This is a screenshot of the my-new-pattern.php file.

    Plugin Contributor Phil Johnston

    (@johnstonphilip)

    Thanks Tim,

    It looks like this might be an actual bug in Pattern Manager for themes with no TextDomain. We’ll work on getting a fix out for this.

    In the meantime, can you try adding a TextDomain to your theme’s style.css file?

    To do this, open the style.css file, and in the theme header, add a TextDomain, something like this:

    Text Domain: frost

    Then try creating a pattern with a custom category again. I think that should fix this for you.

    Thanks for all the helpful links and screenshots!

    Thread Starter Tim in Seattle

    (@theframeguy)

    @johnstonphilip, excellent, that fixed my issue.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Creating Custom Category Causes Fatal Error’ is closed to new replies.