Error Message Using Mystique Theme
Posted by Mike
Warning: Illegal offset type in isset or empty
A WordPress error message displayed publicly is usually caused by a conflict between a theme and a plugin. “Warning: Illegal offset type in isset or empty”.
This error message is seen on a few sites using the Mystique WordPress theme, as well as a few other themes. One of the reasons for the error for sites using Mystique is a conflict when category and tag taxonomy terms are used for PAGES. Ninja Page Categories Plugin used with the Mystique theme results in this error message.
The error has something to do with menu fields, with the plugin installed the theme admin reports a theme field has been disabled as it already exists, and the error messages are displayed wherever a custom menu is in use…
The Page Categories and Tags plugin still does what it’s supposed to, include pages in taxonomy term archive pages.
Solutions to Mystique and Page Categories Error Messages:
The simple answer is change the theme, uninstall the plugin, or only use the basic menu, which is not a solution for those of us who want to make use of Mystique with page categories, or find another solution.
Until the theme developers fix this bug, we can instead simply prevent the error messages from displaying to the public. This is of course not a fix for the basic fault, and these errors will still get logged to the system error log. But the workaround will allow users to continue using the theme, plugin and custom menus while waiting for a proper fix. (Which may be a long wait, although there are open tickets for this error, no bug-fix has been released yet).
The error message can be viewed at my live testing site: testing.graphicline.co.za/topics/testing/
Hiding WordPress Error Messages (UPDATED)
Error messages can be hidden from public display by editing your
wp-config.php file or .htaccess file. Of the two options the
wp-config.php file is likely to work on more server set-ups
wp-config.php file before editing!
wp-config.php file in a suitable editor (Wordpad or other text editor, Dreamweaver, or the editor found in Apache CPanel server console. Scroll down to near the bottom of the file looking for “For developers: WordPress debugging mode.” (this is a logical and convenient place to add the 2 lines of code needed to prevent the site displaying error messages).
Add the following lines of code:
The resulting lines of code in the file should look like this: (Blue is existing code, Red is the new code added)
* For developers: WordPress debugging mode.
* Change this to true to enable the display of notices during development.
* It is strongly recommended that plugin and theme developers use WP_DEBUG
* in their development environments.
/* That’s all, stop editing! Happy blogging. */
Save the file and test the site. If this doesn’t work, then you will have to try the .htaccess method (This can cause a site-wide server error depending on the server set-up) I recommend before editing the .htaccesss file you contact the server manager or hosting service and find out what the procedure is to block error message display – they will probably do it for you!
This modification to
wp-config.php can be used for any WordPress error messages, not only the error message described here.
Note: This code was updated on 20 March 2012 as the previous version was found not to work for some installations.
About MikeWeb Developer and Techno-geek Saltwater fishing nut Blogger
Posted on February 27, 2012, in WordPress and tagged Error message, Mystique, Page Categories, Plugins, Technology, WordPress, WordPress Bugs, WordPress Hacks, wordpress themes. Bookmark the permalink. Leave a comment.