Just installing Brightcove module and changing to the correct ownership causes error running Drush

public_html/sites/all/modules/contrib]# drush cc all

Drush command terminated abnormally due to an unrecoverable error.   [error]
Error: syntax error, unexpected '[' in
/home/brite/public_html/sites/all/modules/contrib/brightcove/brightcove.install,
line 12

Parse error: syntax error, unexpected '[' in /home/brite/public_html/sites/all/modules/contrib/brightcove/brightcove.install on line 12

Php 7.6.30
Drupal 7.54
Drush 7.4
all dependencies Installed
Bootstrap Theme

Comments

Anonymous’s picture

weavingmedia created an issue. See original summary.

jan.mashat’s picture

Title: Just installing Brightcove module and changing to the correct ownership causes error running Drush » syntax error, unexpected '[' in brightcove.install
Category: Bug report » Support request
Status: Active » Closed (cannot reproduce)

Assuming that by "Php 7.6.30" you're referring to php 5.6.30 and by "correct ownership" you mean enabling all permissions on the API - I wasn't able to reproduce your issue within this docker container: https://github.com/janmashat/docker-drupal7-brightcove6

The docker container defaults to the stable version of the brightcove module, but you had indicated 7.x-6.x-dev in the issue metadata - so I made this modification (before running docker build) to grab the latest dev release:

docker-drupal7-brightcove6 (master)$ git diff
diff --git a/start.sh b/start.sh
index 0210d36..b22e1dc 100644
--- a/start.sh
+++ b/start.sh
@@ -46,6 +46,7 @@ if [ ! -f /var/www/html/sites/default/settings.php ]; then

        # Download Date (required: date_popup, date_api)
        drush dl date
+       drush dl brightcove-7.x-6.x-dev

        # Install PHP-API-Wrapper
        cd /var/www/html/sites/all/libraries

I ran the first cache-clear before adding an API client, and the 2nd one after adding it:

root@c20377f773aa:/var/www/html# drush cc all
'all' cache was cleared.                                                      [success]

root@c20377f773aa:/var/www/html# drush pm-list |grep brightcove
 Brightcove        Brightcove media integration (brightcove_media)              Module  Not installed  7.x-6.4+4-dev
 Brightcove        Brightcove Video Connect (brightcove)                        Module  Enabled        7.x-6.4+4-dev

root@c20377f773aa:/var/www/html# drush cc all
'all' cache was cleared.                                                      [success]

root@c20377f773aa:/var/www/html# php -v
PHP 5.6.30-0+deb8u1 (cli) (built: Feb  8 2017 08:50:21)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

root@c20377f773aa:/var/www/html# drush status
 Drupal version                  :  7.54
 Site URI                        :  http://default
 Database driver                 :  mysql
 Database hostname               :  localhost
 Database port                   :  3306
 Database username               :  drupal
 Database name                   :  drupal
 Database                        :  Connected
 Drupal bootstrap                :  Successful
 Drupal user                     :
 Default theme                   :  bartik
 Administration theme            :  seven
 PHP executable                  :  /usr/bin/php
 PHP configuration               :  /etc/php5/cli/php.ini
 PHP OS                          :  Linux
 Drush script                    :  /root/.composer/vendor/drush/drush/drush.php
 Drush version                   :  8.1.11
 Drush temp directory            :  /tmp
 Drush configuration             :
 Drush alias files               :
 Install profile                 :  standard
 Drupal root                     :  /var/www/html
 Drupal Settings File            :  sites/default/settings.php
 Site path                       :  sites/default
 File directory path             :  sites/default/files
 Temporary file directory path   :  /tmp
Anonymous’s picture

Even with clearing the Caches we are still getting the same error.

We used the latest stable release to get the API Wrapper to successfully install.

Ae are using Drush 7.4 is this an issue?

Any ideas?

Anonymous’s picture

Status: Closed (cannot reproduce) » Active
jan.mashat’s picture

Status: Active » Postponed (maintainer needs more info)

Does that mean my assumptions above were correct?
Maybe you can try with drush 8.1.11 to see if that's the culprit.

Anonymous’s picture

I am still running drupal 6 on a few sites so I cannot update Drush for another month.

jan.mashat’s picture

Drush 8 should be compatible with Drupal 6 according to http://docs.drush.org/en/master/install/

jan.mashat’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)