Closed (won't fix)
Project:
Code Filter
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Feb 2010 at 23:15 UTC
Updated:
15 Dec 2012 at 02:48 UTC
Jump to comment: Most recent
Comments
Comment #1
bird-cage commentedComment #2
bird-cage commentedIn comment #1 above I posted the same php code as in this comment #2
$view = new view;
$view->name = 'tour_list';
$view->description = 'Category tour leaf list teaser set';
$view->tag = 'tour_date';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('relationships', array(
'field_lodging_node_nid' => array(
'label' => 'Lodging',
'required' => 0,
'delta' => -1,
'id' => 'field_lodging_node_nid',
'table' => 'node_data_field_lodging_node',
'field' => 'field_lodging_node_nid',
'relationship' => 'none',
),
));
$handler->override_option('fields', array(
'view_node' => array(
'label' => 'Link',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'text' => '',
'exclude' => 0,
'id' => 'view_node',
'table' => 'node',
'field' => 'view_node',
'relationship' => 'none',
),
'field_tour_image_fid' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'link_to_node' => 0,
'label_type' => 'none',
'format' => 'fix-195x120_path',
'multiple' => array(
'group' => 1,
'multiple_number' => '1',
'multiple_from' => '0',
'multiple_reversed' => 0,
),
'exclude' => 0,
'id' => 'field_tour_image_fid',
'table' => 'node_data_field_tour_image',
'field' => 'field_tour_image_fid',
'relationship' => 'none',
),
'field_name_value' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'link_to_node' => 0,
'label_type' => 'none',
'format' => 'plain',
'multiple' => array(
'group' => TRUE,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => FALSE,
),
'exclude' => 0,
'id' => 'field_name_value',
'table' => 'node_data_field_name',
'field' => 'field_name_value',
'relationship' => 'none',
),
'field_tour_teaser_text_value' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'link_to_node' => 0,
'label_type' => 'none',
'format' => 'plain',
'multiple' => array(
'group' => TRUE,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => FALSE,
),
'exclude' => 0,
'id' => 'field_tour_teaser_text_value',
'table' => 'node_data_field_tour_teaser_text',
'field' => 'field_tour_teaser_text_value',
'relationship' => 'none',
),
'field_system_price_min_value' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'link_to_node' => 0,
'label_type' => 'none',
'format' => 'default',
'multiple' => array(
'group' => TRUE,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => FALSE,
),
'exclude' => 0,
'id' => 'field_system_price_min_value',
'table' => 'node_data_field_system_price_min',
'field' => 'field_system_price_min_value',
'relationship' => 'none',
'override' => array(
'button' => 'Übersteuern',
),
),
'field_tour_link_text_value' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'link_to_node' => 0,
'label_type' => 'none',
'format' => 'plain',
'multiple' => array(
'group' => TRUE,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => FALSE,
),
'exclude' => 0,
'id' => 'field_tour_link_text_value',
'table' => 'node_data_field_tour_link_text',
'field' => 'field_tour_link_text_value',
'relationship' => 'none',
),
'field_rating_stars_value' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'link_to_node' => 0,
'label_type' => 'none',
'format' => 'default',
'multiple' => array(
'group' => TRUE,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => FALSE,
),
'exclude' => 0,
'id' => 'field_rating_stars_value',
'table' => 'node_data_field_rating_stars',
'field' => 'field_rating_stars_value',
'relationship' => 'field_lodging_node_nid',
),
'field_lodging_type_value' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'link_to_node' => 0,
'label_type' => 'none',
'format' => 'plain',
'multiple' => array(
'group' => TRUE,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => FALSE,
),
'exclude' => 0,
'id' => 'field_lodging_type_value',
'table' => 'node_data_field_lodging_type',
'field' => 'field_lodging_type_value',
'relationship' => 'field_lodging_node_nid',
),
'field_name_value_1' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'link_to_node' => 0,
'label_type' => 'none',
'format' => 'plain',
'multiple' => array(
'group' => TRUE,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => FALSE,
),
'exclude' => 0,
'id' => 'field_name_value_1',
'table' => 'node_data_field_name',
'field' => 'field_name_value',
'relationship' => 'field_lodging_node_nid',
),
));
$handler->override_option('sorts', array(
'field_system_price_min_value' => array(
'order' => 'ASC',
'delta' => -1,
'id' => 'field_system_price_min_value',
'table' => 'node_data_field_system_price_min',
'field' => 'field_system_price_min_value',
'relationship' => 'none',
),
));
$handler->override_option('arguments', array(
'tid' => array(
'default_action' => 'default',
'style_plugin' => 'default_summary',
'style_options' => array(),
'wildcard' => 'all',
'wildcard_substitution' => 'All',
'title' => '',
'breadcrumb' => '',
'default_argument_type' => 'php',
'default_argument' => '',
'validate_type' => 'none',
'validate_fail' => 'not found',
'break_phrase' => 1,
'add_table' => 0,
'require_value' => 0,
'reduce_duplicates' => 0,
'set_breadcrumb' => 0,
'id' => 'tid',
'table' => 'term_node',
'field' => 'tid',
'validate_user_argument_type' => 'uid',
'validate_user_roles' => array(
'2' => 0,
),
'relationship' => 'none',
'default_options_div_prefix' => '',
'default_argument_user' => 0,
'default_argument_fixed' => '',
'default_argument_php' => '$node = node_load(arg(1));
if($node){
foreach($node->taxonomy as $term){ $terms[] = $term->tid; }
return implode(\'+\', $terms);
}
else {
return false;
}$node = node_load(arg(1));
if($node){
foreach($node->taxonomy as $term){ $terms[] = $term->tid; }
return implode(\'+\', $terms);
}
else {
return false;
}',
'validate_argument_node_type' => array(
'auxiliary_service' => 0,
'departure_point_set' => 0,
'insurance' => 0,
'lodging' => 0,
'page' => 0,
'page_level1' => 0,
'page_level2' => 0,
'page_tour' => 0,
'place' => 0,
'story' => 0,
'transport_type' => 0,
),
'validate_argument_node_access' => 0,
'validate_argument_nid_type' => 'nid',
'validate_argument_vocabulary' => array(
'1' => 0,
'2' => 0,
),
'validate_argument_type' => 'tid',
'validate_argument_transform' => 0,
'validate_user_restrict_roles' => 0,
'validate_argument_php' => '',
),
));
$handler->override_option('filters', array(
'type' => array(
'operator' => 'in',
'value' => array(
'page_tour' => 'page_tour',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'type',
'table' => 'node',
'field' => 'type',
'relationship' => 'none',
),
'vid' => array(
'operator' => 'in',
'value' => array(
'1' => '1',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'vid',
'table' => 'term_data',
'field' => 'vid',
'relationship' => 'none',
),
'status_extra' => array(
'operator' => '=',
'value' => '',
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'status_extra',
'table' => 'node',
'field' => 'status_extra',
'relationship' => 'none',
),
'field_rating_stars_value' => array(
'operator' => '>=',
'value' => array(
'value' => '',
'min' => '',
'max' => '',
),
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'field_rating_stars_value_op',
'identifier' => 'comfort_value',
'label' => 'comfort_value',
'optional' => 1,
'remember' => 0,
),
'id' => 'field_rating_stars_value',
'table' => 'node_data_field_rating_stars',
'field' => 'field_rating_stars_value',
'relationship' => 'field_lodging_node_nid',
),
'field_age_class_value_many_to_one' => array(
'operator' => 'or',
'value' => array(),
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'field_age_class_value_many_to_one_op',
'identifier' => 'age',
'label' => 'age',
'optional' => 1,
'single' => 1,
'remember' => 1,
'reduce' => 0,
),
'id' => 'field_age_class_value_many_to_one',
'table' => 'node_data_field_age_class',
'field' => 'field_age_class_value_many_to_one',
'relationship' => 'none',
'reduce_duplicates' => 1,
),
'field_rating_stars_value_many_to_one' => array(
'operator' => 'or',
'value' => array(),
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'field_rating_stars_value_many_to_one_op',
'identifier' => 'comfort',
'label' => 'comfort',
'optional' => 1,
'single' => 1,
'remember' => 0,
'reduce' => 0,
),
'id' => 'field_rating_stars_value_many_to_one',
'table' => 'node_data_field_rating_stars',
'field' => 'field_rating_stars_value_many_to_one',
'relationship' => 'field_lodging_node_nid',
'reduce_duplicates' => 0,
),
'field_lodging_type_value_many_to_one' => array(
'operator' => 'or',
'value' => array(),
'group' => '0',
'exposed' => TRUE,
'expose'
Comment #3
bird-cage commentedComment #4
Anonymous (not verified) commentedIsn't this an issue with Code filter? The rendering of PHP code, and <code> tags is done by that module.
Comment #5
bird-cage commentedMay well be, I'm still fairly new to drupal, should I change what it says in Project to Code filter? or post it again?
Comment #6
Anonymous (not verified) commentedI am moving the report to the project queue, even though I recall there was already a similar report.
Comment #7
Anonymous (not verified) commentedI have marked #675062: Drupal.org strips views code out of issue post as duplicate of this report.
Comment #8
silverwing commentedMarked #770522: Posting solution on issue, comment displays nothing... as a duplicate of this.
Comment #9
dave reidMarked #823274: Attempt to include views export code in issue body results in entire body being sent to /dev/null as a duplicate of this issue.
Comment #10
corbacho commentedI have issues with big code chunks too and found the reason:
In general all the PCRE functions are affected by the value of pcre.backtrack_limit
This value by default is 100000, that is very conservative. (in bytes) It's about 0.7 Mb of RAM.
To fix it, it's possible to increase it in php.ini or directly in the code like this:
@ini_set('pcre.recursion_limit', 600000);Exactly the function that fails (returning a NULL value ) is preg_replace_callback in _code_filter_prepare
and changing silently the value of $text to an empty string.
Related:
#538032: Document possible preg memory issues
http://drupal.stackexchange.com/questions/1087/how-can-i-have-a-body-wit...
[Update] ... I see that in Drupal 7 in the settings.php is explained this too:
Comment #11
cameron tod commentedThanks for the excellent comment corbacho. I think the instructions in #10 constitute a fix.