The Movable Type Knowledge Base

Use Of Uninitialized Value

Question

Various errors of this type, what they mean, and the solutions.

Answer

Error: Use of uninitialized value in string eq at lib/MT/App/CMS.pm line 316.

This is related to the display of the Movable Type News Feed on the main page. Your server is most likely having trouble retrieving this feed.

You can disable this feature in mt-config.cgi1 file with the following line:

NewsboxURL disable

Remember to edit mt-config.cgi only in a plain text editor, and upload it back to your server in ASCII mode after making changes.

Error: Use of uninitialized value in concatenation (.) or string at /var/www/cgi-bin/lib/MT/Entry.pm line 243.

This error indicates that Movable Type is unable to construct a valid archive URL or permalink for one or more of your entries (the number of times you see the error represents the number of links which cannot be produced). You may see further evidence of this problem if you view your pages and see that some permalinks appear incomplete.

The first (and easiest) thing to check is any Archive File Templates you've implemented under Settings > Publishing : Archive Mapping2 screen. Make sure you are using valid tags for the specified Archive Type. (See Can I Control The Names Of My Files? for which tags can be used with each type.)

Another cause of this error is invalid coding of an <MTEntryPermalink> or <MTEntryLink> tag in one of your templates (typically with the archive_type attribute). You'll first need to go through the process of elimination to determine which template triggers the error:

  • Rebuild your site, but choose each type of rebuild separately (i.e., rebuild Indexes Only first to see if that brings up the error; then Individual Archives Only, etc.).
  • If the error occurs when rebuilding a particular archive type, you'll want to examine the template for that type to see if you can find invalid use of the specified tags.
  • If the error occurs when rebuilding Indexes, you should then go to the Edit Template screen for each Index Template, and rebuild them one at a time to look for the error.

Once you've identified which template results in the error, you can look more closely at the code for that template.

Error: Use of uninitialized value in concatenation (.) or string at lib/MT/Template/Context.pm line 2012.

This error is caused by similar reasons as the previous one, except that it results from invalid coding of an <MTArchiveLink> tag.

Error: Use of uninitialized value in substitution iterator at lib/MT/Util.pm line 146.

Note: This is a bug in versions below 3.16; please upgrade to the latest version to avoid this error in the future.

The default blog_language has not been set.

Go to Weblog Configuration > Preferences, and then select a setting for Language for Date Display. Save this change and then rebuild your site.

Error: Use of uninitialized value in string eq at lib/MT/Template/Context.pm line 1379.

This is a bug with QuickPost where it does not retrieve the default setting for Allow comments on each entry.

You need to make sure that your bookmarklet shows the Allow comments field and that you always select an option for it when posting.

1 In versions prior to 3.2, the configuration file is named mt.cfg.

2 In versions prior to 3.2, navigate to Weblog Configuration > Archive Files to view your Archive File Templates.

Submit Feedback on This Article

Your comments on how we can improve this article are appreciated; but please do not use the feedback form to submit support requests or questions. We will not respond to or publish such queries submitted through this form. If you have a technical question or problem, visit Movable Type Support.

Yahoo! Small Business web hosting services

Six Apart
Makers of weblog software and services for individuals, organizations and businesses.
This website is powered by Movable Type.