The administrator is supposed to look into the watchdog logs after the update to find the reasons for any failed query. But the problem is that the missing favicon actually creates a damn lot of watchdog entries, from which it is very hard to find the ones really relevant. Look for a sample 4.5 to 4.7 update (non AJAX version) I included below. There is one entry which is relevant for me (the one from the update script). The others from the missing favicon are irrelevant (and I included one cron run to show that all these are generated by only one update process).
mysql> select SUBSTRING(message, 1, 40) as msg, location, timestamp from watchdog order by timestamp desc limit 98;
+------------------------------------------+-------------------------------+------------+
| msg | location | timestamp |
+------------------------------------------+-------------------------------+------------+
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551173 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551173 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551173 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551173 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551173 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551173 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551173 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551173 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551173 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551173 |
| Unknown column 'theme' in  | /favicon.ico | 1134551173 |
| Unknown column 'sid' in ' | /favicon.ico | 1134551173 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551172 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551172 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551172 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551172 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551172 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551172 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551172 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551172 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551172 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551172 |
| Unknown column 'theme' in  | /favicon.ico | 1134551172 |
| Unknown column 'sid' in ' | /favicon.ico | 1134551172 |
| Duplicate entry 'rss.xml' for | /update.php?op=do_update_nojs | 1134551172 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551170 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551170 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551170 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551170 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551170 |
| Unknown column 'theme' in  | /favicon.ico | 1134551170 |
| Unknown column 'sid' in ' | /favicon.ico | 1134551170 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551170 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551170 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551170 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551170 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551170 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551170 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551170 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551170 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551170 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551170 |
| Unknown column 'theme' in  | /favicon.ico | 1134551170 |
| Unknown column 'sid' in ' | /favicon.ico | 1134551170 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551169 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551169 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551169 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551169 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551169 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551167 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551167 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551167 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551167 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551167 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551167 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551167 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551167 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551167 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551167 |
| Unknown column 'theme' in  | /favicon.ico | 1134551167 |
| Unknown column 'sid' in ' | /favicon.ico | 1134551167 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551165 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551165 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551165 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551165 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551165 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551165 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551165 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551165 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551165 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551165 |
| Unknown column 'theme' in  | /favicon.ico | 1134551165 |
| Unknown column 'sid' in ' | /favicon.ico | 1134551165 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551161 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551161 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551161 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551161 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551161 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551161 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551161 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551161 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551161 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551161 |
| Unknown column 'theme' in  | /favicon.ico | 1134551161 |
| Unknown column 'sid' in ' | /favicon.ico | 1134551161 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551150 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551150 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551150 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551150 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551150 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551150 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551150 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551150 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551150 |
| Table 'drupalhu.node_revisions' | /favicon.ico | 1134551150 |
| Unknown column 'theme' in  | /favicon.ico | 1134551150 |
| Unknown column 'sid' in ' | /favicon.ico | 1134551150 |
| A cron futása befejeződött. | /cron.php | 1134419522 |
+------------------------------------------+-------------------------------+------------+
98 rows in set (0.03 sec)
Even if we go past the update, the missing favicon poisons the 404 logs with lots of entries. All browsers try to grab the favicon nowadays, even if it is specified nowhere in the HTML code. So Drupal should come with a default favicon file. Which for simplicity should be 0 bytes in size (included as an attachment) :)
Also note that the update process is going to be faster, since there is no need to process these failed 404 page generations on the update pages. Drupal in general will have a lower impact on servers, if the missing favicon is not handled by Drupal's 404 mechanism, since this is too high a price to pay for such a common HTTP request.
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | Drupal.update.system.fixes.patch | 6.24 KB | gábor hojtsy |
| #14 | Drupal.fix.update.process.patch | 6.12 KB | gábor hojtsy |
| #5 | Drupal.favicon.add.upgrade.patch | 649 bytes | gábor hojtsy |
| #3 | Drupal.favicon.upgrade.patch | 641 bytes | gábor hojtsy |
| favicon.ico | 0 bytes | gábor hojtsy |
Comments
Comment #1
killes@www.drop.org commentedI disagree. People should simply create themselves a favicon.
Comment #2
gábor hojtsyKilles, people will create a favicon if they need one. This correction does not give them any favicon really, just makes all the annoying problems associated with a missing favicon go away. This is not like putting the druplicon back in.
Comment #3
gábor hojtsyOk, here is a half joking alternative, which is in line with what Killes says. Either this or the zero byte favicon.
Comment #4
killes@www.drop.org commentedI'd support the second solution if the text were less silly. Grow up.
Comment #5
gábor hojtsyKilles supports instructing users to add a favicon before the upgrade, subtler text included. Note that without this patch the text explicitly instructs users to remove all files, and only unpack what is in the new tarball. If the text is not changed, or a favicon is not included, users are instructed to use a setup which is guaranteed to generate errors in the watchdog tables. IMHO since users are not going to read the UPGRADE.txt (although they obviously should), including a dummy favicon is a better option, but it is now hopefully up to Dries to decide.
Comment #6
dries commentedDo you have some weird browser plugin/extension/toolbar that tries to grab the favicon.ico for each XMLHttpRequests? I have yet to see such behavior using a stock Firefox.
Does the auto-complete functionality (eg. the AJAX-powered username textfield) trigger favicon.ico requests too?
Maybe it would be better to move the current favicon from the misc-directory to the root-directory?
Comment #7
morbus iffDries - he said he used the "non-AJAX version" to do the update, which would mean no XMLHTTPRequest. I have no idea what "non-AJAX version" actually means, however.
Comment #8
morbus iffI'm also slightly confused on our use of favicons in general:
a) We ship with "use default shortcut icon" enabled.
b) I disable that checkbox.
c) In Bluemarine, I now get
<link rel="shortcut icon" href="" type="image/x-icon" />.d) Which seems to short-circuit any attempts by Firefox/OS X to fetch /favicon.ico.
I would suspect that this does NOT happen in update.php, since it's themeless, but I'm still a bit concerned about the "non-AJAX version" of 4.7 that Goba is talking about.
Comment #9
dries commentedSorry, I missed the part about using the non-AJAX version.
To fix the non-AJAX version we can emit a link-tag in the head-tag?
Not tested:
Comment #10
morbus iffI think that's probably a "cleaner" approach than shipping a 0 byte favicon (I could lean either way on that issue, for reasons that'd take me a few paragraphs to iterate). But, there's no theme in update.php, so it should really just be
<link rel="shortcut icon" href="" type="image/x-icon" />, no?Comment #11
dries commentedComment #12
drummThe favicon goes to the generic logs. This is rather annoying, but not necessarily an update issue.
The maintenance theme, which is what update uses, should use minimal favicon settings since retrieving the custom favicon might result in a worse error in the future if we ever change how it is stored.
The link from update to the logs could be a deep link to filtered logs. I expect only showing PHP errors would be ideal.
Comment #13
dries commentedSo I guess the solution is:
favicon.icoinmisc(without using the theme settings).Comment #14
gábor hojtsyOk, here is a patch, which includes (almost all of) the fixes requested by Dries, some of which came up in the 4.5 compatibility issue (which I am marking as duplicate in favor of this one).
The patch:
- Links to the default favicon in the misc folder
- Removes all t()-s from the update file
- Includes the 4.5 compatibility fix
It does not however include an improved link to the watchdog logs, because I looked into how watchdog works, and it turned out that it uses the Form API, which seems to only allow for _POST['edit'] to contain the information needed for the setting of the filter (look into _form_builder), so we cannot put it into a link. I was unable to find out, how one does multimethod (GET/POST) form handlers. Anyone more familiar with the situation can improve this patch, but let me stress, that this patch fixes critical issues. The update does not even start now if you have a translation because of the t() issues.
Comment #15
gábor hojtsyUnder my continued testing of the 4.7.0 upgrade (from our 4.5 Drupal.hu database), I also found that a recent performance fix of changing is_array() calls to isset() calls made the revisions updates broken. The browser just hangs on the update regardless whether you use the AJAX or refresh based versions, since the revision updates are never processed. The critical change is easily noticed at the bottom of this diff
The added line checks for a condition, which is impossible to meet: that some variable is not evaluated as true, although it is an array and has items in it. Since this update never finishes until the revisions are processed and the revisions are not processed due to this faulty update, the update process hangs, and never ever completes.
So the updated patch now fixes the following problems:
I tested this patch on the Drupal.hu (4.5) database, and it works excellently, fixing multiple critical issues. Please test, please apply.
Comment #16
gábor hojtsyOh, the patch.
Comment #17
dries commentedManaged to reproduce the problems. Committed to HEAD. Thanks, Goba!
Comment #18
(not verified) commented