when user view create view brightcove video width "CONTEXTUAL FILTERS" or "FILTER CRITERIA" has field "Brightcove Video: Tags".

It's show error "SQLSTATE[42S22]: Column not found: 1054 Unknown column 'brightcove_video__tags.tags'....."

I don't know fix it. can you help me

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chinhlc created an issue. See original summary.

chinhlc’s picture

Issue summary: View changes
fgm’s picture

Apparently, the plugin exposes a nonexistent "tags" column for the brightcove_video__tags schema, which may have been a simple string at some point, but is now replaced by an entity reference target_id to the brightcove_video_tags vocabulary.

Znak’s picture

Assigned: Unassigned » Znak
Znak’s picture

Assigned: Znak » Unassigned
yce’s picture

Status: Active » Needs review
FileSize
3.48 KB

Hi,

I've created a patch which would solve the issue, but I'm not sure if it's the right way to do this.

Boobaa’s picture

This looks like a problem that should (have) be(en) fixed in core (views?). I can understand how this works and why, but could you please link the core issue as well (if there's one already)? I'm guessing that this problem could be (and should be) solved by that core issue as well, not only by this patch. Additionally, I'm a bit hesitant if we should include code that checks for this core problem, and only add/change our views integration data if core doesn't have it solved yet.

Leaving it on NR as it would be beneficial to have others' opinion about this, too.

yce’s picture

There is a similar issue with dynamic entity reference module, here: https://www.drupal.org/node/2548395
The related core issue: https://www.drupal.org/node/2477899

So it should work, but I don't know why it isn't in our case.

Boobaa’s picture

Is this problem still present with drupal-8.3.x? If it is, then please reopen the core issue and post a list of steps to reproduce it there, too (probably using only core modules).

muldos’s picture

Hi,
I've just run into this issue with Drupal core 8.3.7 and brightcove module's version 8.x.1-2.

Steps to reproduce :
1 - install the brightcove video module and its dependencies
2 - Configure brightcove api client credentials
3 - Sync video with drupal
4 - create a view for the type brightcove video
5 - add the name of the video as field
6 - add a filter on the tag field with a not null value (when no value is found, the field will not be used in the query)

7 - You should have now :

 SQLSTATE[42S22]: Column not found: 1054 Unknown column 'brightcove_video__tags.tags' in 'where clause': SELECT brightcove_video.bcvid AS bcvid FROM {brightcove_video} brightcove_video LEFT JOIN {brightcove_video__tags} brightcove_video__tags ON brightcove_video.bcvid = brightcove_video__tags.entity_id AND brightcove_video__tags.deleted = :views_join_condition_0 WHERE brightcove_video__tags.tags = :db_condition_placeholder_1 LIMIT 11 OFFSET 0; Array ( [:db_condition_placeholder_1] => 4 [:views_join_condition_0] => 0 ) in Drupal\views\Plugin\views\query\Sql->execute() (line 1488 of core/modules/views/src/Plugin/views/query/Sql.php).

instead of a list of results

muldos’s picture

Version: 8.x-1.x-dev » 8.x-1.2
Status: Needs review » Active
muldos’s picture

Hi, the bug was not fixed in core (but it was confirmed : https://www.drupal.org/project/drupal/issues/2477899) so can we use the fix provided ? There is no drawback to explicitly define to the views module the entity relationship between a BrightcoveVideo and Tags, I've used this patch in production for 8 monthes.