Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
(description follows)
Comment | File | Size | Author |
---|---|---|---|
#111 | oh_no_reopened_again.patch | 2.31 KB | David_Rothstein |
#105 | thats_what_you_get_for_skipping_process.patch | 812 bytes | chx |
#104 | thats_what_you_get_for_skipping_process.patch | 496 bytes | chx |
#96 | interdiff_88_95.patch | 1.86 KB | chx |
#95 | drupal.format-exists-update.95.patch | 10.53 KB | sun |
Comments
Comment #2
sunComment #3
sunProblem
Goal
Details
format
columns from int to varchar.format
) for new text formats. Existing machine names cannot be changed (since format IDs could not be changed either).format
column values are simply converted from an integer to a string. Of course, new D7 sites get proper machine names in the form ofplain_text
,filtered_html
, andfull_html
. The straightforward and dead simple conversion from integers only happens for sites upgrading from D6.API changes
format
columns that currently reference a format ID are converted to varchar.Required patches
Required follow-up issues
Comment #5
Damien Tournoud CreditAttribution: Damien Tournoud commentedJust to state the obvious: you need an upgrade path for (text) fields.
And it would have been *way* easier to do that *before* the beta.
Comment #6
mfer CreditAttribution: mfer commentedsub
Comment #7
sunActually, the last patch failed due to a testbot hiccup. It's green now.
Of course, an upgrade path for text fields is still missing. I have no idea how to do that, but I guess I will find out. ;) However, before continuing with this patch, I'll wait for some sign of the core maintainers.
Comment #8
Crell CreditAttribution: Crell commentedRe #5: Yes. See #933846: Better distro support for all the messy background. :-)
I see two possibilities for the upgrade path:
Ints are still valid strings. There's, programmatically, nothing about "1" that makes it invalid as a string identifier. We could just leave it. :-) An advantage of this approach overall is that, because ints are valid strings, the API breakage is kept to an absolute minimum.
As an extension of that, simply add a prefix. format 1 becomes "format_1", format 2 becomes "format_2", etc. I believe coder upgrade module did that for block deltas, which also switched from mostly ints to must-be-string in D7.
While I cannot think of a use case off hand for a machine name longer than 64 characters, we've been bitten by too-short varchar fields in the past many many times. Especially if we end up with dynamically created machine names (which will happen sooner or later; it always does). We probably want to make this bigger and save ourselves the headache later.
If the idea is to have a machine name, why is this being queried by human name?
This seems like a potentially good case for a merge query instead.
Powered by Dreditor.
Comment #9
eaton CreditAttribution: eaton commentedIn the D6 world, this is what we're looking at in moving Workflow module from serial ids to machine names for its workflows. I'm partial to the "Just turn the ID into a string" approach because it utterly eliminates any danger of stray ids being scattered around and missed by the upgrade path.
This is purely aesthetic, though, isn't it? There's nothing (in theory) to keep us from just using the numeric ones. That's what was also done for node build modes in previous versions of Drupal -- while it was less than ideal, we demonstrated that contrib can build on that effectively.
Comment #10
yhahn CreditAttribution: yhahn commentedI've read and applied the patch in #2. It works as expected and makes working with filter formats in code more readable (see adjustments to tests and use of API to create filter formats). This is a much cleaner approach to introducing machine names into core than adding an additional column - it means contrib can continue to use the same
->format
property and have a minimal upgrade path that involves at most a small schema change (like the changes in patch totaxonomy.install
) or no changes at all if format references are stored flexibly in a serialized field or a variable.Other than Crell's notes in #8, this patch will need an upgrade path which I am happy to help with and test.
Comment #11
Crell CreditAttribution: Crell commentedEaton: Actually, if anything I think the node build modes in D6 is a great example of why we should convert to strings. :-) To this day I am still mystified by what I can do with D6 build modes and do not comprehend why I sometimes get different lists.
Comment #12
sunThanks for the initial reviews and testing.
I agree that we should not do any special string manipulation and simply convert existing IDs to strings. Like yhahn mentioned, this not only simplifies the upgrade path for all modules, but also allows serialized data to be stored as is. For the Filter API, it really makes no difference whether $format->format is "1" or "format_1". Since it makes no difference, there's no need to complicate this update path.
@Crell: I already considered to use db_merge(), but we're facing the following code situation:
1) $format is an object, not an array, not sure whether db_merge() is smart enough to handle objects?
2) If db_merge() cannot handle objects, then we'd have to cast to an array into a temporary variable and pass that into ->fields().
3) We'd have to manually assign all potentially undefined properties for $format before or after saving. Right now, d_w_r() takes over that part.
Ultimately, I doubt that db_merge() would make this any simpler?
Also, non-obvious @todos for this patch:
- I've removed the unique index on {filter_format}.name. filter.admin.inc still contains form validation logic for that uniqueness. Also, the filter_update_N() does not remove the index.
- The 'filter_fallback_format' variable might need to be updated accordingly. For extra safety, I've changed the comparison in filter_permission_name() to a type-agnostic comparison, so
$format->format !== filter_fallback_format()
will fail, if one of both is not a string. Need to think about this some more, it might be possible that we can also revert it.Comment #13
Crell CreditAttribution: Crell commentedNo, db_merge() doesn't handle objects. It's a simple cast, though. And if a field isn't defined, the DB should fill in the default anyway, shouldn't it? d_w_r() just pulls its defaults from the schema anyway. Even then, are we actually going to get partially-filled $format objects in practice (that don't count as broken code to begin with)?
I admit I'm somewhat biased since I consider d_w_r() to be a blight upon the earth to be exterminated with religious zeal; its only reason to exist is that db_merge() didn't exist yet as of Drupal 6 and we haven't fully gotten around to expunging its evil from the world.
Possibly unrelated here, but I also note that the filter table has a field (that's being modified here) that is marked as being a foreign key in the description but doesn't have its FK-ness defined in the schema API. We should fix that.
Comment #14
webchick"- I've removed the unique index on {filter_format}.name. filter.admin.inc still contains form validation logic for that uniqueness. Also, the filter_update_N() does not remove the index."
That doesn't make sense to me. There are other ways to create formats than through the UI. What problem does removing this index actually solve?
Comment #15
sun@webchick: The human-readable name of a format is unimportant with this patch. Until now, we tried ;) to enforce some kind of uniqueness for text format labels, but those can be changed at any time, so it's like renaming a node type's label. Completely unnecessary if there is a unique machine name.
Comment #16
sun@Crell: I understand. However, the difference is that d_w_r() populates $format with all default properties and values that were not necessarily defined. Since hooks are invoked afterwards, we absolutely have to make sure that the $format object is fully populated. Therefore, if we'd go with db_merge(), then we'd have to resemble the schema's default values before or after the db_merge(), test each property individually, and conditionally set it. Hm. AFAICS, the only property that's not covered yet, is $format->weight... so lemme re-roll ;)
Comment #17
Crell CreditAttribution: Crell commenteddb_merge() followed by a select would do it, wouldn't it? :-) It's the same number of queries.
Comment #18
sunChanged into db_merge(), and resolved all non-obvious @todos from #12.
Comment #19
moshe weitzman CreditAttribution: moshe weitzman commentedI agree with webchick and don't grok sun's response. Format should be a sole primary key in its table. Right now, it looks like (format, name) is the primary key. Duplicate machine names should be enforced at DB level in addition to FAPI.
Comment #20
moshe weitzman CreditAttribution: moshe weitzman commentedIf we *also* want a unique index on name, thats fine.
Comment #22
Dries CreditAttribution: Dries commentedOverall, I like the approach taken in this patch. It's not as bad of an API change as I expected it to be so I think we should seriously consider this for Drupal 7. Let's continue to flush out the remaining glitches.
Comment #23
sunSorry, can someone clarify the confusion, please? {filter_format}'s primary key is only 'format', nothing else. We previously had an additional unique key for 'name' -- but only because we had no other way to ensure that a certain format only exists once. Since 'format' becomes the machine name now, it already ensures uniqueness, so there is little point in additionally requiring that 'name' must be unique. Especially, since we just recently added functionality to disable text formats (but not delete them), this is the only way to re-add a text format that uses the same name as a previously disabled one.
I hope that clarifies the situation.
Powered by Dreditor.
Comment #24
sunTo fill in the obvious gaps.
I'm not really sure whether anyone ever thought about doing Field API updates. My head just imploded multiple times...
Comment #25
sunReally, my brain exploded. See code comments in text_update_7000().
Comment #26
sunComment #27
sunTo make any sense of field storage engines in D7, everything below the lengthy comment must live in a Field API function.
But hey, now comes the tricky part: We are not allowed to invoke module functions or hooks in module updates.
This means that field_sql_storage module has to be duplicated into field_sql_storage.install.
And the same needs to happen for any other field storage engine in contrib.
Lastly, field.install needs to contain module update API functions, because the API functions cannot live in the module, since we are not supposed to invoke module functions from updates.
Powered by Dreditor.
Comment #28
chx CreditAttribution: chx commentedAlthough I have stopped doing D7 work because I was called a problem and until I get an apology for that I am not going to do anything, I had enough of sun's allegations of how field storage engines are badly designed. Dude. We did not design it in a basement closed away from the world and then locked it down for good. Quite the opposite. Even when we were sprinting we were giving reports often. And after that you had two years to contribute and speak up if you had a problem. We made it crystal clear that the divisor between fields and instances is that fields get the things that are hard to update. Like, you know, the schema.
Now, the main argument against keeping the rules as they stand for everyone is that we do not have an export-import tool that can handle variables? Create a text format, save the id into a variable and then use that variable to create, say, a view. As what you want is a distro, this is perfectly doable as you know your own variables. This can be done without doing a schema change past beta.
Comment #29
chx CreditAttribution: chx commentedHere is a list of comments from the other issue who said this is Drupal 8, just so that we see clearly
Comment #30
sunAttached patch resolves the problem. Constructive feedback welcome.
Comment #32
chx CreditAttribution: chx commented+ foreach (module_implements('field_update_forbid') as $module) does not belong in an update function.
Comment #33
sunThe current field_update_field() does invoke hook_field_update_forbid() to allow field storage engines to veto a field update. Sure, we can remove that from the update helper, but that would make the API inconsistent with the regular Field CRUD API. In the end, field updates always have to invoke modules, because field storage engines simply are modules, so there's little point in restricting invocation of module hooks for field updates.
That said, I'm not entirely sure why that forbid-hook exists at all. If a particular field storage engine cannot or does not want to execute a field update, it can simply ignore it, or throw a FieldException in the engine-specific update hook. In other words: I cannot think of a scenario where any other module would want to prevent a field update from happening. Only the field storage engine is able to decide that on its own. If a developer disagrees with a field storage engine's behavior, then that developer can fork the field storage engine to behave like he/she thinks it's right and use that storage engine instead.
Comment #34
David_Rothstein CreditAttribution: David_Rothstein commentedI once thought so too...
But then was educated otherwise: http://drupal.org/node/11218#comment-1986086
Those proposed changes are a separate issue and should not be part of this patch.
Comment #35
sunComment #36
sunReverted the removal of enforced {filter_format}.name uniqueness.
Comment #37
sunSimplified and clarified text_update_7000() by remixing some lines.
Comment #38
sunoopsie -- in-patch edits are a bad idea if you happen to forget to also change the actual code... Reverted those {filter_format}.name uniqueness changes once again ;)
Comment #39
sunThinking through all possible scenarios that field type modules can face, we need to remove those lines entirely. It might make sense for Field UI to prevent such updates, but field type modules have to be able to maintain all and any kind of their data, regardless of whether a module is renamed or it's just a simple field schema change.
This is still contained. I'd like to hear some more opinions on this. If there are no real reasons for this hook to exist, we might as well remove it entirely (also from field_update_field()).
See #33 for why I think this is hook is pointless.
Separate issue: This code is repeated many times throughout Field API. However, the current serialized 'data' column still contains stuff it should not contain (such as field schema data), so we really need a solid helper function for this operation.
Again, separate issue.
Changed this into a db_update() in attached patch. Update functions must not rely on Schema API.
Powered by Dreditor.
Comment #40
sunTests are failing, because field_update_field() currently happens to rely on the coincidence that the serialized {field_config}.data column mistakenly (?) also contains field schema information. The current code of field_update_field() entirely relies on hook_field_schema() and I fail to see how that code can remotely work under normal circumstances.
Right now, field_update_field() tries to update a field by automatically generating the previous schema information for it, which naturally fails, because the field type schema is always up to date. Only the current code in HEAD that makes field schema information appear in {field_config}.data allows that code to work. This looks completely bogus to me, but then again, I'm not sure whether it was purposively designed that way (lacking alternatives).
Comment #42
sunBut yeah. That critical bug is irrelevant for this issue, so I went ahead and commented out the fix; added a @todo instead.
Comment #43
sunFixed update of field_config storage columns.
Comment #44
sunApparently, field storage engine settings in $field['storage']['settings'] were also (mistakenly?) contained in the serialized field_config.data column.
Comment #46
chx CreditAttribution: chx commentedNow, this became a kitten killer monstrosity. You are changing which keys are unset field_update_field, adding a $conditions mechanism for field_update_field, creating a problematic and controversial _update_7000_field_update_field utility, changing field_sql_storage_field_update_forbid / field_sql_storage_field_storage_update_field, the accompanying test. http://www.webchick.net/please-stop-eating-baby-kittens
No. File different issues. This is completely and absolutely unreviewable. I would be glad to work with you to get field API problems fixed in a speedy manner but not in one issue which, in itself, is not yet approved by Dries to be Drupal 7 anyways.
Comment #47
sunCreated a critical issue: #937442: Field type modules cannot maintain their field schema (field type schema change C(R)UD is needed)
Comment #48
alex_b CreditAttribution: alex_b commented#44 is broken out to #937554: Field storage config entities 'indexes' key.
chx suggested to write a field_sql_storage-engine-only update hook for changing the field schema for format. Let me give this a shot.
Comment #49
alex_b CreditAttribution: alex_b commentedThis is patch #44 with the following modifications:
- Implement text_update_7000() for SQL storage engine only (this removes the entire
_update_7000_field_update_field($prior_field, $field)
portion of #44).- Use form element #type 'machine_name' after #902644 went in.
Comment #50
alex_b CreditAttribution: alex_b commentedComment #51
yched CreditAttribution: yched commentedNote that we'll still need update-friendly versions of field_update_field() / field_update_instance(). There will be housekeeping of stored $field and $instance definitions. Those could possibly be just the 'array-massaging-into-SQL-friendly-structure' part of their 'official API' counterparts - that is, once those very parts are sorted out in #937554: Field storage config entities 'indexes' key.
Not necessary for this patch if it can live without, though.
Comment #52
Crell CreditAttribution: Crell commented#50 looks good to me on visual inspection. I defer to the Field API experts on #51. Nice use of machine_name, too.
Comment #53
sunRight -- so we're basically back to the originally posted patch in #26, merely with a marginal difference in text_update_7000().
These functions live in field_sql_storage.module. They merely concatenate the passed in values and do not invoke hooks. So it should not be a problem to invoke them.
Background: Over in #922996: Upgrade path is broken since update.php does not enforce empty module list, there's an ongoing discussion about emptying/resetting the module list and hook implementation cache prior to executing a module update (to prevent invocation of hooks). It doesn't look like it affects those function invocations though.
Powered by Dreditor.
Comment #54
q0rban CreditAttribution: q0rban commentedSubscribe
Comment #55
Dries CreditAttribution: Dries commentedDecided to commit this patch to help us improve support for distributions.
Thanks for working on this, for trusting my judgment and respecting the decision.
Let's continue to make progress, please.
Comment #56
rfayWow, amazing.
Created issue #946876: Filter format IDs are now strings! Use descriptive IDs in Filter Example for examples project to utilize this. It seems more than half of D6 code that provides blocks uses an int for the delta, even though it became string all that long ago. We really don't want that to happen with filter IDs so we should promote the new use aggressively.
I think this should probably be announced too, even though it doesn't break anything.
Comment #57
chx CreditAttribution: chx commentedOK, tell me that after linking http://drupal.org/node/11218#comment-1986086 how did we commit dropping human name unique index?
Comment #58
catchNot only this but the schema definition wasn't updated to remove the unique key, it was only dropped in the update.
This is precisely the kind of fallout that allowing schema and changes past beta creates, as the original issue spawns more and more followups.
Since it has only been a few hours since this was committed, let's hope no-one ran the update yet and just remove that hunk. If people care about the few hours window, they can open a head2head issue.
If people were feeling helpful, they could open an issue for mongodb_field_storage module for this too - mongo doesn't need a schema change, but it's type strict, so it's likely all the int values in mongo storage will need converting from text to string types in place, otherwise queries on the wrong type will fail.
Comment #59
chx CreditAttribution: chx commentedThat sounds a plan. Those who want that unique dropped can open another issue because it does not belong to this one in the first place!
Comment #60
catchIn #35 the hook_schema() change and the update hook were both in, in #36 the schema change was reverted.
So it looks like sun forgot to revert the update hunk, and then everyone was so excited about distributions that they didn't notice in the 11 days between the patch being posted and committed. Which makes this no less annoying but I don't think there's anything else needs to be done apart from removing that hunk and closing this issue again as quickly as possible.
Comment #61
webchickCommitted #58 to HEAD.
Comment #62
David_Rothstein CreditAttribution: David_Rothstein commentedNeeds to be documented in the module upgrade guide, since it affects any module that stores text format data.
Comment #63
David_Rothstein CreditAttribution: David_Rothstein commentedLooking at the patch, this also seems like it broke the upgrade path for taxonomy.module - sites upgrading from D6 (or D7 beta 1) will still wind up having {taxonomy_term_data}.format be an integer, won't they?
Comment #64
yettyn CreditAttribution: yettyn commentedSorry to spoil the party but "Commit #438848 by Dries at 03:15" including changes to "Drupal core: /modules/field/modules/text/text.install 1.3" fails on running update.php with a "DatabaseSchemaObjectDoesNotExistException", see attached screen shot.
dev version before this one was from Oct-18
It's above my head but though to let you know it breaks, possibly because I missed a dev version in between?
Comment #65
yched CreditAttribution: yched commented[edit : crosspost with #64]
The D7->D7 upgrade is also broken.
text_update_7000() raises an exception in DatabaseSchema_mysql::changeField() :
"Cannot change the definition of field field_data_.comment_body_format: field doesn't exist."
That's most probably because of :
$prior_field is undefined - should be $field.
AAMOF, I'd recommend hardcoding table names in the update func. If for some reason field_sql_storage changes its table naming convention in the future, the _field_sql_storage_tablename() function will return a table name that does not match the state of the db at the time the text update is run. We had similar cases in CCK, and had to insert schema version checks inside the tablename() functions back then.
Comment #66
sunComment #67
sunComment #68
yched CreditAttribution: yched commentedThe fix for text_update_7000() is good - tested, works fine.
I'll let David feedback on the taxo update fix.
Comment #69
yettyn CreditAttribution: yettyn commented#67 works for me, thanks.
Comment #70
webchickCommitted #67 to HEAD. Hopefully that makes testbot a bit happier. And this is why we shouldn't make schema changes during beta. :D
Reverting back to "needs work" for documentation.
Comment #71
catchThose upgrade path changes should have been caught by tests. Or was the test bot actually down?
Comment #72
alex_b CreditAttribution: alex_b commentedGreat to see this committed. Sorry for the fallout.
Just talked to sun, I will supply tests and upgrade documentation shortly.
Comment #73
David_Rothstein CreditAttribution: David_Rothstein commentedIt looks fine to me, and I tested that it works also.
At least for this one, I think it would be hard to write an upgrade test that catches it. There is no error on upgrade (just a different schema) - you wouldn't see anything actually explode on your site until you (a) created a new text format, and then (b) assigned it to a taxonomy term description.
The text.module update issue, though, yeah - that could probably have a test.
Comment #74
alex_b CreditAttribution: alex_b commentedDocumentation requested in #62 is up: http://drupal.org/node/224333#text_format_string
Comment #75
alex_b CreditAttribution: alex_b commentedAdds upgrade tests for
- filter_format.format
- user.signature_format
- block_custom.format
My questions:
- Did I add the test in the right place (simpletest/tests/upgrade/upgrade.filter.test)?
- What other upgrades should be tested?
Comment #76
David_Rothstein CreditAttribution: David_Rothstein commentedI spent some more time thinking about the committed patch, and there are a couple more issues here, including another security problem.
Suppose you have a text format that is used on your site, and there is content stored with it. Then you disable the format. Now you go create a new text format and decide to give it the same machine-readable name as the old one had. Boom. Instead of creating a new format, what happens is that the old disabled format is "turned on" again, and is given all the properties+filters that the old one had. So all your content starts displaying again, but in a completely different format. That is a security hole.
The attached patch fixes that by adding a new filter_format_exists() function, although:
Comment #77
David_Rothstein CreditAttribution: David_Rothstein commentedOops, crosspost.
Here are the two patches merged together. Could still use a test for the security issue I mentioned above, though.
Comment #78
David_Rothstein CreditAttribution: David_Rothstein commentedOn a brighter note, here is a nice cleanup issue that the original committed patch here allows :)
#947844: Clean up filter-related tests that load text formats by their human-readable name
Comment #79
alex_b CreditAttribution: alex_b commentedAdding a test for #76
Comment #80
alex_b CreditAttribution: alex_b commented- Added a test attempting to create a format of an existing machine name.
I see one existing assertion of the filter tests failing on my local *vanilla* D7 installation ('Filter removed invalid tag.'), let's see what test bot says.
Comment #82
alex_b CreditAttribution: alex_b commented- Fixed checking for existing filter format _names_ (this was broken due to a check for the presence of $form_state['values']['format'] - which now is always present).
- Added a test verifying that filter formats of the same name can't be created.
Comment #83
alex_b CreditAttribution: alex_b commentedPer discussion w/ chx on IRC, I've improved the following comments:
- Compare functionality between filter_format_load() and filter_format_exists() in filter_format_exists() comment.
- Comment on format_set_value() in filter_admin_format_form_validate().
- Improve comments on assertions verifying that it isn't possible to create duplicate machine names / human readable names even if text formats in question are disabled.
Comment #84
chx CreditAttribution: chx commentedLooks good!
Comment #85
webchickI'd love to see a final +1 here from sun or David Rothstein, but looks good here. Thanks for the quick rally.
Tagging as beta blocker because it'd be good to get this new feature completely polished off beforehand.
Comment #86
David_Rothstein CreditAttribution: David_Rothstein commentedLooks mostly good, and nice catch on the isset() thing in filter_admin_format_form_validate()... It seems there is a similar isset() check in filter_admin_format_form_submit() that could also be removed? But it doesn't have to be done here.
The first new filter module test looks good to me, but I don't understand the second one:
As far as I know, that behavior is a bug to be fixed, not something we should be verifying in a test :) ... (See the followup discussion in #914458: Remove the format delete reassignment "feature" - which I will move to its own issue after writing this.) If the format has been disabled, it is completely gone from the user interface, so we don't have any reason to prevent people from trying to create a new one with the same name.
Comment #87
chx CreditAttribution: chx commentedDavid, so how should we proceed? Remove that test?
Comment #88
David_Rothstein CreditAttribution: David_Rothstein commentedYeah, I would say remove it. Either that or modify it, so that the test tries to reuse the human-readable name of an enabled format instead. (Since that restriction is something we definitely do want to enforce.)
Comment #89
alex_b CreditAttribution: alex_b commented- Removes the stray isset() that David mentions in #86
Re: #86 test for unique human readable names: Let's keep this test in, as it verifies existing functionality - even though the functionality itself may be questionable. When #914458 lands, this test will need modification - great way to ensure test coverage =)
Comment #90
sunWe need to take #903730: Missing drupal_alter() for text formats and filters into account. I tried to think of ways to encapsulate a $include_disabled logic into filter_formats(), but that would be too complex. Thus, attached patch merely changes this function body in preparation for the drupal_alter() patch.
Powered by Dreditor.
Comment #92
effulgentsia CreditAttribution: effulgentsia commented#90: drupal.format-exists-update.90.patch queued for re-testing.
#90's bot hiccup has been happening a lot lately :(
Comment #93
David_Rothstein CreditAttribution: David_Rothstein commentedI don't understand this change. Why do we want to load the entire contents of that row just to check if the row exists? If that behavior is needed for #903730: Missing drupal_alter() for text formats and filters, then in my opinion it should be discussed there, not here.
#89 looks good to me, though. Yeah, I guess I agree with @alex_b's rationale about keeping the second test in. It will indeed ensure that we remember to write new tests if/when that particular bug is fixed!
Comment #94
catchYes I don't see what's wrong with #89 or why non-critical feature requests need to hold this up.
Comment #95
sunReverted that.
Comment #96
chx CreditAttribution: chx commentedDavid's concerns have been addressed, the last patch is by sun, again addressing problems -- seems we are good to go. I attached an interdiff of #88 - #95.
Comment #97
webchickCommitted #95 to HEAD.
I'm going to mark this closed now. I hope that it stays that way. :D
Comment #98
webchickReverting status + title, I think.
Comment #99
mfbSchema module is throwing a warning: filter.format is part of the primary key but is not specified to be 'not null'. Sorry I didn't yet read thru this issue, but is there some reason filter.format 'not null' changed from TRUE to FALSE?
Comment #100
webchick*sigh*
Comment #101
effulgentsia CreditAttribution: effulgentsia commentedIf it's a beta blocker, it's also critical, right?
Comment #102
effulgentsia CreditAttribution: effulgentsia commented.
Comment #103
chx CreditAttribution: chx commentedGiven that MySQL changes NULL fields without a word this, we were already running with this patch applied so it does not require a review.
Comment #104
chx CreditAttribution: chx commentedComment #105
chx CreditAttribution: chx commentedeffulgentsia asked me to patch the update too. That's totally unnecessary but for the sake of consistency I did that too. Once again: this patch does NOT change your database at all because MySQL makes your primary key NOT NULL whether you want or not.
Comment #106
mfbLooks good. The schema was already silently corrected by MySQL. With this patch, the declared and actual schemas match so schema.module is happy.
Comment #107
webchickHm. The original patch has a number of update functions, each of which are setting format to 'not null' => FALSE. Methinks they should be updated as well.
To confirm this, we'd need to run schema module on a database upgraded from beta1 to HEAD.
Comment #108
webchickOk, I get it.
It's problematic here because it's a PK field. In other modules' schemas it won't be.
I committed #105 to HEAD to remove the error. My hunch is we haven't seen the last of this issue yet, though, as not null -> FALSE seems to be a deliberate decision made for some reason up above.
Although as effulgentsia pointed out on IRC moments ago, this could've just been a copy/paste oversight since this is the "source" table for these formats in the first place, and can never be NULL.
I guess time will tell if we've heard the last of this issue or not. :)
Comment #109
effulgentsia CreditAttribution: effulgentsia commented'not null' => FALSE
in the other tables is probably correct, since it's not a primary key in those tables. It was likely a copy/paste error to have'not null' => FALSE
in the {filter} table itself, and not caught, given that MySQL silently corrected it. Given #106, RTBC.Comment #110
effulgentsia CreditAttribution: effulgentsia commentedx-post
Comment #111
David_Rothstein CreditAttribution: David_Rothstein commentedI really hate to do this. But.... The test from #95? It was never committed :)
Comment #112
webchick#111: oh_no_reopened_again.patch queued for re-testing.
Comment #113
webchickD'oh. Thanks.
Committed to HEAD. Really, really marking fixed now. :D
Comment #115
catchEight months later I am tempted to open this again, since it introduced a fatal error in the upgrade path for sites that had CCK module installed in D6. However instead of doing that I opened #1228488: Drupal 7 text module update (added during beta) runs on sites that have D6 CCK text module installed.
http://drupal.org/node/934050#comment-3552204 still stands.
Comment #116
catchSo tempted, I actually did re-open it, moving back.
Comment #117
chx CreditAttribution: chx commentedNote that #50 was committed to core after basically a single review by sun who wrote most of it. And it broke the upgrade path? News at 11! Yay for breaking the process and the freeze!