When a new program is created, genre and url are inserted in the station_program table as expected. But when the program is edited, these fields won't update.
Revisions are turned on; is that the problem?
The code didn't seem to account for that in this:
function station_program_update($node) {
db_query("UPDATE {station_program} SET genre = '%s', url = '%s' WHERE vid = %d", $node->genre, $node->url, $node->vid);
}
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | station_program_196234_HEAD.patch | 1.52 KB | drewish |
| #8 | station_program_196234.patch | 1.48 KB | drewish |
| #5 | station_program_fieldupdate.patch | 741 bytes | rjleigh |
Comments
Comment #1
drewish commentedyeah that might be the problem... looking at the module there's really only half-way support for revisions. deleting a specific revision isn't supported... eek.
Comment #2
drewish commented"that" meaning enabling revisions
Comment #3
rjleigh commentedA quick fix, then:
But, as you said, there's more to it to support revisions cleanly. I like to turn them on to troubleshoot user error reports.
IMO, the best solution would be to just allow designation of a CCK nodetype as the "program" anyway - but I'm not sure how this would effect the rest of the module.
Comment #4
drewish commentedwant to roll that as a patch?
that had been my intention a while back but once the cck stuff got into core and you can add fields to any node type it fell off my radar. feel free to open a new issue requesting this in HEAD. i've thought about moving the genre and url into CCK fields but i'd need to do it in such a way that it provided an upgrade path for people. that and a way to link program fields to archived audio...
Comment #5
rjleigh commentedok, here's the patch.
While it's ok to add to the current method with CCK, there are issues like this, of course. And the funny thing is, I don't even want to use the genre field to sort in the site - I'm using a set taxonomy for that! But people get upset if they fill it out and it doesn't show up.
Comment #6
drewish commentedright, it serves a bit of a different role from the taxonomy in that it's free form so people can be more specific than "r&B" or "talk". i'd be into an adding option to hide those two fields if people want to go the cck route.
the reason i wanted this feature request for HEAD is that the daily schedule is now a view so you could display your genre taxonomy there. 1.x is just getting bug fixes at this point.
i'll try to take care of that patch later today.
Comment #7
rjleigh commentedagreed. done. see http://drupal.org/node/196477
thanks
Comment #8
drewish commentedthis adds support for deleting revisions. mind giving it a test?
Comment #9
drewish commentedcommitting the attached patch to HEAD.
Comment #10
drewish commentedbetter title
Comment #11
rjleigh commentedhad problems applying the #8 patch to 1.4 version of module.
the code is fine - tested with a manual patch.
Comment #12
drewish commentedgreat committed to DRUPAL-5.
Comment #13
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.