I disabled first schedule, then station module. On submitting the module admin page the second time, I get this:

Fatal error: Call to undefined function station_has_archive() in D:\xampp\htdocs\drupal-cvs-station\sites\all\modules\station\schedule\views.inc on line 207

Going to the root URL of my CVS test site produces the same message.

CommentFileSizeAuthor
#3 station_schedule_195764.patch879 bytesdrewish

Comments

joachim’s picture

I seem to be back on ...
but it's going haywire since last update from CVS.

schedule isn't shown in the module list, though it's clearly enabled as I can create schedules and see them.

Going to a schedule day page produces this:

user warning: Unknown column 'station_schedule_item.archive_links' in 'field list' query: SELECT node.nid, ((station_schedule_item.start + 10080) % 10080) AS station_schedule_item_start_sort, station_schedule_item.start AS station_schedule_item_start, station_schedule_item.finish AS station_schedule_item_finish, station_schedule_item.schedule_nid AS station_schedule_item_schedule_nid, station_schedule_item.archive_links AS station_schedule_item_archive_links, node.title AS node_title, node.changed AS node_changed, station_program.genre AS station_program_genre FROM node node LEFT JOIN station_schedule_item station_schedule_item ON node.nid = station_schedule_item.program_nid LEFT JOIN station_program station_program ON node.vid = station_program.vid WHERE (node.type IN ('station_program')) AND (station_schedule_item.schedule_nid = 1) AND (station_schedule_item.finish > 5760 AND station_schedule_item.start < 7200) ORDER BY station_schedule_item_start_sort ASC in D:\xampp\htdocs\drupal-cvs-station\includes\database.mysql.inc on line 172.

drewish’s picture

station_has_archive() should be defined in the station.module. if that's active there shouldn't be a problem. the error in #2 is because the schedule tries to conditionally remove the fields if the archive isn't enabled...

drewish’s picture

Status: Active » Needs review
StatusFileSize
new879 bytes

try this out.

joachim’s picture

Sorry to make a mess of this issue....

The fatal error occurs when I disable station.module.
I think because station_schedule isn't showing in the module list, it's being allowed to remain active when I disable station. Hence the function can't be found.

No joy with the patch yet, as to test built-in views I have to disable the modules and reenable them...

drewish’s picture

why do you need to disable the modules? to clear out the cache? the devel module works great for that...

joachim’s picture

Ok...figured it out.

My old versions of the module in a subfolder were causing the vanished module. Moved them out of the way :)
With your patch now applied & default views refreshed, everything works properly.

drewish’s picture

i just tried (with that patch) disabling everything and then re-enabling and it was fine...

joachim’s picture

Yeah -- it was my fault.
*feels sheepish*
I'd been keeping past version of station_schedule.module and .install in a subfolder while I was working on the schedule trim patch, to keep milestones that worked :) It hadn't caused me any problems yet, but I'd not disabled any of the station modules on that installation so far...
I think we can close this.

drewish’s picture

Status: Needs review » Fixed

great. well i committed #3 since it did fix a bug.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.