Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
292
Merge Requests
292
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
33280fda
Commit
33280fda
authored
Oct 01, 2016
by
alexpott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2630692
by Lendude, arunkumark: Fatal error when creating taxonomy term glossary view
parent
f4da7286
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
250 additions
and
1 deletion
+250
-1
core/modules/views/src/ManyToOneHelper.php
core/modules/views/src/ManyToOneHelper.php
+1
-1
core/modules/views/src/Tests/TaxonomyGlossaryTest.php
core/modules/views/src/Tests/TaxonomyGlossaryTest.php
+58
-0
core/modules/views/tests/modules/views_test_config/test_views/views.view.test_taxonomy_glossary.yml
...t_config/test_views/views.view.test_taxonomy_glossary.yml
+191
-0
No files found.
core/modules/views/src/ManyToOneHelper.php
View file @
33280fda
...
...
@@ -298,7 +298,7 @@ public function addFilter() {
}
$placeholders
=
array
(
$placeholder
=>
$value
,
)
+
$this
->
placeholders
;
);
$this
->
handler
->
query
->
addWhereExpression
(
$options
[
'group'
],
"
$field
$operator
"
,
$placeholders
);
}
else
{
...
...
core/modules/views/src/Tests/TaxonomyGlossaryTest.php
0 → 100644
View file @
33280fda
<?php
namespace
Drupal\views\Tests
;
use
Drupal\taxonomy\Tests\TaxonomyTestTrait
;
/**
* Tests glossary functionality of taxonomy views.
*
* @group views
*/
class
TaxonomyGlossaryTest
extends
ViewTestBase
{
use
TaxonomyTestTrait
;
/**
* Modules to enable.
*
* @var array
*/
public
static
$modules
=
[
'taxonomy'
];
/**
* Views used by this test.
*
* @var array
*/
public
static
$testViews
=
[
'test_taxonomy_glossary'
];
/**
* Taxonomy terms used by this test.
*
* @var \Drupal\taxonomy\Entity\Term[]
*/
protected
$taxonomyTerms
;
protected
function
setUp
()
{
parent
::
setUp
();
$this
->
enableViewsTestModule
();
/** @var \Drupal\taxonomy\Entity\Vocabulary $vocabulary */
$vocabulary
=
$this
->
createVocabulary
();
for
(
$i
=
0
;
$i
<
10
;
$i
++
)
{
$this
->
taxonomyTerms
[]
=
$this
->
createTerm
(
$vocabulary
);
}
}
/**
* Tests a taxonomy glossary view.
*/
public
function
testTaxonomyGlossaryView
()
{
// Go the taxonomy glossary page for the first term.
$this
->
drupalGet
(
'test_taxonomy_glossary/'
.
substr
(
$this
->
taxonomyTerms
[
0
]
->
getName
(),
0
,
1
));
$this
->
assertText
(
$this
->
taxonomyTerms
[
0
]
->
getName
());
}
}
core/modules/views/tests/modules/views_test_config/test_views/views.view.test_taxonomy_glossary.yml
0 → 100644
View file @
33280fda
langcode
:
en
status
:
true
dependencies
:
module
:
-
taxonomy
id
:
test_taxonomy_glossary
label
:
test_taxonomy_glossary
module
:
views
description
:
'
'
tag
:
'
'
base_table
:
taxonomy_term_field_data
base_field
:
tid
core
:
8.x
display
:
default
:
display_plugin
:
default
id
:
default
display_title
:
Master
position
:
0
display_options
:
access
:
type
:
none
options
:
{
}
cache
:
type
:
tag
options
:
{
}
query
:
type
:
views_query
options
:
disable_sql_rewrite
:
false
distinct
:
false
replica
:
false
query_comment
:
'
'
query_tags
:
{
}
exposed_form
:
type
:
basic
options
:
submit_button
:
Apply
reset_button
:
false
reset_button_label
:
Reset
exposed_sorts_label
:
'
Sort
by'
expose_sort_order
:
true
sort_asc_label
:
Asc
sort_desc_label
:
Desc
pager
:
type
:
mini
options
:
items_per_page
:
10
offset
:
0
id
:
0
total_pages
:
null
expose
:
items_per_page
:
false
items_per_page_label
:
'
Items
per
page'
items_per_page_options
:
'
5,
10,
25,
50'
items_per_page_options_all
:
false
items_per_page_options_all_label
:
'
-
All
-'
offset
:
false
offset_label
:
Offset
tags
:
previous
:
‹‹
next
:
››
style
:
type
:
default
row
:
type
:
fields
fields
:
name
:
id
:
name
table
:
taxonomy_term_field_data
field
:
name
entity_type
:
taxonomy_term
entity_field
:
name
label
:
'
'
alter
:
alter_text
:
false
make_link
:
false
absolute
:
false
trim
:
false
word_boundary
:
false
ellipsis
:
false
strip_tags
:
false
html
:
false
hide_empty
:
false
empty_zero
:
false
type
:
string
settings
:
link_to_entity
:
true
plugin_id
:
term_name
relationship
:
none
group_type
:
group
admin_label
:
'
'
exclude
:
false
element_type
:
'
'
element_class
:
'
'
element_label_type
:
'
'
element_label_class
:
'
'
element_label_colon
:
true
element_wrapper_type
:
'
'
element_wrapper_class
:
'
'
element_default_classes
:
true
empty
:
'
'
hide_alter_empty
:
true
click_sort_column
:
value
group_column
:
value
group_columns
:
{
}
group_rows
:
true
delta_limit
:
0
delta_offset
:
0
delta_reversed
:
false
delta_first_last
:
false
multi_type
:
separator
separator
:
'
,
'
field_api_classes
:
false
convert_spaces
:
false
filters
:
{
}
sorts
:
{
}
title
:
test_taxonomy_glossary
header
:
{
}
footer
:
{
}
empty
:
{
}
relationships
:
{
}
arguments
:
name
:
id
:
name
table
:
taxonomy_term_field_data
field
:
name
relationship
:
none
group_type
:
group
admin_label
:
'
'
default_action
:
ignore
exception
:
value
:
all
title_enable
:
false
title
:
All
title_enable
:
false
title
:
'
'
default_argument_type
:
fixed
default_argument_options
:
argument
:
'
'
default_argument_skip_url
:
false
summary_options
:
base_path
:
'
'
count
:
true
items_per_page
:
25
override
:
false
summary
:
sort_order
:
asc
number_of_records
:
0
format
:
default_summary
specify_validation
:
false
validate
:
type
:
none
fail
:
'
not
found'
validate_options
:
{
}
glossary
:
true
limit
:
1
case
:
none
path_case
:
none
transform_dash
:
false
break_phrase
:
false
add_table
:
false
require_value
:
false
entity_type
:
taxonomy_term
entity_field
:
name
plugin_id
:
string
display_extenders
:
{
}
cache_metadata
:
max-age
:
-1
contexts
:
-
'
languages:language_content'
-
'
languages:language_interface'
-
url
-
url.query_args
tags
:
{
}
page_1
:
display_plugin
:
page
id
:
page_1
display_title
:
Page
position
:
1
display_options
:
display_extenders
:
{
}
path
:
test_taxonomy_glossary
cache_metadata
:
max-age
:
-1
contexts
:
-
'
languages:language_content'
-
'
languages:language_interface'
-
url
-
url.query_args
tags
:
{
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment