Hi,
- Has anyone seen the following problem upgrading to 3.12.1 or have any suggestions?
The process stalled at:
Completed 20 of 90 22%
Updating os_files module.
- I skipped some releases. Should I have first upgraded to 3.9.x then 3.10.x, 3.11.x and finally 3.12.1?
Thank you!
The problem details:
I upgraded from 3.8.1 to 3.12.1.
Update.php showed four warnings and then the update stalled. I left it overnight and it didn't change.
The four warnings were:
Warning: class_implements(): Class OEmbedStreamWrapper does not exist and could not be loaded in file_get_stream_wrappers() (line 136 of /var/www/opto.cetuc.puc-rio.br/public_html/includes/file.inc).
Warning: in_array() expects parameter 2 to be array, boolean given in file_get_stream_wrappers() (line 136 of /var/www/opto.cetuc.puc-rio.br/public_html/includes/file.inc).
Warning: class_implements(): Class OEmbedStreamWrapper does not exist and could not be loaded in file_get_stream_wrappers() (line 136 of /var/www/opto.cetuc.puc-rio.br/public_html/includes/file.inc).
Warning: in_array() expects parameter 2 to be array, boolean given in file_get_stream_wrappers() (line 136 of /var/www/opto.cetuc.puc-rio.br/public_html/includes/file.inc).
The process stalled at:
Completed 20 of 90 22%
Updating os_files module.
Comments
Update process timed out after 24 hours
The update process timed out after 24 hours with the following message:
Message:
An AJAX HTTP request terminated abnormally. Debugging information follows. Path: http://opto.duckdns.org/update.php?op=selection&token=KH0bet86-8LKWyVRyR... StatusText: ResponseText: ReadyState: 4
I was directed to an error page with an overview, many other messages and a reference to a log file.
Error Page Overview:
The update process was aborted prematurely while running update #7010 in os_files.module. All errors have been logged. You may need to check the watchdog database table manually.
Error page messages:
Missing Feeds plugin OsImporterNodeProcessor. See os_bio. Check whether all required libraries and modules are installed properly.
Missing Feeds plugin OsImporterNodeProcessor. See os_cv. Check whether all required libraries and modules are installed properly.
Missing Feeds plugin OsImporterNodeProcessor. See os_blog_csv. Check whether all required libraries and modules are installed properly.
Missing Feeds plugin OsImporterFetcher. See os_blog_import_rss. Check whether all required libraries and modules are installed properly.
Missing Feeds plugin OsImporterNodeProcessor. See os_classes. Check whether all required libraries and modules are installed properly.
Missing Feeds plugin OsImporterNodeProcessor. See os_events_csv. Check whether all required libraries and modules are installed properly.
Missing Feeds plugin OsImporterNodeProcessor. See os_ical. Check whether all required libraries and modules are installed properly.
Missing Feeds plugin OsImporterNodeProcessor. See os_faq. Check whether all required libraries and modules are installed properly.
Missing Feeds plugin OsImporterNodeProcessor. See os_gallery. Check whether all required libraries and modules are installed properly.
Missing Feeds plugin OsImporterNodeProcessor. See os_documents. Check whether all required libraries and modules are installed properly.
Missing Feeds plugin OsImporterNodeProcessor. See os_links. Check whether all required libraries and modules are installed properly.
Missing Feeds plugin OsImporterNodeProcessor. See os_news. Check whether all required libraries and modules are installed properly.
Missing Feeds plugin OsImporterNodeProcessor. See os_pages. Check whether all required libraries and modules are installed properly.
Missing Feeds plugin OsImporterNodeProcessor. See os_presentation. Check whether all required libraries and modules are installed properly.
Missing Feeds plugin OsImporterNodeProcessor. See os_people. Check whether all required libraries and modules are installed properly.
Missing Feeds plugin OsImporterNodeProcessor. See os_feed. Check whether all required libraries and modules are installed properly.
Missing Feeds plugin OsImporterNodeProcessor. See os_software. Check whether all required libraries and modules are installed properly.
Warning in features rebuild of os_publications. No module defines permission "use text format title_filter".
and
LogFile:
Warning: Division by zero in os_files_update_7010()...
(repeated many times)
Following one of the LogFile links:
Type php
Date Thursday, April 3, 2014, 2:20pm
User admin
Location http://opto.duckdns.org/update.php?op=selection&token=KH0bet86-8LKWyVRyR...
Referrer http://opto.duckdns.org/update.php?op=selection&token=KH0bet86-8LKWyVRyR...
Message Warning: Division by zero in os_files_update_7010() (line 647 of /var/www/opto.cetuc.puc-rio.br/public_html/profiles/openscholar/modules/os/modules/os_files/os_files.install).
Severity warning
Hostname 192.168.1.1
Operations
Similar problem
http://community.openscholar.harvard.edu/openscholar/topics/os_files_mod...
The following updates returned messages
For completeness, these messages were reported on the error page.
The following updates returned messages
os module
Update #7025
os_files module
Update #7008
Regarding "Missing Feeds plugin OsImporterNodeProcessor."
The error page messages mentioned 17 times that there was a "Missing Feeds plugin OsImporterNodeProcessor." However, under modules, the Feeds module is enabled and shows OS importer as being enabled.
Requires: Chaos tools (enabled), Job Scheduler (enabled)
Required by: Feeds Admin UI (enabled), Feeds Import (disabled), Feeds News (disabled), Feeds Tamper (enabled), Feeds Tamper Admin UI (enabled), Feeds XPath Parser (enabled), Harvard courses (disabled), Bio/CV (enabled), OS Slideshow (disabled), OS importer (enabled), Blog (enabled), Booklets (enabled), Classes (enabled), Events (enabled), FAQ (enabled), Media Gallery (enabled), Links (enabled), News (enabled), Basic Pages (enabled), Presentations (enabled), Profiles (enabled), Publications (enabled), Reader (enabled), Software (enabled), Rbuild (disabled)
Update history
Jan. 31: Upgrade 3.7.4 to 3.9.3 failed at step 12/32.
Jan. 31: Restored 3.7.4
Feb. 08: Upgrade 3.7.4 to 3.9.3 failed at step 12/32 again.
Feb. 08: Restored 3.7.4
Feb. 08: Upgrade 3.7.4 to 3.8.1 succeeded with 5 strict warnings and 5 notices.
Feb. 13: Upgrade 3.8.1 to 3.11.1 succeeded however page not found after exiting maintenance mode.
Feb. 13: Restored 3.8.1
Feb. 13: Drush ./build of 3.9.4 failed.
Feb. 13: Drush ./build of 3.9.1 failed.
Feb. 13: Drush ./build of 3.10.1 succeeded.
Feb. 13: Upgrade 3.8.1 to 3.10.1 succeeded however only administration page works, nothing else.
Feb. 13: Restored 3.8.1
Apr. 02: Upgrade 3.8.1 to 3.12.1 failed at step 20/90.
Upgrade from 3.7.4 to 3.12.1 failed in the same manner
I restored my 3.7.4 site from Feb. 8.
I upgraded to 3.12.1 from this.
It failed in the same way.
"The update process was aborted prematurely while running update #7010 in os_files.module. All errors have been logged. You may need to check the watchdog database table manually."
Basic /update.php debugging tips
Does anyone have any basic /update.php debugging tips?
Thank you!
Here's how you can fix that
Here's how you can fix that update.
Restore to a working version of OpenScholar.
Add a file to the system. Could be anything. PDF, image, youtube video, doesn't matter.
Try again.
Here's the technical version:
The table field_data_media_description needs to not be empty. It needs to have at least one row. That table is the storage for the media_description field, which every file bundle gets an instance of. In that update, the table is copied into another, but assumes there's something in the table first.
Ok!
I just saw your note, thanks!
Edit:
The system already had several subsites and many files - lots of photos, news items, biblio data, even a photo gallery.
So the problem wasn't a lack of files per se.
Taking a clue from the name of the table (field_data_media_description) I went looking for missing descriptions.
Under the Galleries tab I had one gallery.
Editing the gallery (click on gear and edit) I found that it had no description, so I added one and saved.
Checking the database, field_data_media_description still had no data. However, field_data_media_gallery_description now had one piece of data; the description I just added. Nice.
The gallery had photos.
Editing one photo (gear / edit) I found some blank entries, among which were "Gallery Title - Title of File in a Gallery" and "Gallery Description."
I added a title and description and saved.
Checking the database, field_data_media_description and field_data_media_title now had data.
Edit 2:
This time, /update.php from 3.7.4 to 3.12.1 completed all 102 steps.
There were many warnings, but that is another topic.
I will mark this as solved, thank you.
os_files_update_7010() line 647 of ..../os_files.install
The main error seems to be "Division by zero in os_files_update_7010() (line 647 of .../os_files.install)"
Below is the os_files_update_7010() from .../os_files.install
/**
* Move values from Media Description to os_files_description
*/
function os_files_update_7010(&$sb) {
$q = db_select('field_data_media_description', 'mt')
->fields('mt');
if (!isset($sb['progress'])) {
$sb['progress'] = 0;
$sb['total'] = $q->countQuery()->execute()->fetchField();
$sb['limit'] = 50;
}
$q = $q->range($sb['progress'], $sb['limit'])
->execute();
foreach ($q as $r) {
$r->os_file_description_value = $r->media_description_value;
$r->os_file_description_format = $r->media_description_format;
drupal_write_record('field_data_os_file_description', $r);
$sb['progress']++;
}
$sb['#finished'] = $sb['progress']/$sb['total'];
if ($sb['#finished'] >= 1) {
return t('Moved data from Media description to OS Files Description.');
}
}
Line 647 which has the divide by 0 error is:
$sb['#finished'] = $sb['progress']/$sb['total'];
so it appears as though $sb['total'] is zero.
$sb['total'] seems be loaded with the number of elements in the 'field_data_media_description' table.
$q = db_select('field_data_media_description', 'mt')
->fields('mt');
$sb['total'] = $q->countQuery()->execute()->fetchField();
In my case 'field_data_media_description' seems to be empty.
I went to phpmyadmin, opened my openscholar database, and selected 'field_data_media_description'. The Browse tab reports "MySQL returned an empty result set (i.e. zero rows)."
Questions:
1. Does os_files_update_7010() need to check for the $sb['total'] = 0 case?
2. Or does my site require some of 'field_data_media_description'?
Thank you!
Sedroca, Looks like we didn't
Sedroca,
Looks like we didn't account for the case where there were no descriptions to update. The proper solution would be to return when no rows are found. If you are able to submit a patch that would be awesome (https://github.com/openscholar/openscholar/issues/5898). If you open a PR against SCHOLAR-3.x in github we can get it merge asap, if not we will get to it before long.
To skip over the function just update your schema version for the os_files module + 1.
-Richard
Ok!
I just opened a PR against SCHOLAR-3.x covering this issue and a similar one for os_files_update_7011.
I'm not sure if I followed all the correct formatting in the PR (title, explanation, etc); if I left something out please let me know.