Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

entityreferences bug

By: that0n3guy on Dec 22nd, 2011  |  syntax: None  |  size: 16.82 KB  |  views: 53  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. $view = new view;
  2. $view->name = 'topic_lists';
  3. $view->description = '';
  4. $view->tag = 'default';
  5. $view->base_table = 'node';
  6. $view->human_name = 'Topics';
  7. $view->core = 7;
  8. $view->api_version = '3.0';
  9. $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
  10.  
  11. /* Display: Master */
  12. $handler = $view->new_display('default', 'Master', 'default');
  13. $handler->display->display_options['title'] = 'Topics';
  14. $handler->display->display_options['use_ajax'] = TRUE;
  15. $handler->display->display_options['group_by'] = TRUE;
  16. $handler->display->display_options['access']['type'] = 'perm';
  17. $handler->display->display_options['cache']['type'] = 'none';
  18. $handler->display->display_options['query']['type'] = 'views_query';
  19. $handler->display->display_options['query']['options']['query_comment'] = FALSE;
  20. $handler->display->display_options['exposed_form']['type'] = 'basic';
  21. $handler->display->display_options['exposed_form']['options']['autosubmit'] = 0;
  22. $handler->display->display_options['exposed_form']['options']['autosubmit_hide'] = 1;
  23. $handler->display->display_options['pager']['type'] = 'full';
  24. $handler->display->display_options['pager']['options']['items_per_page'] = '5';
  25. $handler->display->display_options['style_plugin'] = 'table';
  26. $handler->display->display_options['style_options']['columns'] = array(
  27.   'title' => 'title',
  28.   'body' => 'body',
  29.   'field_tag' => 'field_tag',
  30.   'nid' => 'nid',
  31. );
  32. $handler->display->display_options['style_options']['default'] = '-1';
  33. $handler->display->display_options['style_options']['info'] = array(
  34.   'title' => array(
  35.     'sortable' => 1,
  36.     'default_sort_order' => 'asc',
  37.     'align' => '',
  38.     'separator' => '',
  39.     'empty_column' => 0,
  40.   ),
  41.   'body' => array(
  42.     'sortable' => 1,
  43.     'default_sort_order' => 'asc',
  44.     'align' => '',
  45.     'separator' => '',
  46.     'empty_column' => 0,
  47.   ),
  48.   'field_tag' => array(
  49.     'align' => '',
  50.     'separator' => '',
  51.     'empty_column' => 0,
  52.   ),
  53.   'nid' => array(
  54.     'sortable' => 0,
  55.     'default_sort_order' => 'asc',
  56.     'align' => '',
  57.     'separator' => '',
  58.     'empty_column' => 0,
  59.   ),
  60. );
  61. $handler->display->display_options['style_options']['override'] = 1;
  62. $handler->display->display_options['style_options']['sticky'] = 0;
  63. $handler->display->display_options['style_options']['empty_table'] = 0;
  64. /* Header: Global: Text area */
  65. $handler->display->display_options['header']['area']['id'] = 'area';
  66. $handler->display->display_options['header']['area']['table'] = 'views';
  67. $handler->display->display_options['header']['area']['field'] = 'area';
  68. $handler->display->display_options['header']['area']['empty'] = FALSE;
  69. $handler->display->display_options['header']['area']['content'] = 'Create a <a href=\'/node/add/topic\'>new topic here</a>.';
  70. $handler->display->display_options['header']['area']['format'] = 'filtered_html';
  71. $handler->display->display_options['header']['area']['tokenize'] = 0;
  72. /* No results behavior: Global: Text area */
  73. $handler->display->display_options['empty']['area']['id'] = 'area';
  74. $handler->display->display_options['empty']['area']['table'] = 'views';
  75. $handler->display->display_options['empty']['area']['field'] = 'area';
  76. $handler->display->display_options['empty']['area']['label'] = 'No Topics Created Yet...';
  77. $handler->display->display_options['empty']['area']['empty'] = FALSE;
  78. $handler->display->display_options['empty']['area']['content'] = 'Click <a href=\'/node/add/topic\'>"Create Topic"</a> to add topics.';
  79. $handler->display->display_options['empty']['area']['format'] = 'filtered_html';
  80. $handler->display->display_options['empty']['area']['tokenize'] = 0;
  81. /* Relationship: Entity Reference: Referencing entity */
  82. $handler->display->display_options['relationships']['reverse_field_parent_topic_node']['id'] = 'reverse_field_parent_topic_node';
  83. $handler->display->display_options['relationships']['reverse_field_parent_topic_node']['table'] = 'node';
  84. $handler->display->display_options['relationships']['reverse_field_parent_topic_node']['field'] = 'reverse_field_parent_topic_node';
  85. $handler->display->display_options['relationships']['reverse_field_parent_topic_node']['group_type'] = 'count';
  86. $handler->display->display_options['relationships']['reverse_field_parent_topic_node']['required'] = 0;
  87. /* Field: Content: Title */
  88. $handler->display->display_options['fields']['title']['id'] = 'title';
  89. $handler->display->display_options['fields']['title']['table'] = 'node';
  90. $handler->display->display_options['fields']['title']['field'] = 'title';
  91. $handler->display->display_options['fields']['title']['alter']['alter_text'] = 0;
  92. $handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
  93. $handler->display->display_options['fields']['title']['alter']['absolute'] = 0;
  94. $handler->display->display_options['fields']['title']['alter']['external'] = 0;
  95. $handler->display->display_options['fields']['title']['alter']['replace_spaces'] = 0;
  96. $handler->display->display_options['fields']['title']['alter']['trim_whitespace'] = 0;
  97. $handler->display->display_options['fields']['title']['alter']['nl2br'] = 0;
  98. $handler->display->display_options['fields']['title']['alter']['word_boundary'] = 0;
  99. $handler->display->display_options['fields']['title']['alter']['ellipsis'] = 0;
  100. $handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0;
  101. $handler->display->display_options['fields']['title']['alter']['trim'] = 0;
  102. $handler->display->display_options['fields']['title']['alter']['html'] = 0;
  103. $handler->display->display_options['fields']['title']['element_label_colon'] = 1;
  104. $handler->display->display_options['fields']['title']['element_default_classes'] = 1;
  105. $handler->display->display_options['fields']['title']['hide_empty'] = 0;
  106. $handler->display->display_options['fields']['title']['empty_zero'] = 0;
  107. $handler->display->display_options['fields']['title']['hide_alter_empty'] = 1;
  108. $handler->display->display_options['fields']['title']['link_to_node'] = 1;
  109. /* Field: Content: Body */
  110. $handler->display->display_options['fields']['body']['id'] = 'body';
  111. $handler->display->display_options['fields']['body']['table'] = 'field_data_body';
  112. $handler->display->display_options['fields']['body']['field'] = 'body';
  113. $handler->display->display_options['fields']['body']['label'] = 'Description';
  114. $handler->display->display_options['fields']['body']['alter']['alter_text'] = 0;
  115. $handler->display->display_options['fields']['body']['alter']['make_link'] = 0;
  116. $handler->display->display_options['fields']['body']['alter']['absolute'] = 0;
  117. $handler->display->display_options['fields']['body']['alter']['external'] = 0;
  118. $handler->display->display_options['fields']['body']['alter']['replace_spaces'] = 0;
  119. $handler->display->display_options['fields']['body']['alter']['trim_whitespace'] = 0;
  120. $handler->display->display_options['fields']['body']['alter']['nl2br'] = 0;
  121. $handler->display->display_options['fields']['body']['alter']['word_boundary'] = 1;
  122. $handler->display->display_options['fields']['body']['alter']['ellipsis'] = 1;
  123. $handler->display->display_options['fields']['body']['alter']['strip_tags'] = 0;
  124. $handler->display->display_options['fields']['body']['alter']['trim'] = 0;
  125. $handler->display->display_options['fields']['body']['alter']['html'] = 0;
  126. $handler->display->display_options['fields']['body']['element_label_colon'] = 0;
  127. $handler->display->display_options['fields']['body']['element_default_classes'] = 1;
  128. $handler->display->display_options['fields']['body']['hide_empty'] = 0;
  129. $handler->display->display_options['fields']['body']['empty_zero'] = 0;
  130. $handler->display->display_options['fields']['body']['hide_alter_empty'] = 1;
  131. $handler->display->display_options['fields']['body']['type'] = 'text_summary_or_trimmed';
  132. $handler->display->display_options['fields']['body']['settings'] = array(
  133.   'trim_length' => '120',
  134. );
  135. $handler->display->display_options['fields']['body']['group_columns'] = array(
  136.   'value' => 'value',
  137.   'format' => 'format',
  138. );
  139. $handler->display->display_options['fields']['body']['field_api_classes'] = 0;
  140. /* Field: Content: Tag */
  141. $handler->display->display_options['fields']['field_tag']['id'] = 'field_tag';
  142. $handler->display->display_options['fields']['field_tag']['table'] = 'field_data_field_tag';
  143. $handler->display->display_options['fields']['field_tag']['field'] = 'field_tag';
  144. $handler->display->display_options['fields']['field_tag']['label'] = 'Tags';
  145. $handler->display->display_options['fields']['field_tag']['alter']['alter_text'] = 0;
  146. $handler->display->display_options['fields']['field_tag']['alter']['make_link'] = 0;
  147. $handler->display->display_options['fields']['field_tag']['alter']['absolute'] = 0;
  148. $handler->display->display_options['fields']['field_tag']['alter']['external'] = 0;
  149. $handler->display->display_options['fields']['field_tag']['alter']['replace_spaces'] = 0;
  150. $handler->display->display_options['fields']['field_tag']['alter']['trim_whitespace'] = 0;
  151. $handler->display->display_options['fields']['field_tag']['alter']['nl2br'] = 0;
  152. $handler->display->display_options['fields']['field_tag']['alter']['word_boundary'] = 1;
  153. $handler->display->display_options['fields']['field_tag']['alter']['ellipsis'] = 1;
  154. $handler->display->display_options['fields']['field_tag']['alter']['strip_tags'] = 0;
  155. $handler->display->display_options['fields']['field_tag']['alter']['trim'] = 0;
  156. $handler->display->display_options['fields']['field_tag']['alter']['html'] = 0;
  157. $handler->display->display_options['fields']['field_tag']['element_label_colon'] = 1;
  158. $handler->display->display_options['fields']['field_tag']['element_default_classes'] = 1;
  159. $handler->display->display_options['fields']['field_tag']['hide_empty'] = 0;
  160. $handler->display->display_options['fields']['field_tag']['empty_zero'] = 0;
  161. $handler->display->display_options['fields']['field_tag']['hide_alter_empty'] = 1;
  162. $handler->display->display_options['fields']['field_tag']['group_column'] = 'entity id';
  163. $handler->display->display_options['fields']['field_tag']['group_rows'] = 1;
  164. $handler->display->display_options['fields']['field_tag']['delta_offset'] = '0';
  165. $handler->display->display_options['fields']['field_tag']['delta_reversed'] = 0;
  166. $handler->display->display_options['fields']['field_tag']['delta_first_last'] = 0;
  167. $handler->display->display_options['fields']['field_tag']['field_api_classes'] = 0;
  168. /* Field: COUNT(Content: Nid) */
  169. $handler->display->display_options['fields']['nid']['id'] = 'nid';
  170. $handler->display->display_options['fields']['nid']['table'] = 'node';
  171. $handler->display->display_options['fields']['nid']['field'] = 'nid';
  172. $handler->display->display_options['fields']['nid']['relationship'] = 'reverse_field_parent_topic_node';
  173. $handler->display->display_options['fields']['nid']['group_type'] = 'count';
  174. $handler->display->display_options['fields']['nid']['label'] = 'Nuber of Alerts';
  175. $handler->display->display_options['fields']['nid']['alter']['alter_text'] = 0;
  176. $handler->display->display_options['fields']['nid']['alter']['make_link'] = 0;
  177. $handler->display->display_options['fields']['nid']['alter']['absolute'] = 0;
  178. $handler->display->display_options['fields']['nid']['alter']['external'] = 0;
  179. $handler->display->display_options['fields']['nid']['alter']['replace_spaces'] = 0;
  180. $handler->display->display_options['fields']['nid']['alter']['trim_whitespace'] = 0;
  181. $handler->display->display_options['fields']['nid']['alter']['nl2br'] = 0;
  182. $handler->display->display_options['fields']['nid']['alter']['word_boundary'] = 1;
  183. $handler->display->display_options['fields']['nid']['alter']['ellipsis'] = 1;
  184. $handler->display->display_options['fields']['nid']['alter']['strip_tags'] = 0;
  185. $handler->display->display_options['fields']['nid']['alter']['trim'] = 0;
  186. $handler->display->display_options['fields']['nid']['alter']['html'] = 0;
  187. $handler->display->display_options['fields']['nid']['element_label_colon'] = 1;
  188. $handler->display->display_options['fields']['nid']['element_default_classes'] = 1;
  189. $handler->display->display_options['fields']['nid']['hide_empty'] = 0;
  190. $handler->display->display_options['fields']['nid']['empty_zero'] = 1;
  191. $handler->display->display_options['fields']['nid']['hide_alter_empty'] = 1;
  192. $handler->display->display_options['fields']['nid']['format_plural'] = 0;
  193. /* Sort criterion: Content: Post date */
  194. $handler->display->display_options['sorts']['created']['id'] = 'created';
  195. $handler->display->display_options['sorts']['created']['table'] = 'node';
  196. $handler->display->display_options['sorts']['created']['field'] = 'created';
  197. $handler->display->display_options['sorts']['created']['order'] = 'DESC';
  198. /* Contextual filter: Content: Has taxonomy term ID */
  199. $handler->display->display_options['arguments']['tid']['id'] = 'tid';
  200. $handler->display->display_options['arguments']['tid']['table'] = 'taxonomy_index';
  201. $handler->display->display_options['arguments']['tid']['field'] = 'tid';
  202. $handler->display->display_options['arguments']['tid']['default_argument_type'] = 'fixed';
  203. $handler->display->display_options['arguments']['tid']['default_argument_skip_url'] = 0;
  204. $handler->display->display_options['arguments']['tid']['summary']['number_of_records'] = '0';
  205. $handler->display->display_options['arguments']['tid']['summary']['format'] = 'default_summary';
  206. $handler->display->display_options['arguments']['tid']['summary_options']['items_per_page'] = '25';
  207. $handler->display->display_options['arguments']['tid']['break_phrase'] = 1;
  208. $handler->display->display_options['arguments']['tid']['add_table'] = 0;
  209. $handler->display->display_options['arguments']['tid']['require_value'] = 0;
  210. $handler->display->display_options['arguments']['tid']['reduce_duplicates'] = 0;
  211. $handler->display->display_options['arguments']['tid']['set_breadcrumb'] = 0;
  212. /* Filter criterion: Content: Published */
  213. $handler->display->display_options['filters']['status']['id'] = 'status';
  214. $handler->display->display_options['filters']['status']['table'] = 'node';
  215. $handler->display->display_options['filters']['status']['field'] = 'status';
  216. $handler->display->display_options['filters']['status']['value'] = '1';
  217. $handler->display->display_options['filters']['status']['group'] = 0;
  218. $handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
  219. /* Filter criterion: Content: Type */
  220. $handler->display->display_options['filters']['type']['id'] = 'type';
  221. $handler->display->display_options['filters']['type']['table'] = 'node';
  222. $handler->display->display_options['filters']['type']['field'] = 'type';
  223. $handler->display->display_options['filters']['type']['value'] = array(
  224.   'topic' => 'topic',
  225. );
  226. $handler->display->display_options['filters']['type']['group'] = 0;
  227. /* Filter criterion: Content: Tag (field_tag) */
  228. $handler->display->display_options['filters']['field_tag_tid']['id'] = 'field_tag_tid';
  229. $handler->display->display_options['filters']['field_tag_tid']['table'] = 'field_data_field_tag';
  230. $handler->display->display_options['filters']['field_tag_tid']['field'] = 'field_tag_tid';
  231. $handler->display->display_options['filters']['field_tag_tid']['value'] = '';
  232. $handler->display->display_options['filters']['field_tag_tid']['exposed'] = TRUE;
  233. $handler->display->display_options['filters']['field_tag_tid']['expose']['operator_id'] = 'field_tag_tid_op';
  234. $handler->display->display_options['filters']['field_tag_tid']['expose']['label'] = 'Tags';
  235. $handler->display->display_options['filters']['field_tag_tid']['expose']['operator'] = 'field_tag_tid_op';
  236. $handler->display->display_options['filters']['field_tag_tid']['expose']['identifier'] = 'field_tag_tid';
  237. $handler->display->display_options['filters']['field_tag_tid']['reduce_duplicates'] = 0;
  238. $handler->display->display_options['filters']['field_tag_tid']['vocabulary'] = 'tags';
  239. $handler->display->display_options['filters']['field_tag_tid']['error_message'] = 1;
  240.  
  241. /* Display: Block */
  242. $handler = $view->new_display('block', 'Block', 'block');
  243. $handler->display->display_options['defaults']['filters'] = FALSE;
  244. /* Filter criterion: Content: Published */
  245. $handler->display->display_options['filters']['status']['id'] = 'status';
  246. $handler->display->display_options['filters']['status']['table'] = 'node';
  247. $handler->display->display_options['filters']['status']['field'] = 'status';
  248. $handler->display->display_options['filters']['status']['value'] = '1';
  249. $handler->display->display_options['filters']['status']['group'] = 0;
  250. $handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
  251. /* Filter criterion: Content: Type */
  252. $handler->display->display_options['filters']['type']['id'] = 'type';
  253. $handler->display->display_options['filters']['type']['table'] = 'node';
  254. $handler->display->display_options['filters']['type']['field'] = 'type';
  255. $handler->display->display_options['filters']['type']['value'] = array(
  256.   'topic' => 'topic',
  257. );
  258. $handler->display->display_options['filters']['type']['group'] = 0;
  259.  
  260. /* Display: Page */
  261. $handler = $view->new_display('page', 'Page', 'page_1');
  262. $handler->display->display_options['path'] = 'topics';
clone this paste RAW Paste Data