Upon upgrading from Drupal 4.7 to Drupal 5 the playlist functionality of the Station module seems to have broken. All the upgrade generally worked, but the "Show Recent Playlists" block stopped being displayed. Tracing this further to actually look at the specific playlist node brings up this error message if I try to edit the playlist:
warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'program_playlist_node_form' was given in /usr/home/kruu/public_html/drupal/includes/form.inc on line 218.
The playlist node itself only displays the descriptive text, and not the complete playlist table.
Looking into this further, this is what I found:
1. Go to "recent posts". This shows that the nodes that have this problem have an empty 'Type' field.
2. Looking for these records records in the node table for the specific nid reveals that the Type value is actually set to 'program_playlist' instead of 'station_playlist'. i.e., the nodes with station_playlist display fine, but the 'program_playlist' do not.
3. So maybe this is a bug in the code? So I grep'ed for "program_playlist" in the module/station folder. This revealed that playlist/station_playlist.install has this code:
$ret[] = update_sql("UPDATE {node} SET type = 'station_playlist' WHERE type='program_playlist';");
So why did this not get executed? It appears that just this code did not fire when I ran the update from 4.7 to 5.0.
4. Anyway, I decided to run the query to update all the records in my table to at least see if this fixes the problem.
5. Refresh the main page, and the Recent Playlists block magically appears!!!
So, now I need to figure out why the upgrade did not alter the table properly. i'll post more as I find out what's going on.
Comments
Comment #1
drewish commentedI think the problem is that part of the 5.0 upgrade is that I split the station_schedule module into several different modules. Since the station_playlist module wasn't listed as installed, the upgrade was not selected by default. So users may need to manually run the station_playlist module's updated 100.
Comment #2
drewish commentedI've moved the update from the playlist's install file to the schedule's install file.
Comment #3
cybertoast commentedRunning the update on the station-playlist module appears to work. I had initially run the update of all station modules, but as drewish notes, the fact that i had program-playlist and not station-playlist caused the update script to not work properly (although interestingly the "link" field was added fine to the playlist table, so not sure what happened there).
Anyway, doing an update to the station-playlist module fixes everything.
Comment #4
(not verified) commented