Might this be related to a size limit for the number of characters allowed in the Markup field?

Warning: Got a packet bigger than 'max_allowed_packet' bytes query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (3, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:1566936:\"Got a packet bigger than 'max_allowed_packet' bytes\nquery: UPDATE cache_content SET data = 'a:4:{s:11:\\"field types\\";a:11:{s:14:\\"number_integer\\";a:4:{s:5:\\"label\\";s:7:\\"Integer\\";s:11:\\"description\\";s:45:\\"Store a number in the database as an integer.\\";s:6:\\"module\\";s:6:\\"number\\";s:10:\\"formatters\\";a:5:{s:7:\\"default\\";a:4:{s:5:\\"label\\";s:4:\\"9999\\";s:15:\\"m in /home/topseque/public_html/rb4/includes/database.mysqli.inc on line 128

Comments

rfiertek’s picture

Code I insterted into the markup field was as follows.

<?php  // specialties
$cond = ''; global $base_url; global $cond; $cond = $_GET['cond']; global $user; $uid = $user->uid; $node->uid = $uid;
if ( $cond == 'mod' ) { $nid = arg(1); }
else {
  if ( is_numeric(arg(1)) && arg(2) == 'edit' ) { $cond = 'edit'; $nid = arg(1); }
  elseif ( arg(1) == 'add' && arg(2) == 'restaurant' ) { $cond = 'add'; }
}

if ( $cond == 'mod' || $cond == 'edit' ) {
  global $row2;
  $query = 'SELECT vid, field_rest_rt10_pool_value FROM {content_type_restaurant}  
    WHERE nid = %d AND field_moderation_results_value = %d ORDER BY vid DESC LIMIT 1';
  $row2 = db_query(db_rewrite_sql($query), $nid, 1 );
  global $results; $results = array(); while ($row = db_fetch_array($row2)) $results[] = $row;
  if ( $results[0]['field_rest_rt10_pool_value'] == NULL || '' ) {}
  else {  
    $verbiage = '<div class="markupverbiage"><b>Specialties:</b> ' . $results[0]['field_rest_rt10_pool_value'] . '</div><br/>';
    global $hello; $hello = $verbiage; print $hello;
    $hello = '';
  }
}

if ( $cond == 'mod' ) {
  $sql = 'SELECT field_rest_rt09_specialties_c_value, field_uid_value, MAX(vid) FROM {content_type_restaurant}   
	WHERE nid = %d AND field_rest_rt09_specialties_c_value IS NOT NULL GROUP BY field_rest_rt09_specialties_c_value ORDER BY vid DESC LIMIT 20';
  $resource = db_query(db_rewrite_sql($sql), $nid);
  global $results1; $results1 = array(); while ($row1 = db_fetch_array($resource)) { $results1[] = $row1; }
  $count1 = count($results1); $count2 = 0; $soitis = '<div class="markupmodtext"><b>Recent entries</b><i> (pull together into a single entry)</i><b>:</b> <br/>';
  if ( $results1[0]['field_rest_rt09_specialties_c_value'] == NULL || '' ) {}
  else {
    while ($count2 < $count1) { 
	  $perp = $results1[$count2]['field_uid_value'];
	  $resource1 = db_result(db_query('SELECT name FROM {users} WHERE uid = %d', $perp));
	  $soitis .= ' - ' . $results1[$count2]['field_rest_rt09_specialties_c_value'] . ' - <i>' . $resource1 . '</i><br/>';
    $count2++; }
	$soitis .= '</div>';
    global $hello; $hello = $soitis; print $hello;
  }
}
?>
rfiertek’s picture

Code I inserted into the markup field was as follows. This issue only comes up when more than one markup field contains code such as this. If only one markup field has this code, it works exactly as needed.

<?php  // specialties
$cond = ''; global $base_url; global $cond; $cond = $_GET['cond']; global $user; $uid = $user->uid; $node->uid = $uid;
if ( $cond == 'mod' ) { $nid = arg(1); }
else {
  if ( is_numeric(arg(1)) && arg(2) == 'edit' ) { $cond = 'edit'; $nid = arg(1); }
  elseif ( arg(1) == 'add' && arg(2) == 'restaurant' ) { $cond = 'add'; }
}

if ( $cond == 'mod' || $cond == 'edit' ) {
  global $row2;
  $query = 'SELECT vid, field_rest_rt10_pool_value FROM {content_type_restaurant}  
    WHERE nid = %d AND field_moderation_results_value = %d ORDER BY vid DESC LIMIT 1';
  $row2 = db_query(db_rewrite_sql($query), $nid, 1 );
  global $results; $results = array(); while ($row = db_fetch_array($row2)) $results[] = $row;
  if ( $results[0]['field_rest_rt10_pool_value'] == NULL || '' ) {}
  else {  
    $verbiage = '<div class="markupverbiage"><b>Specialties:</b> ' . $results[0]['field_rest_rt10_pool_value'] . '</div><br/>';
    global $hello; $hello = $verbiage; print $hello;
    $hello = '';
  }
}

if ( $cond == 'mod' ) {
  $sql = 'SELECT field_rest_rt09_specialties_c_value, field_uid_value, MAX(vid) FROM {content_type_restaurant}   
	WHERE nid = %d AND field_rest_rt09_specialties_c_value IS NOT NULL GROUP BY field_rest_rt09_specialties_c_value ORDER BY vid DESC LIMIT 20';
  $resource = db_query(db_rewrite_sql($sql), $nid);
  global $results1; $results1 = array(); while ($row1 = db_fetch_array($resource)) { $results1[] = $row1; }
  $count1 = count($results1); $count2 = 0; $soitis = '<div class="markupmodtext"><b>Recent entries</b><i> (pull together into a single entry)</i><b>:</b> <br/>';
  if ( $results1[0]['field_rest_rt09_specialties_c_value'] == NULL || '' ) {}
  else {
    while ($count2 < $count1) { 
	  $perp = $results1[$count2]['field_uid_value'];
	  $resource1 = db_result(db_query('SELECT name FROM {users} WHERE uid = %d', $perp));
	  $soitis .= ' - ' . $results1[$count2]['field_rest_rt09_specialties_c_value'] . ' - <i>' . $resource1 . '</i><br/>';
    $count2++; }
	$soitis .= '</div>';
    global $hello; $hello = $soitis; print $hello;
  }
}
?>
rfiertek’s picture

I went through the code in detail and the

seemed to set it off at first, but as I continnued to add more markup fields, it became obvious that there is a size limit to the amount of data the markup can handle collectively among the different markup fields.
smoothify’s picture

Status: Active » Closed (won't fix)

Since this has problems with an uncommitted and therefore unsupported patch i'm marking this as won't fix.

I will be adding php support to the module shortly, but if you are running into a limit with the size of the form, you may still get the same error.

smoothify’s picture

Priority: Major » Normal