When I change a field setting, primarily one of the select boxes on admin/structure/types/manage/article/display, the selected option in the form always reverts back to the original value. The setting does get changed, but when the form refreshes it reverts back. pwolanin witnesses the behavior with me. It is not browser related as it happens on every client computer and every browser. I also used web scarab to intercept the server responses and see that it is indeed returning cached values. The ajax update that occurs when the select box is changed sends the correct value, and the server response shows the correct value, but when "Save" is clicked, the response sent back has the cached value.
I stepped down through the code to _field_info_collate_fields in field.info.inc. The line (187)
if ($cached = cache_get('field_info_fields', 'cache_field')) {
always evaluates true. When I go through the cache system, I find calls for cache variables that I don't have set. And there is nothing in the cache_field table.
I have a default install of 7.x-dev. I also have the problem in alpha6. It is a clean install, right out of the box, with a new database. Nothing has been changed after the install, including adding or removing modules. I've also installed it more than once, and this problem exists right out of the box.
The form shows the correct value when I log out and then log back in. Navigating away from the page, and reloading it does not help. This happens with and without the overlay.
Setup:
7.x-dev, 7.0-alpha6
Red Hat Enterprise Linux 5 server
PHP 5.2.10
MySQL 5.1.30
| Comment | File | Size | Author |
|---|---|---|---|
| #25 | report-db-info.patch | 826 bytes | jbrown |
| #25 | Screenshot-Status report | Drupal 7-Mozilla Firefox.png | 85.1 KB | jbrown |
| #24 | 875674-db-status-24.patch | 1.28 KB | pwolanin |
| #23 | 875674-db-status-23.patch | 1.27 KB | pwolanin |
| #20 | report-db-version.patch | 666 bytes | jbrown |
Comments
Comment #1
pwolanin commentedI verified this in person with David, but interestingly it does not occur on a local (laptop) install with PHP 5.2.12 and mysql 5.1.41. Didn't try other versions of php/mysql yet.
Comment #2
pwolanin commentednote - this also happens when javascript is disabled. So even though the field UI has some weird js-based form stuff, it seems unrelated.
Comment #3
pwolanin commentedLooking through the code, it seems like about the only way this could happen would be if mysql was holding the result in a query cache and not checking the underlying table?
Comment #4
pwolanin commentedLooks like a possible cause is this mysql bug: http://bugs.mysql.com/bug.php?id=40386
supposedly fixed in a slightly later version of mysql 5.1 than you have.
Can you try disabling the query cache (after verifying that you have it running now)?
Comment #5
pwolanin commentedIn combination with http://www.palantir.net/blog/beware-mysql-51-my-son it seems like at install time and when checking requirements Drupal should give you a big warning if you are using mysql 5.1 < 5.1.32
Comment #6
davidhernandezDisabling the query cache did it.
Is the recommendation to not have query caching on, or to use mysql 5.0 or 5.1.31? And are you saying the Drupal installer would have displayed a message about the mysql version, or that you think it should be made to display a message about it? If it already does, I did not get a message.
Thanks
Comment #7
pwolanin commentedI think it should be made to display a warning message.
Comment #8
pwolanin commentedComment #9
Crell commentedOh for the love of god... Subscribing. It sounds like we're going to have to start supporting only checker-board versions of MySQL, which is going to seriously suck.
Comment #10
damien tournoud commentedThere is no reason to support beta versions of MySQL. I'm for a hard failure.
Here are the versions that ships with distributions in the Debian world:
We are certainly not affected by the issue identified by Crell in everything < 5.1.32 (... I don't understand how it would make sense to UPDATE a NON-NULL column to NULL... that's certainly a bug in the affected module, and this type of craziness will definitely fail on PostgreSQL... much ado about nothing).
As a consequence, I would recommend a hard failure for any version on MySQL 5.0 < 5.0.51a and MySQL 5.1 < 5.1.31.
Comment #11
pwolanin commentedThe problem case is RHEL which apparently has 5.1.30 - I agree they suck, but I suggest an error or warning versus fail.
It can be made to work, but not optimally.
Comment #12
pwolanin commentedfor Drupal 6 here's the Postgres cod:
for mysqli:
see also: http://www.php.net/manual/en/mysqli.get-server-info.php
Comment #13
pwolanin commentedFor MySQL we can do:
for sqlite:
So I suggest we add a method to the DB driver interface that reports the server version.
Comment #14
Crell commentedThat's a worthwhile thing to do anyway, regardless of what versions we claim to support. Let's split that off to a separate issue.
Comment #15
pwolanin commented#878198: Regression: add back a method to the DB driver interface that reports the server version.
Comment #16
pwolanin commentedSince the version patch is committed here's a stub/starter patch for this.
setting to CNR just for feedback on the method naming, etc.
Comment #17
Crell commentedThe connection classes should not contain t() or any other Drupal-specific functions/utilities. It looks like we can move that information out of the classes anyway as they're all identical.
Comment #18
jbrown commentedI made a simpler patch.
Comment #20
jbrown commentedComment #21
jbrown commentedThis is a regression, as D6 reports the database version.
It's really useful to have this information in the status report.
Comment #22
jbrown commented#20: report-db-version.patch queued for re-testing.
Comment #23
pwolanin commentedIt it really useful to use the human-readable name versus the driver name?
Also I notice that PDO makes some additional meta-data available. Should we display that too? Like this?
Comment #24
pwolanin commentedoops - fixing doxygen.
Comment #25
jbrown commentedYeah - I think it makes more sense for the title to be the same regardless of which db engine is in use.
I don't like the title "Default database server". It isn't default. I prefer "Database system".
The description is looking like:
Uptime: 74917 Threads: 1 Questions: 738396 Slow queries: 0 Opens: 20978 Flush tables: 1 Open tables: 39 Queries per second avg: 9.856
This really clutters up the status report. It belongs on its own page like the PHP "more information" link and should be in a table. phpMyAdmin seems to provide a lot more information. Perhaps this should be in a contrib module.
I think its much better to have the human-readable name.
I played around with different layouts and I think it is better with the version as a separate entry.
Comment #26
pwolanin commentedLet's at least keep the added method even if we don't use it for this?
Comment #27
jbrown commentedLet's split that off to a separate issue.
Comment #28
pwolanin commentedno, please add it here - it's a trivial addition.
Comment #29
Crell commentedThe issue with #25 is that I don't see why we're using the DatabaseTasks class for the human-readable driver name. Then I looked and realized that, OMG, the drivers themselves don't have a human-friendly name method, do they? That should be fixed... except that runs into translation issues and pushes a t() or st() into the driver classes. We can't win. :-(
So bah, I'm calling #25 RTBC. The server info method isn't being used here and the data is easily accessible without the utility method so let's get this committed before RC makes the strings here unchangeable.
Comment #30
webchickHm. Agreed. And thanks for actually working on string freeze patches. :)
Committed to HEAD.