The problem is in this module's hook nodeapi. The 'validate' op is coded to dump & die. Looks like debug code left in the module to me. Temporary fix: comment out the print_r and die lines.
function node_limit_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
if ($op == 'prepare') {
if ($node->nid == 0 && _node_limit_violates_limit($node)) {
//we have a violation!
//and this is a new node
$nodetypename = node_get_types('name', $node);
drupal_set_message(t("You can't create more content of type !type", array('!type' => $nodetypename)), 'error');
drupal_goto('node/add');
}
}
else if ($op == 'validate') {
print_r($node);
die();
}
}
I noticed that the node limit is no longer listed on the admin page - but it seems to be applied to the node
not sure if the edit caused this...
hmmmm
[edit]
missing entry in modules admin page was caused by having a 2nd node_limit.module in sites/all/modules
however, when I revist admin/settings/node_limit I do no see my settings saved, not sure if the module is working, since I am limiting members to creating one video node I solved it with Pathauto and Rules.
Comments
Comment #1
socialnicheguru commentedstdClass Object ( [nid] => 11036 [vid] => 11788 [uid] => 1 [created] => 1248559012 [type] => ad [language] => [changed] => 1248564782 [aid] => 11036 [title] => test forum [body] => [format] => 1 [url] => http://myurl.com [tooltip] => [adtype] => image [adstatus] => offline [autoactivate] => 0 [autoexpire] => 0 [maxviews] => 0 [maxclicks] => 0 [revision] => 0 [log] => [name] => admin [date] => 2009-07-25 14:56:52 -0700 [status] => 1 [promote] => 1 [sticky] => 0 [op] => Save [submit] => Save [preview] => Preview [delete] => Delete [form_build_id] => form-492dd1ea5b4d4369c4da583dae5cf68c [form_token] => cb08811f381bef9070b8d2244e77ba21 [form_id] => ad_node_form [channel] => Array ( [1] => Array ( [channel-7] => 0 ) [2] => Array ( [channel-5] => 0 [channel-6] => 0 [channel-11] => 0 ) [3] => Array ( [channel-1] => 0 [channel-2] => 0 ) [4] => Array ( [channel-3] => 0 [channel-4] => 0 ) [5] => Array ( [channel-14] => 0 ) [6] => Array ( [channel-8] => 0 ) [7] => Array ( [channel-9] => 0 ) [8] => Array ( [channel-10] => 0 ) [10] => Array ( [channel-12] => 0 ) [11] => Array ( [channel-13] => 0 ) ) [premiere] => 0 [remnant] => 0 [epublish_abstract] => [menu] => Array ( [mlid] => 0 [module] => menu [hidden] => 0 [has_children] => 0 [customized] => 0 [options] => Array ( ) [expanded] => 0 [parent_depth_limit] => 8 [link_title] => [parent] => navigation:0 [weight] => 0 ) [subscriptions] => Array ( [params] => Array ( [1] => Array ( [sid] => 10248 [uid] => 1 [type] => thread [event_type] => node [conditions] => 1 [send_interval] => 0 [send_method] => mail [cron] => 1 [module] => notifications [status] => 1 [destination] => [fields] => Array ( [nid] => 11036 ) ) [2] => Array ( [name] => Posts of type Advertisement [type] => nodetype [fields] => Array ( [type] => ad ) ) ) [options] => Array ( [1] => 1 [2] => 0 ) [account] => stdClass Object ( [uid] => 1 [name] => admin [pass] => 21232f297a57a5a743894a0e4a801fc3 [mail] => admin@ my email address.com [mode] => 0 [sort] => 0 [threshold] => 0 [theme] => [signature] => [created] => 1244051903 [access] => 1248714471 [login] => 1248452871 [status] => 1 [timezone] => -25200 [language] => [picture] => [init] => admin@ my email address.com [data] => a:57:{s:10:"first_name";s:4:"test";s:9:"last_name";s:4:"test";s:7:"company";s:4:"test";s:7:"street1";s:0:"";s:7:"street2";s:0:"";s:4:"city";s:2:"sf";s:7:"country";s:3:"840";s:4:"zone";s:2:"12";s:11:"postal_code";s:5:"02904";s:5:"phone";s:10:"4153353886";s:7:"captcha";s:0:"";s:11:"captcha_sid";s:2:"93";s:20:"pending_notification";s:1:"0";s:7:"contact";i:1;s:3:"fbu";s:9:"509326453";s:8:"new_role";i:0;s:12:"new_role_add";s:1:"6";s:16:"new_role_add_qty";s:0:"";s:24:"new_role_add_granularity";s:3:"day";s:14:"picture_delete";s:0:"";s:14:"picture_upload";s:0:"";s:17:"mimemail_textonly";i:0;s:10:"user_title";s:0:"";s:16:"openidurl_server";s:0:"";s:18:"openidurl_delegate";s:0:"";s:14:"openidurl_xrds";s:0:"";s:17:"messaging_default";s:4:"mail";s:27:"notifications_send_interval";s:1:"0";s:18:"notifications_auto";i:1;s:21:"flickrsync_start_date";s:0:"";s:15:"flickrsync_tags";s:0:"";s:5:"block";a:1:{s:5:"forum";a:1:{i:1;i:1;}}s:5:"draft";a:2:{s:14:"draft_autosave";i:0;s:23:"draft_autosave_interval";s:2:"30";}s:13:"form_build_id";s:37:"form-5483b27ffde335c7deb73acaa70b6f98";s:21:"feedburner_feedburner";s:0:"";s:18:"admin_compact_mode";b:1;s:14:"affinity_voted";b:0;s:5:"Title";s:0:"";s:11:"Description";s:0:"";s:6:"format";s:1:"1";s:30:"activitystream_mapme_at_userid";s:11:"activelyOUT";s:31:"activitystream_delicious_userid";s:11:"activelyOUT";s:28:"activitystream_facebook_feed";s:0:"";s:26:"activitystream_digg_userid";s:11:"activelyOUT";s:29:"activitystream_youtube_userid";s:11:"activelyOUT";s:24:"activitystream_feed_feed";s:0:"";s:29:"activitystream_blogger_userid";s:11:"activelyOUT";s:28:"activitystream_flickr_userid";s:11:"activelyOUT";s:32:"activitystream_brightkite_userid";s:0:"";s:28:"activitystream_lastfm_userid";s:0:"";s:33:"activitystream_stumbleupon_userid";s:11:"activelyOUT";s:29:"activitystream_twitter_userid";s:11:"activelyOUT";s:39:"activitystream_youtube_favorites_userid";s:11:"activelyOUT";s:40:"user_relationships_allow_private_message";s:12:"on all users";s:17:"views_mail_accept";i:0;s:22:"constant_contact_lists";a:1:{s:14:"Beta Test List";b:1;}s:23:"delete_affiliate_points";i:0;} [timezone_name] => America/Los_Angeles [timezone_id] => 0 [signature_format] => 1 [first_name] => test [last_name] => test [company] => test [street1] => [street2] => [city] => sf [country] => 840 [zone] => 12 [postal_code] => 02904 [phone] => 4
Comment #2
socialnicheguru commentedI thought this was restricted to a particular ad type but it is not.
I have ACL, Taxonomy Lite, Content Access, Content Permissions, OG.
They all seem to work well together.
When I add Node Limit, I get what I have printed above. I am also taking a look at is as user 1.
Thanks,
Chris
Comment #3
Kristina-2 commentedI get the same problem.
I hopped on mIRC and someone said it's probably because someone forgot to remove a print_r line of code.
I suspect line 106, in node_limit.module .
I've commented it out, and now I just get a white page when I try to submit a node.
Comment #4
Kristina-2 commentedMy Fix was:
Go to admin modules.
Deactivate any/all node limit modules.
Uninstall.
Delete /sites/all/modules/node_limit
And re-install stable release. :)
Comment #5
xtfer commentedSame problem. This module appears to be unusable in its current state.
Comment #6
gnosis commentedThe problem is in this module's hook nodeapi. The 'validate' op is coded to dump & die. Looks like debug code left in the module to me. Temporary fix: comment out the print_r and die lines.
Comment #7
decibel.places commentedsame problem using 6.x-1.x-dev (2010-Jul-11)
#6 fixes it
BUT.............
I noticed that the node limit is no longer listed on the admin page - but it seems to be applied to the node
not sure if the edit caused this...
hmmmm
[edit]
missing entry in modules admin page was caused by having a 2nd node_limit.module in sites/all/modules
however, when I revist admin/settings/node_limit I do no see my settings saved, not sure if the module is working, since I am limiting members to creating one video node I solved it with Pathauto and Rules.
Comment #8
NathanM commented#6 fixed it for me. Thanks gnosis.
Comment #9
duaelfrI removed this debug code. I think it was here to check if the node_limit could not be bypassed.