Description

This D7 module integrates Drupal with GatherContent, a service to "plan, structure and collaborate on web content" (http://gathercontent.com/).

Currently, the module allows you to import all pages from a GatherContent project, creating a node for every GatherContent page.

Project link

https://drupal.org/sandbox/brunodbo/1883798

Git repository

git clone --recursive --branch 7.x-1.x http://git.drupal.org/sandbox/brunodbo/1883798.git gathercontent

Reviews of other projects:

Comments

steveoriol’s picture

Status: Needs review » Needs work

Hello,

We found several errors on your module, you may like to look at the following URl for list of errors

http://ventral.org/pareview/httpgitdrupalorgsandboxbrunodbo1883798git

Do take time to rectify the issues.

trogels’s picture

Custom classes should be moved out of the module file into it's own and registered in your .info file. http://drupal.org/node/542202#files

brunodbo’s picture

Status: Needs work » Needs review

Thanks for the quick review! Issues mentioned in #1 and #2 have been fixed.

klausi’s picture

We are currently quite busy with all the project applications and I can only review projects with a review bonus. Please help me reviewing and I'll take a look at your project right away :-)

darrenwh’s picture

Hi,

I've taken a look at your class GatherContentPages and notice that in most cases each method is used on its own with out implementing any other method in the class apart from sortRecursive, could I suggest that you implement theses as static classes as this seems to be how they are being used, also the method sortRecursive is marked as Protected is there an intention to extend this class in the future and to implement this method in children? If not it should be set as Private in order to enforce encapsulation.

Looking more at the methods in your class I would look to breaking them down into smaller methods that do different work (this is if you intend not to make them static classes), getPages for example does not just get pages it checks if a page is approved, it does some sorting, and it does some variable initialising, have a think about this and see if you can break it into further methods and it will make it easier to understand, remembering to comment each method.

Hope this is of help :)

brunodbo’s picture

Issue summary: View changes

Adding link to application review.

brunodbo’s picture

Issue summary: View changes

Adding link to application review.

brunodbo’s picture

Issue summary: View changes

Adding link to application review.

brunodbo’s picture

Issue tags: +PAreview: review bonus

Adding review bonus tag.

klausi’s picture

Status: Needs review » Needs work
Issue tags: -PAreview: review bonus +PAreview: security

manual review:

  1. gathercontent_permission(): Since importing stuff into full HTML fields has security implications this permission should use 'restrict access' => TRUE.
  2. gathercontent_get_command(): why can't you use drupal_http_request() and have to use cURL? Please add a comment.
  3. "$cls->error = t($msg);": do not pass variables to t() where possible, always use string literals. Otherwise translation extraction tools cannot find the translatable strings.
  4. "t('%node_title created successfully.', array('%node_title' => check_plain($node->title)))": the "%" placeholder will run check_plain() for you already, so no need for that. Make sure to read the documentation of t() again. Also elsewhere.
  5. public function pageImportForm(): "'#title' => $page->name,": this is vulnerable to XSS exploits. The page comes from an external service and is therefore considered untrusted user provided input. You need to sanitize that before printing, see http://drupal.org/node/28984
  6. public function getPages(): what is going on in that method? Please add some inline comments.
  7. public function createNodes(): why do you call node_submit()? Please add a comment.

Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.

klausi’s picture

Tagging.

brunodbo’s picture

Thanks @darrenwh and @klausi for the reviews!

All issues except the getPages() cleanup/commenting have been addressed. Will tackle getPages() soon.

sebish’s picture

Hi there,

I've just given a shot today to test this out as it seems interesting. I got an issue with the API key not recognized, even though it the same that the one provided by GatherContent:

The GatherContent API could not be reached. Please verify your API credentials (Error message: There was a problem contacting the API. Please check your API credentials.)

I'm using a trial version of GatherContent, it might be a reason.

Config:
- Drupal 7.19
- Only Ctools and GatherContent are installed

Not sure if you've ever seen this issue before.

brunodbo’s picture

@sebish: I created an issue for your question at https://drupal.org/node/1908144. Would be great if you could follow up there (see https://drupal.org/node/1908144#comment-7028292).

sebish’s picture

Great thanks for that. I will check it.

brunodbo’s picture

Status: Needs work » Needs review

- Simplified getPages() method.
- Added comments to methods.
- Changed methods to be static (per https://drupal.org/node/1890670#comment-6980328).
- Removed some obsolete code, due to changes in the GatherContent API.

erok415’s picture

Hi @brunodbo,
I just found GatherContent and I love it. I'm also intrigued by the future integration of a beta gathercontent module for Drupal. By reviewing the notes and postings, it looks like your getting awful close to a beta release. ...and I'm sure you don't want to hear this question, but I have to ask... Do you have a timeframe on the beta release?

thanks and keep up the great work.
~e

brunodbo’s picture

Once this application gets approved, and it becomes a full project, I think a full release may happen shortly thereafter, depending on feedback and suggestions from other people. Hope that somewhat answers your question :)

jhedstrom’s picture

Status: Needs review » Reviewed & tested by the community

This looks good to me. Should definitely be a full project.

klausi’s picture

Status: Reviewed & tested by the community » Fixed

manual review:

Surely no blocker, so ...

Thanks for your contribution, brunodbo!

I updated your account to let you promote this to a full project and also create new projects as either a sandbox or a "full" project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and get involved!

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Thanks to the dedicated reviewer(s) as well.

brunodbo’s picture

Thanks @klausi! I added hook_requirements() to check for cURL.

Thanks @everyone for taking the time to review my application and offering feedback and suggestions, much appreciated. See you on IRC and in the issue queues :)

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

Anonymous’s picture

Issue summary: View changes

Section title