I followed the instructions for Blue Droplet and storage, etc. Created the new content type, added a BD video field, created content with a file to upload; everything seemed to work ok, but when I kicked off cron the ffmpeg transcoding failed (probably something I screwed up). So, I deleted the content and went back to the video content type to examine the field settings to see what I may have set incorrectly, and now I get these errors (repeated 5 times) when I try to edit the field:

# warning: Illegal offset type in /home/parkerchamber/drupal/sites/all/modules/storage_api/storage_api.module on line 297.
# warning: Illegal offset type in /home/parkerchamber/drupal/sites/all/modules/storage_api/storage_api.module on line 268.

I've tried deleting the field and re-adding it, but the errors persist. I set everything up for Drupal/Filesystem - the file which was uploaded still persists in /files/storage

What else do you need to know?

--Scott

Comments

ScottW’s picture

I noticed this morning that the file in /files/storage associated with the content I had deleted was no longer there - looking at the logs, it appears that the regular cron run triggered something in the storage_api to do cleanup: Object instance destroyed. Container: Local Storage, object_id: 1, size: 114.25 MB

And now I am no longer receiving the error when I try to configure the BDV video field.

bcobin’s picture

I got the exact same error, repeated five times. I then "fell back" to the previous versions of Storage API and BD Video and things seem to be working well, more or less. (There looks to be some incompatibility between BD video and later builds of FFMPEG, but that's another issue.)

Would you say that re-running cron has solved the problem? If so, I may try to upgrade to the latest and (presumably) greatest. Thanks much!

jbrown’s picture

Assigned: Unassigned » jbrown
Category: support » bug

This is really weird. I think it might be a PHP bug. What PHP version are you guys using?

bcobin’s picture

PHP 5.2.5 and MySQL version 5.0.41 - thanks for looking into this!

jbrown’s picture

Is it happening with the latest snapshot?

If so, how do you trigger it and does it cause any problems?

bcobin’s picture

Thanks for looking into this, Jon.

Here's what I just did (with two instances of working test content):

Upgraded working StorageAPI / BD Video combo to latest versions (release version of StorageAPI).

update.php threw the following error:

user warning: Duplicate column name 'serve_url' query: ALTER TABLE storage_file ADD serve_url VARCHAR(4095) NULL in /[base_URL]/sites/all/modules/storage_api/storage_api.install on line 245.
user warning: Duplicate column name 'last_touched' query: ALTER TABLE storage_file CHANGE last_served last_touched INT UNSIGNED NOT NULL in /[base_URL/sites/all/modules/storage_api/storage_api.install on line 257.

Updates were attempted. If you see no failures below, you may proceed happily to the administration pages. Otherwise, you may need to update your database manually. All errors have been logged.

Main page
Administration pages
The following queries were executed

storage_api module

Update #6105

Failed: ALTER TABLE {storage_file} ADD serve_url VARCHAR(4095) NULL
Update #6106

Failed: ALTER TABLE {storage_file} CHANGE last_served last_touched INT UNSIGNED NOT NULL

On re-entering site, following error message on all pages:

warning: Illegal offset type in /[base_URL]/sites/all/modules/storage_api/storage_api.module on line 279.
warning: Illegal offset type in /[base_URL]/sites/all/modules/storage_api/storage_api.module on line 308.
warning: Illegal offset type in /[base_URL]/sites/all/modules/storage_api/storage_api.module on line 279.
warning: Illegal offset type in /[base_URL]/sites/all/modules/storage_api/storage_api.module on line 308.
warning: Illegal offset type in /[base_URL]/sites/all/modules/storage_api/storage_api.module on line 279.
warning: Illegal offset type in /[base_URL]/sites/all/modules/storage_api/storage_api.module on line 308.

Cleared all caches - the same six error message lines persist.

Falling back to the earlier version, which seems to work, more or less, the following message (with a single error) is generated:

user warning: Duplicate column name 'last_served' query: ALTER TABLE storage_file ADD last_served INT UNSIGNED NOT NULL in /[base_URL]/sites/all/modules/storage_api/storage_api.install on line 191.

Updates were attempted. If you see no failures below, you may proceed happily to the administration pages. Otherwise, you may need to update your database manually. All errors have been logged.

    * Main page
    * Administration pages

The following queries were executed
storage_api module
Update #6100

    * ALTER TABLE {storage_serving} MODIFY container_id INT UNSIGNED DEFAULT NULL 

Update #6101

    * ALTER TABLE {storage_selector} DROP PRIMARY KEY, ADD PRIMARY KEY (selector_id, class_id) 

Update #6102

    * ALTER TABLE {storage_file} MODIFY source_url VARCHAR(4095) NOT NULL 

Update #6103

    * Failed: ALTER TABLE {storage_file} ADD last_served INT UNSIGNED NOT NULL 

Update #6104

    * ALTER TABLE {storage_container} MODIFY settings VARCHAR(16383) NOT NULL 

Site seems to be OK.

Hope this helps - thanks again for investigating - I'll check back!

jbrown’s picture

Can you set line 273 in storage_api.module to the following:

debug_print_backtrace();

and post the output here?

It seems you are rerunning the db updates. Each update only needs to be run once per site, even if you downgrade then upgrade again. This probably isn't related though.

bcobin’s picture

I'm assuming this is with the release version of Storage API - currently, I'm back to a a working combo of earlier versions. The (older) installed version currently reads "return FALSE;" at line 273, whereas the release version has a blank line.

I'm happy to test - please advise me which version(s) you'd like me to check out for both Storage API and BD Video respectively and how you'd like me to proceed - thanks!

As to the update issue, aside from completely de-installing (which I suppose I'll do once all this is sorted and then re-install), I would assume users will run into this situation unless they remove the module while running update.php.

jbrown’s picture

Use 6.x-1.0 for both bd_video and storage_api with the line as described in #7

Is the site online?

Drupal knows not to run each update more than once. I don't understand why they are being re-run on your site.

jbrown’s picture

Title: Illegal offset error from Storage when editing BDV field » FileField is calling storage_api_file_load() as a hook.
Priority: Normal » Critical

in field_file_load() in field_file.inc:

    foreach (module_implements('file_load') as $module) {
      $function =  $module .'_file_load';
      $function($file);
    }
jbrown’s picture

Title: FileField is calling storage_api_file_load() as a hook. » FileField is calling storage_api_file_load() as a hook
Status: Active » Fixed
robertdouglass’s picture

Issue tags: +namespaces

Tagging with "namespaces" to highlight the problem of using zero namespacing in Drupal.

Status: Fixed » Closed (fixed)
Issue tags: -namespaces

Automatically closed -- issue fixed for 2 weeks with no activity.