Posted by stanlog on July 12, 2009 at 10:15am
Jump to:
| Project: | BitTorrent |
| Version: | 6.x-9.2-alpha6 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
Hi,
I've got a problem when I'm updating Bittorrent module from "bittorrent-6.x-9.1.tar.gz" to "bittorrent-6.x-9.2-alpha6.tar.gz". After I've updated the module, i've got the message "Call to undefined function settings_get() in /xxxxx/sites/all/modules/bittorrent/bt_profile/bt_profile.module on line 48"
When I browse update.php, the page is displayed, I start update, and on finish (update.php?id=70&op=finished), I've got already the message "Call to undefined function settings_get() in..." blablabla ;-)
Could you help me ?
Thanks a lot
Regards
Comments
#1
Now, I've the same error on line 103 :
"Fatal error: Call to undefined function settings_get() in /xxxxx/sites/all/modules/bittorrent/bt_profile/bt_profile.module on line 103"
line 103 in bt_profile.module : "if ($node->type == settings_get('content_profile_node_type_name')) {..."
However, I've got "settings-6.x-1.1-alpha3.tar.gz" installed and actived.
If these informations can help...
Regards
#2
I'll try to solve this issue, need to think.
#3
I cannot reproduce this error...
You can try to run following SQL script on your DB:
UPDATE system SET weight = -100 WHERE name = 'settings'Or you can use http://drupal.org/project/util module to set "settings" module weight to "-100".
If this will not help, I'll try to help you again.
#4
1) just roll back to alpha3
2) install the new dependency module http://ftp.drupal.org/files/projects/settings-6.x-1.1-alpha3.tar.gz
3) update to alpha6 or higher.
#5
Sorry, I accept the problem is still there even after the install of 'settings' module. The problem appears when update.php is running. I've been updating from alpha3 to alpha6.
I've changed the priority of the settings module, but no luck, update.php is still failing with "Call to undefined function settings_get() in XXX/bt_profile.module on line 48".
#6
The same error is appearing on a fresh install.
#7
I experienced the very same issue. I had to delete the installation - delete the tables - and every instance of bt_torrent from db tables with exception of watchdog, I then rolled back to fresh install of 6.x-9.1 and only enable bt_torrent and bt_profile. Seems to be an issue with bt_tracker module - additionally I have commented out the following lines from bt_torrent.module:
'<div>'.t('Release total size').': '.bt_format_size($torrent->total_size).'</div>'.'<div>'.t('Last seed time').': '.( /*isset*/($torrent->last_seed) ? /*format_date($torrent->last_seed)*/ format_interval(time() - $torrent->last_seed) : t('Never')).'</div>'.
from function theme_torrentfield_widget_preview()
and:
$files = $bparsed['files'];unset($bparsed['files']);
foreach ($files as $info_hash => $scrape_info) {
db_query("UPDATE {bt_torrents} SET seeders = %d, leechers = %d, downloaded = %d WHERE info_hash = '%s'", $scrape_info['complete'], $scrape_info['incomplete'], $scrape_info['downloaded'], bin2hex($info_hash));
}
from function bt_torrent_cron() as it was sending null to foreach() statement and preventing cron from finishing in the process.
I am re-working the code and currently can scrape file list, individual file size, and total torrent size. seeds, leeches, and last seed are scraping and updating the db properly but I want to re-work the code as it is iffy - sometimes it updates db and sometimes it doesn't.
Additionally - a bug I noticed which can easily break this module - if you go to create a torrent - add the file and then remove before saving the node the torrent is still being loaded into DB and uploaded to file system which results in new torrent with a naming scheme of torrent_name_0.torrent
It would not be a problem except that the DB ends up with two torrents with the identical hash - which I believe may contribute to breaking the scrape.
Anyway, you could let me know the tables where torrent info is stored? You use settings module but there's no actual table for settings and deleting torrent manually from tables bt_torrents and bt_torrent_files does not seem to get rid of all the info..
I am very interested in this module - if you are winding down maintenance or would like additional support I intend on re-working your code from the ground up. Currently, I have managed to get the few things that work - working well. And have had huge success in improving views integration through the use of CCK and modifications to the .module code - I will be launching a site over the next few days with this module and plan to seriously develop over the next year - I like what you've done but can't help but feel there's some - elegant solutions to the bugs I would like to help discover the solution for
I will continue to contribute my changes and rework - and if you plan on handing over maintenance I would very much be interested.
I hope this helps some get their installs working - and will try to help where I can with additional fixes - I've simply shut off bt_tracker for the time being
#8
After update the settings to the http://ftp.drupal.org/files/projects/settings-6.x-1.1-alpha3.tar.gz things got working