I've been running Storm for close to a year before any users reported this issue, so this isn't a show-stopper. Anyhow, here's the error:
user warning: Unknown column 'task_stepno' in 'where clause' query: UPDATE stormnote SET task_title='', task_stepno='The task title ended up here' WHERE task_nid=721 AND (task_title<>'' OR task_stepno<>'Task title ened up here too.') in C:\xampp\htdocs\modules\storm\stormnote\stormnote.module on line 212.
If you look in stormnote.install, you'll see that the task_stepno has been dropped from the table in stormnote_update_6101():
db_drop_field($ret, 'stormnote', 'task_stepno');
but is still called in the stormnote_stormtask_change function in stormnote.module. I haven't changed or tested a fix yet, but expect that amending the query to not update task_stepno will fix the problem.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | storm--sn-stepno-1.x.patch | 3.53 KB | juliangb |
| #4 | storm--sn-stepno-1.patch | 3.53 KB | juliangb |
Comments
Comment #1
juliangb commentedI've just had a look at the code and your diagnosis is quite correct.
The fix should just be to remove all references to the step number as you suggested.
We should also check that the hook invocation in storm task does not reference the step number and that no other implementations of this hook use it either.
It suggests we should have automated tests on updating Storm nodes as well as just creating them - which should catch this type of thing in future.
We need to fix this in the 6.x-2.x branch first, but as it is a bug fix, it can then be back ported to the 6.x-1.x branch.
Are you able to supply a patch?
Comment #2
eighthourlunch commentedHaving never written a patch, I'm probably not going to be your fastest option. However, I did remove the references to task_stepno in stormnote.module. I tested it on my dev box, and then in production. I haven't seen the error return today, but I'll update here if I see anything.
In the meantime, I guess I'd better learn to write patches. :)
Comment #3
juliangb commentedLearning to write patches is something you will never regret - there are instructions here to help - http://drupal.org/node/707484 .
Comment #4
juliangb commentedThis patch:
- Removes the field from stormnote
- Standardises the parameters of this hook to the order nid, title, step_no (which I think is most logical). Previously there was a mismatch between the order when invoked and the order when implemented in stormnote.
Comment #5
eighthourlunch commentedThanks, I'll add it to my queue. :)
Comment #6
juliangb commentedI've pushed this onto 6.x-2.x.
This is a reroll against 1.x. No other changes.
Comment #7
juliangb commentedCommitted to 1.x.