I recently mistakenly deleted my activity module folder and all its contents. When I re-pasted the module I found that some errors were showing up so I decided to reinstall the module all together. I installed the latest version which I believe was a more current than the version I had been using. As a side note I had made some customizations to the default all_activity view. The problem is that when I reinstalled the module, the views do not show up, nor do they show up in the preview. Any help with this issue is greatly appreciated. This module is awesome!
This is my export:
$view = new view;
$view->name = 'all_activity';
$view->description = 'All activity on a site.';
$view->tag = 'activity';
$view->view_php = '';
$view->base_table = 'activity';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('relationships', array(
'nid' => array(
'label' => 'Node',
'required' => 0,
'id' => 'nid',
'table' => 'activity',
'field' => 'nid',
'relationship' => 'none',
),
'uid' => array(
'label' => 'User',
'required' => 1,
'id' => 'uid',
'table' => 'activity',
'field' => 'uid',
'relationship' => 'none',
),
'content_profile_rel' => array(
'label' => 'Content Profile',
'required' => 1,
'type' => 'uprofile',
'id' => 'content_profile_rel',
'table' => 'users',
'field' => 'content_profile_rel',
'relationship' => 'uid',
'override' => array(
'button' => 'Override',
),
),
'field_file_fid' => array(
'id' => 'field_file_fid',
'table' => 'node_data_field_file',
'field' => 'field_file_fid',
'relationship' => 'nid',
),
'field_photo_fid' => array(
'id' => 'field_photo_fid',
'table' => 'node_data_field_photo',
'field' => 'field_photo_fid',
'relationship' => 'nid',
),
));
$handler->override_option('fields', array(
'picture' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '/user',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'imagecache_preset' => 'activity_user_image',
'exclude' => 0,
'id' => 'picture',
'table' => 'users',
'field' => 'picture',
'relationship' => 'uid',
),
'message' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
),
'exclude' => 0,
'id' => 'message',
'table' => 'activity_messages',
'field' => 'message',
'relationship' => 'none',
),
'image_image' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 1,
'empty_zero' => 0,
'link_to_node' => 1,
'image_derivative' => 'thumbnail',
'exclude' => 0,
'id' => 'image_image',
'table' => 'node',
'field' => 'image_image',
'relationship' => 'nid',
),
'comment_form' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'order' => 'ASC',
'limit' => '2',
'exclude' => 0,
'id' => 'comment_form',
'table' => 'activity_comments_field',
'field' => 'comment_form',
'relationship' => 'none',
),
));
$handler->override_option('sorts', array(
'aid' => array(
'order' => 'DESC',
'id' => 'aid',
'table' => 'activity',
'field' => 'aid',
'relationship' => 'none',
),
));
$handler->override_option('filters', array(
'status_extra' => array(
'operator' => '=',
'value' => '',
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'status_extra',
'table' => 'node',
'field' => 'status_extra',
'relationship' => 'nid',
),
'value_user_relationships_api' => array(
'operator' => '=',
'value' => '',
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'realms' => array(
'user_relationships_1' => 'user_relationships_1',
),
'id' => 'value_user_relationships_api',
'table' => 'activity_access',
'field' => 'value_user_relationships_api',
'relationship' => 'none',
),
'type' => array(
'operator' => 'not in',
'value' => array(
'product' => 'product',
'product_kit' => 'product_kit',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'type',
'table' => 'node',
'field' => 'type',
'relationship' => 'nid',
),
));
$handler->override_option('access', array(
'type' => 'none',
));
$handler->override_option('cache', array(
'type' => 'none',
));
$handler->override_option('use_ajax', TRUE);
$handler->override_option('items_per_page', 25);
$handler->override_option('use_pager', '1');
$handler->override_option('style_plugin', 'table');
$handler->override_option('style_options', array(
'grouping' => '',
'override' => 1,
'sticky' => 0,
'order' => 'asc',
'columns' => array(
'picture' => 'picture',
'message' => 'message',
'image_image' => 'image_image',
'comment_form' => 'message',
),
'info' => array(
'picture' => array(
'sortable' => 0,
'separator' => '',
),
'message' => array(
'separator' => '',
),
'image_image' => array(
'separator' => '',
),
'comment_form' => array(
'separator' => '',
),
),
'default' => '-1',
));
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->override_option('path', 'activity/all');
$handler->override_option('menu', array(
'type' => 'none',
'title' => '',
'description' => '',
'weight' => 0,
'name' => 'navigation',
));
$handler->override_option('tab_options', array(
'type' => 'none',
'title' => '',
'description' => '',
'weight' => 0,
'name' => 'navigation',
));
$handler = $view->new_display('block', 'Block', 'block_1');
$handler->override_option('block_description', '');
$handler->override_option('block_caching', -1);
Comments
Comment #1
yosisays commentedI tried uninstalling the module again; I disabled it, uninstalled it, then completely removed the module from the modules folder, then re-downloaded the module and re-pasted it into the modules folder. After enabling the module it comes back with a an error:
warning: Invalid argument supplied for foreach() in /includes/common.inc on line 3338.
warning: Invalid argument supplied for foreach() in /includes/common.inc on line 3259.
Any thought?
Comment #2
yosisays commentedI would greatly appreciate any help someone can offer up. Thnaks in advance.
Comment #3
lawrence commentedUninstalling a module removes important tables in the database. If you have one, I suggest you revert to a previous backup immediately.
1. Did you run update.php after reinstalling the module?
2. Did you try installing a previous release? It could have been an earlier version that was working with your website, and not the latest release.
Some more information would be helpful, this is all I can think of at the moment, hope it helps.
Comment #4
Scott Reynolds commentedWhat does this mean? The View didn't work or the View didn't show up on admin/build/views
Comment #5
yosisays commentedThe all_activity view does show up on admin/build/views list and is enabled. I'm somewhat of a newbie so forgive my lack of ability to describe my issue with proper terminology but the best I can do to describe the problem is that the info that is supposed to be displayed with the all_activity view no longer displays in either the preview from within the views editing page or on the actual page it is suppose to be displayed on (www.sitename.com/activity/all). I tried reverting to the previous release, as suggested by Lawrence in post #3, but it still turns up blank.
The issue began when I accidentally deleted the activity module folder. When I re-pasted the module back in the folder from a newly downloaded file I found that some errors were showing up and new activities were not showing up in the view so I decided to reinstall the module all together. I installed the latest version which I believe was a more current one than that which I had been using(both however were 6.x-2.x-dev). Once I reinstalled the module, no info (old or new activity info ) could be seen. I though this might be because of newer version so I reverted to the older release but still nothing. I’ve run update.php , tried uninstalling and reinstalling a number of times but I’m sill coming up empty handed.
Comment #6
lawrence commentedI do have a suggestion, but you're not gonna like it, and there may be another solution, but here's a last resort solution.
Please remember to make a backup.
1. Uninstall views alltogether.
2. Uninstall activity module all together.
3. Uninstall all modules directly related to the "Views" and the "Activity" module.
4. Go to your database, look in the "System" table and the "Variable" table.
5. In the "System" table, CTRL + F for "sites/all/views" and "sites/all/activity" and click delete on related rows.
6. In the "Variable" table, CTRL + F for "Views" and "Activity" and click delete on related rows. (WARNING: Be sure they are actually related to said modules.)
7. Do the same for any related modules you've uninstalled.
8. Upload the latest versions of all modules.
9. Install.
10. Update.php to play it safe.
11. Rebuild your views, redo what you did for activity module.
By wiping the "System" and "Variable" tables of any "Views" or "Activity" modules, you're kind of giving yourself a clean slate to work with. It'll reinstall all the modules as if it's the first time, overriding any previous entries. It should take around 2 hours for someone new to phpMyAdmin.
Or you could just replace the table data with a working backup. :) - (Remember, this is a last resort, and there's probably a much better solution.)
Comment #7
yosisays commentedthanks for the responce... but it didnt work I still got the error upon installing the activities module:
• warning: Invalid argument supplied for foreach() in /includes/common.inc on line 3338.
• warning: Invalid argument supplied for foreach() in /includes/common.inc on line 3259.
and the view does not work still :(
the common.inc code the error is refering to is the following:
3253 */
3254 function drupal_install_schema($module) {
3255 $schema = drupal_get_schema_unprocessed($module);
3256 _drupal_initialize_schema($module, $schema);
3257
3258 $ret = array();
3259 foreach ($schema as $name => $table) {
3260 db_create_table($ret, $name, $table);
3261 }
3262 return $ret;
3263 }
3335 */
3336 function _drupal_initialize_schema($module, &$schema) {
3337 // Set the name and module key for all tables.
3338 foreach ($schema as $name => $table) {
3339 if (empty($table['module'])) {
3340 $schema[$name]['module'] = $module;
3341 }
3342 if (!isset($table['name'])) {
3343 $schema[$name]['name'] = $name;
3344 }
3345 }
3346 }
Comment #8
Scott Reynolds commentedThis fixes the error messages:
http://drupal.org/cvs?commit=401842
The View doesn't work because you destroyed all the data when you uninstalled. By uninstalling you removed the following things:
1.) Deleted the Trigger assignments for all the templates you created, thus without creating new templates, nothing will be recorded
2.) Deleted all settings for Activity
3.) Removed all data stored in the following tables: activity_access, activity_messages, activity_targets, activity, activity_comments and activity_comment_stats
So you need to set up your templates again and if possible run the regeneration step.
Comment #9
yosisays commented> This fixes the error messages:
> http://drupal.org/cvs?commit=401842
I implemented the changes per this commit
> The View doesn't work because you destroyed all the data when you uninstalled. By
> uninstalling you removed the following things:
> 1.) Deleted the Trigger assignments for all the templates you created, thus without
> creating new templates, nothing will be recorded
I recreated the templates via the activity publisher template
> 2.) Deleted all settings for Activity
I resaved the settings via admin/site config/activity
> 3.) Removed all data stored in the following tables: activity_access,
> activity_messages, >activity_targets, activity, activity_comments and
> activity_comment_stats
Would new “activity” repopulate these tables? If so I have created new nodes,posted new comments etc.
> So you need to set up your templates again and if possible run the regeneration step.
The templates have been rebuilt as noted above. How would I go about the “regeneration step”?
I have done all this and still no activities showing up
Comment #10
Scott Reynolds commentedhttp://skitch.com/supermanscott/dxm1n/activity-publisher-templates-contr...
click the button :-D
Comment #11
yosisays commentedsweet! that fixed it! thanks
Comment #12
Scott Reynolds commentedBe careful next time when uninstalling modules ;-)