Views Upgrade and subsequent patch

Well, to my chagrin (AGAIN) I have had to patch the Views module after a routine upgrade. This time was better than the last but it still wasn’t fun.

You have to patch the views.aggregator.inc file. you can read earlier posts about this to get some of the additional details.

this is before:

// ———————————————————————-
// Aggregator category feed table

$data[‘aggregator_category_feed’][‘table’][‘join’] = array(
‘aggregator_item’ => array(
‘left_field’ => ‘fid’,
‘field’ => ‘fid’,
),
);

// ———————————————————————-
// Aggregator category table

$data[‘aggregator_category’][‘table’][‘group’] = t(‘Aggregator category’);

$data[‘aggregator_category’][‘table’][‘join’] = array(
‘aggregator_item’ => array(
// ‘left_table’ => ‘aggregator_category_feed’,
‘left_table’ => ‘aggregator_category_item’,
‘left_field’ => ‘cid’,
‘field’ => ‘cid’,
),
);

And this is after:

// ———————————————————————-
// Aggregator category feed table

$data[‘aggregator_category_item’][‘table’][‘join’] = array(
‘aggregator_item’ => array(
‘left_field’ => ‘iid’,
‘field’ => ‘iid’,
),
);
//
//
//

//
// ———————————————————————-
// Aggregator category table

$data[‘aggregator_category’][‘table’][‘group’] = t(‘Aggregator category’);

$data[‘aggregator_category’][‘table’][‘join’] = array(
‘aggregator_item’ => array(
// ‘left_table’ => ‘aggregator_category_feed’,
‘left_table’ => ‘aggregator_category_item’,
‘left_field’ => ‘cid’,
‘field’ => ‘cid’,

Search Module – Options and Plugins

Google proved it – Search is key. and the search that comes with Drupal is OK. But not great. I have some search features that I am using by exposing different Views’ filters to the site users. But that really isn’t good either. Melissa Mayer showed the world that simplicity is best (she designed Google’s nearly blank search page)

drupal search

and that lesson isn’t lost here. I need one way to search everything on my site. and that’s it. that is my quest for today and the last one that I will undertake before I start in on the actual design of the site with CSS and all that fun stuff. From the standpoint of function, this is the last thing to be done.

This is a good page to start with in regards to search. What is cool about the core search feature is the ability to extend the functionality via the checkboxes for additional search mods.   —–>

http://drupal.org/node/228411

What I really need to be able to search is the Aggregator items that I store. They are DB objects and not nodes which is what makes them tricky.

Drupal to Twitter – Complete (and to Facebook too!)

Wow, I am finally done with this. I now have my categorized RSS feed going straight to a Twitter account and a Facebook account. Both of these accounts are specific to my web site but that doesn’t really matter. And the real key to getting this to work is Twitterfeed.com. This is a free service that will take RSS feeds and consolidate them into Twitter, FB, Linkedin, there are a couple others too, I believe. But Twitter and FB are enough for me.

The Twitterfeed part wasn’t too bad to connect but it did require some tweaking to get it to work with what I have properly. If you decide to use Twitterfeed.com, be aware that the advanced options are more likely to need tweaking than advanced options usually are.

And what do I have?

  • 50+ RSS Sources from all over the state of TN in the USA.
  • 15 Categories configured in the Drupal Core Aggregator module. I am not using Feeds at all; it isn’t flexible enough for this case.
  • 1000 individual news stories that come in every day from these RSS Sources.
  • A Drupal View that displays the News items that I categorize as they come in.
  • An RSS “Feed” of that View that is available via http://docresource.org/news/24-twitter. This is a part of Views. Click Add, and click Feed.
  • A twitter feed – @docresource and FB account – DOCResource that need to get the same info that the View displays

The Twitter module was not needed to do this. Just Views and the Core Aggregator module. There are good reasons to use the Twitter mod; they just don’t apply here.

Turn a Drupal View into an RSS Feed

In my quest to get Aggregator DB items into Twitter automatically, I have finished one part that in itself is pretty good. I now have an RSS feed available for the View in its display on the front page of the site via the little RSS icon. you’ll need to sign in to see the View, in the center and the RSS icon at the bottom. But you can sign in with Facebook. but here is what i did to make this part work.

Under web services, make sure that you have:

RSS publishing

 You are here
Status message
The configuration options have been saved.
Feed description – add something for the hover on the rss icon

Description of your site, included in each feed.
Number of items in each feed- 10

Default number of items to include in each feed.
Feed contentTitles onlyTitles plus teaserFull text

Global setting for the default display of content items in each feed.
Then, go to your View. Here is a ss of what i have
view feed

this is really it. now i have an rss icon for the view. but the main thing that it is going to help me with is getting the rss feed into an importer from Feeds, then getting it into a Content Type that can be published automatically to Twitter. when i manage to make this work seemlessly, i’ll post it.

Production Change Request

Install updates for Organic Groups and SEO Checklist from Drupal.org

patch file ../sites/all/mods../views/modules/aggregator.views.inc with code supplied by Drupal.org from views_aggregator-category-table-498438.patch. see prev post for URL. installed in sand to correct issue with Views.

Aggregator categories, Views, Feeds, Panels and a solution

I am very happy today. I finally found a solution to the issue that I was having with Views and Aggregator items from the core mod. Aggregator is core, Views is contrib so this patch doesn’t involve hacking the core but be aware that an updated version of Views might break this again. I’m on Views 7.x.3.5

Here is the issue.

In Views, you can create a view for Aggregator items. But even though Categories is listed as an available field to add/filter against, it is not available unless the category field is used as the default category for that feed. when you go through the items and categorize them manually, that assigned category won’t show up in the View. this patch fixes that.

http://drupal.org/node/498438#comment-7063554

This is what I have. 20 RSS feeds from news sources all over the state. This is a catch all and I am only interested in certain stories. So, I have categories created to group the stories that I want together, regardless of the source. Every item that comes in has a default category of New. That way, I can see all new items together for categorization. This all works. It’s a pain, I have to look at about 40-50 items per day and categorize each one. But it is a big deal because I am dealing with a focused target audience. A niche. And stories that deal with their situation are import and need to be easy to get to.

So, I also need the power of Views. Views gives me much better presentation options when used by Panels than the Blocks interface does. Blocks is clunky and Panels is much better. And Views integrates well with Panels.

Now, you might ask, “why not use the Feeds Module?” well, i did. for hours and hours. and while it will do what I want, it is much more difficult for me (AT MY PRESENT LEVEL OF UNDERSTANDING*) to edit, categorize and tag individual nodes created by Feeds for each new news item. That takes a lot longer. And until I can write a module that does autotagging the way that will work for my type of content, I need to be able to use the Aggregator categories they way they are intended.

So, I implemented the patch. And it does work. I had to do it manually because code has been added since the patch was written to the Views mod and the line numbers are different. But it is really short. I’m on Views 7.x.3.5, Core 7.19. The patch goes into the modules/aggregator.views.inc file within the Views folder.

If you want to see why Views doesn’t work properly with Aggregator ietms read the post. the explanation is in there. This was a really frustrating experience but like all of those types of experiences, I am better off for it.

Views, Feeds, Aggregators and aggravation

I’ve had a few frustrating days with Drupal this week. Hence, the dearth of new posts. A word of warning though: don’t make too many assumptions about Drupal when you’re getting your “sea legs”. There are many, many ways to do things. and some that appear to be promising are frequently blind alleys. I think the best piece of advice that I could give right now would be to KISS – keep it simple stupid. Drupal is already complicated enough. Don’t go out of your way to make things any more difficult than they need to be.

  • Learn Views inside and out (it’s the saving grace of Drupal)
  • Have a dev/sand environment
  • be patient and creative. think around drupal problems and not through them

that’s it for now. going to try to get these feed imports to work the way i need them to work.

Feeds

well, i ran into a major issue with the core aggregator module. I can’t use the categories item as a means of building a views for aggregator items. it is listed there and you would think it should work, but it doesn’t. and it really pissed me off yesterday.

so, i’m dumping the core aggregator to use the feeds module. hopefully, that will be better.

import/export aggregator sources – drupal 7 core module

So i have my three environments setup and i am moving module settings from sandbox to quality. i have dozens of aggregator sources that i need to move. and i don’t want to reenter them manually. so i am using phpmyadmin to export the table to an sql file and then import it.

well, i made this work. it was a bit of a pain but not too bad. i had to install phpmyadmin on my sandbox server and export the proper table (aggregator_feed) to a sql file. i then sneakerneted the file to the new server. i had to install phpmyadmin on that server too. that was a bit more work. once i had it installed i was unable to access it without changing the root mysql user from ‘blank’ (no password) to ‘something’ (one of my password defaults). then i was able to import the sql file into the drupal db. since this is a core mod, i didn’t have to do anything to get the file to import properly. then, since i had had changed the password of the user that drupal runs under, i had to change that in the settings.php file used by drupal. done and done and it only took a couple hours.