From metatag.module: metatag_entity_load()

  catch (Exception $e) {
    watchdog('metatag', 'Error loading meta tag data, do the database updates need to be ran? do the <a href=":url:">database updates</a> need to be ran? The error occurred when loading record(s) :ids for the :type entity type. The error message was: :error', array(':ids' => implode(', ', array_keys($entities)), ':type' => $type, ':error' => $e->getMessage()), WATCHDOG_CRITICAL);
    // Don't display the same message twice for Drush.
    if (php_sapi_name() != 'cli') {
      drupal_set_message(t('Error loading meta tag data, do the <a href=":url">database updates</a> need to be ran?', array('url' => url('update.php'))), 'error');
    }
  }

  1. The watchdog call has ":url:" but no url included in the variables parameter.
  2. The drupal_set_message call has ":url" and has "url" in the args parameter.

This shows a rather ugly message ;)

Comments

devin carlson’s picture

Version: 7.x-1.0-beta4 » 7.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new1.46 KB

A patch to implement some small improvements:

  • Defined the missing "url" in the watchdog call.
  • I can't say I've seen ":" used for placeholders before. Changed variables to be sanitized using the standard format_string methods.
  • Changed "ran" to "run" since "ran" is past-tense and the error is advising you to do something that hasn't occurred yet.
helmo’s picture

Thanks, looks good at first glance.

damienmckenna’s picture

StatusFileSize
new1.42 KB

Thanks for the patch, guys, and sorry for leaving such a dumb error in the update.

This version of the patch removes some redundant text in the watchdog() message.

damienmckenna’s picture

(never mind, wrong issue).

damienmckenna’s picture

Status: Needs review » Fixed

Committed, thanks for the patch, Devin!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

dimitrisg’s picture

Hi, can someone tell me how I will use this patch in steps?
I updated meta tags and this message showed up

Error loading meta tag data, do the /sites/ptyx/update.php">database updates need to be ran?

thanks

damienmckenna’s picture