Module Name

Beanstag

Description

Beanstag is a page title and meta attributes management tool which is useful for users to do SEO on their Drupal. It is a light weight module which provides a user friendly interface.

The motivation behind for building beanstag is that we want to make the SEO much easier for Drupal. I have been using Nodewords in the past for Drupal 6. It is a very good module which provide a complete features for SEO. Unfortunately, when it comes to a multilingual Drupal, the custom meta tags does not work becoz the path alias, which Nodewords stores, does not include the language prefix in the URL.

For example: We have 2 translated pages with the following URL alias

  • en/example-page
  • zh-hant/example-page

Nodewords only allows using the example-page as the path alias and that means we could not have translated meta tags for the translated pages.

Moreover, the Drupal 7 version of Nodewords is not yet released. That's why we would like to create a module which provides multilingual support and an intuitive inferface for users to manage the SEO in Drupal 7.

There is also another module called Meta tags quick. It is much simpler compared with Nodewords but it only supports front page and node page. But with Beanstag, you can add/edit any page title, meta tags as well as meta keywords to any pages. What Beanstag needs is just a url alias.

Go to Beanstag sandbox project page

Reviews of other projects

http://drupal.org/node/1898112#comment-6987306
http://drupal.org/node/1899230#comment-6986688
http://drupal.org/node/1879690#comment-6986762

Comments

alexreinhart’s picture

Is there a reason you could not contribute to the Nodewords module to support including the language prefix in the URL? Generally it's better to improve an existing module than to create an all-new one.

ykyuen’s picture

Hi Alex,

Thanks for your reply. =)

The main reason that i create BeansTag instead of contributing to the nodewords module is below.

Nodewords is much complicated compared with BeansTag, it provides much more features like the copyright and revisit after tags. But in return, some user may find it difficult to configure it. On the other hand, the terminology of BeansTag is simple and straight forward which is just mapping the metatags with the path alias. So BeansTag provides a more lightweight and simpler alternative solutions for some drupal websites which does not require complex SEO.

Just like Meta tag quick, it could help user to edit the node metas in a much simpler and straight forward way.

Regards,
Kit

dave reid’s picture

Note that the Nodewords version for Drupal 7 is actually out now: http://drupal.org/project/metatag. Meta tags quick also supports meta tags by path/alias too. Maybe you should give it another look?

sreynen’s picture

Status: Needs review » Needs work

Looks like this needs a response to #3.

ykyuen’s picture

The meta tags quick now supports multiple language now. so maybe this module should be terminated.

misc’s picture

@ykyuen has been contacted to ask if the application is abandoned.

After ten weeks with a status of needs work: the applicant may be contacted by a reviewer to determine whether the application was indeed abandoned. The action taken by the reviewer should be documented in the project application issue.

http://drupal.org/node/894256

ykyuen’s picture

Hi MiSc,

The project is still on going as requested by some users. you can refer to the issues tracker.

now it support tokens and also BeansTag for multiple path alias by using pattern. (ex. support "abc/def/*" as path alias).

Although nodewords now supports multilingual, i think BeansTag deserves to be an approved Drupal modules becoz it is much simpler and more user friendly.

Regards,
Kit

misc’s picture

If you want a review of your application, please switch it to need review. Also, you have to list the differences between your project and existing projects, if it is just simpler and more user friendly, you should maybe help the existing modules to become simpler and more user friendly?

ykyuen’s picture

Status: Needs work » Needs review

Hi MiSc,

i have updated the project page.

Meta tags is a sophisticated module which provide a complete features for managing page title, meta tags and meta description. On the other hand, Beanstag provided a simpler user interface. Although it is less powerful compared to Meta tags, BeansTag would be a alternative SEO tools for users who are looking for simple and lightweight solution.

One of the motivations of BeansTag is that i was a Nodewords/Meta tags user and i hope there should be a simpler module which could serve a similar purpose without too many configurations, that's why i create BeansTag.

Moreover, BeansTag has less features compared to Nodewords/Meta tags and i am not going to add more features on that because i would try to keep it as simple as possible. I think this is also a difference compared to Nodewords/Meta tags.

Regards,
Kit

anilbhatt’s picture

I think all the reviewers are right, nodewords/metatags has already running on huge websites, and i don't think so it not so complicated in any terms of uses, i will suggest you to if your are not happy with nodewords/metatags module then post an issue with feature request and try to add some patches to it.

anilbhatt’s picture

Status: Needs review » Needs work
ykyuen’s picture

Status: Needs work » Closed (fixed)

Hi anilbhatt,

Thanks for your reply. i would like to know if the project is not approved, can i still keep it as an experimental project and keep the code in the Drupal git repository? Or the project page will be terminated after a period of time?

Regards,
Kit

misc’s picture

There is no problem to keep a project in a sandbox, nobody would delete it.

ykyuen’s picture

ok. thanks for spending your time on the code review. =)

summit’s picture

Hi, metatag D7 is still not working for panels using all tokens, also metatag is not possible to get different meta tags based on the specific url or alias. Beanstag is doing that. I think there is now space for a real beanstag project, while somehow metatag is not bringing the functionality of D6 yet. Sorry if this is incorrect statement in your view.
Greetings, Martijn

vintorg’s picture

metatag is great when it works, but when it doesn't, it can be a headache. Beanstag saved me on two previous projects.

kingfisher64’s picture

Given #16 comment - surely this project should be released as a full projec, no?

ykyuen’s picture

Status: Closed (fixed) » Needs review

Dear reviewers,

As some of the users are requesting turning BeansTag into a full project, may i request for the review again?

Thanks for your attention.

Regards,
Kit

anton-staroverov’s picture

Status: Needs review » Needs work

Hi ykyuen,
thank you for your light-n-easy solution.

1) Git. You should create another branch called 7.x-1.x and set it to default. See http://drupal.org/node/1127732
2) Manual code review. beanstag.info: "Beansbox" is bad package name, may be it's better to rename package to "SEO" or something else?
3) UI. I have an idea how to edit page title and meta tags. You can display them on the bottom of the page where user can edit them and click "Save".

sreynen’s picture

For #2, see http://drupal.org/node/542202#package "In general, this property should only be used by large multi-module packages, or by modules meant to extend these packages, such as Fields, Views, Commerce, Organic Groups, and the like. All other modules should leave this blank."

Both Node Words and Meta Tags modules use the package name "Meta tags" so I think that's as much of an established package as we have here. You should either use an established package or nothing. Creating a new package with only one module in it makes package organization less useful for site administrators.

ykyuen’s picture

Hi tonystar and sreynen,

thanks for your quick responses and the suggestions. i will work on it in the coming days and let you know when it is ready.

About the package name, i think i will remove it as this moment as suggested by sreynen. Maybe later i could move it to SEO if this package name is established.

Thanks again.

Regards,
Kit

ykyuen’s picture

Status: Needs work » Needs review

Hi tonystar,

The following changes have been maded.
1. I have moved the update beanstag link from the admin toolbar root level to the admin/structure.

2. Create the 7.x-1.x branch and set it to default.

3. Remove the package name.

4. Comply the code to drupal coding standard by the Coder module.

All changes are commited to the 7.x-1.x branch.

Regards,
Kit

kingfisher64’s picture

Can we have another review so this can finally be released? After all the hard work put in I think that would be good :)

sreynen’s picture

kingfisher64, anyone can do reviews, so you don't have to wait on someone else. You can do it yourself. If you'd like to see this move forward, you can find instructions for how to do reviews here: http://drupal.org/node/894256

kingfisher64’s picture

sreynen - right thanks. I didn't know that. So much drupal.org documentation to get through.

Thank you.

robinvdvleuten’s picture

Automatic Review:
There are a lot of issues that you need to fix (http://ventral.org/pareview/httpgitdrupalorgsandboxbeansboxchrispang1189...)

Manual Review:

  • The name of your admin.inc file is confusing. I thought it contained the main admin form, but this one is in the .module file. Maybe you can also move this form to this include?
  • If I understand correctly, you have to press update beanstag to create/update the beanstag for the current path alias of the page. Maybe you can implement some functionality to make this an automated process through a cron hook?
robinvdvleuten’s picture

Status: Needs review » Needs work

After my review, probably some work needs to be done to make it at least pass the PAReview process.

robinvdvleuten’s picture

After my review, probably some work needs to be done to make it at least pass the PAReview process.

ykyuen’s picture

Thanks robinvdvleuten, i will update you after i have fixed them all. =D

ykyuen’s picture

Hi robinvdvleuten,

i have fixed the coding style and it passed the PAReview.
http://ventral.org/pareview/httpgitdrupalorgsandboxbeansboxchrispang1189...

I have also moved the beanstag_admin() to beanstag.admin.inc.

About the Update BeansTag link. It is only a shortcut. The BeansTag takes effect immediately once is it created or updated. There is no need a cron job to handle it.

i have removed the link from the admin root menu as suggested by kingfisher64
http://drupal.org/node/1815760

Thanks for your time on reviewing BeansTag. =)

ykyuen’s picture

Status: Needs work » Needs review
sprocketman’s picture

Status: Needs review » Needs work

A few minor things I noticed:

beanstag.install: Your update method name is beanstag_update_7000. My understanding from the documentation is that you should probably have beanstag_update_7100 since your current branch is 7.x-1.x.

beanstag.admin: In beanstag_admin_form(), just from a readability standpoint, I think it might be better to initialize the $form_data to just array(), and then add the associative keys as your first line of code if the array is empty. Something like this:

function beanstag_admin_form($form, &$form_state, $form_data = array()) {
  if(empty($form_data)) {
    $form_data['path_alias'] = '';
    $form_data['page_title'] = '';
    $form_data['meta_keywords'] = '';
    $form_data['meta_description'] = '';
    $form_data['meta_robots'] = '';
    $form_data['meta_canonical'] = '';
    $form_data['id'] = NULL;
  }

  // Then the rest of your code here.
}

It's probably just my personal preference, but something to consider.

In general, I would suggest adding a little more documentation. Specifically, your comment headers are missing the @param and @return directives. See Doxygen and comment formatting conventions for more info.

Other than these minor things, the code looks really clean. I have changed the status to 'needs work' for the previous items.

ykyuen’s picture

Status: Needs work » Needs review

Thanks for your suggestion atozstudio. I have fixed the hook_update_N number and also made the code changes as you suggested.

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 :-)

ykyuen’s picture

Issue tags: +PAreview: review bonus

Add PAReview: review bonus tag. =)

ain’s picture

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

Automated review

All clean, no issues.

Manual review

  1. Uninstall cleans up properly.
  2. On my first Beanstag creation right after enabling the module and opening the creation form:

    Warning: Missing argument 3 for beanstag_admin_form() in beanstag_admin_form() (line 93 of /Users/ain/NetBeansProjects/Drupal7/sites/all/modules/beanstag/beanstag.admin.inc).

  3. I was not able to get meta tags for a page at ?q=node/2 on a bare Drupal 7 installation with Token module disabled, Override and Robots checked in for configuration. If I did do something wrong, I should have help (or errors) to guide me through and provide the exact requirements. It could also be over the issue described in last point.
  4. Security testing not possible due to the issues.

Recommendations

  1. Validate path alias so that the meta tags can only be added for aliases that actually exist.
ykyuen’s picture

Sorry for the error. Will fix it asap when i have time.

and thanks again for the review.

ykyuen’s picture

Sorry for the late, i have fixed the error and add validation on path on beanstag submission as suggested by ain.

ykyuen’s picture

Issue tags: +PAReview

By the way, although i am the main maintainer of this module, the project is created by my ex colleague. so if this module is approved, could i be granted the "Create Full Projects" permission?

Thx. =)

ykyuen’s picture

Status: Needs work » Needs review
klausi’s picture

Issue tags: -PAReview +PAreview: review bonus

Don't forget to add the "PAReview: review bonus" tag as indicated in #1410826: [META] Review bonus, otherwise you won't show up on my high priority list.

jared_sprague’s picture

Hello Ykyuen!
Cool looking module! Here is my manual review:

Misc
- your files permissions are set to 775 you should change them to 644

Project Application Issue
- no git repo link in issue

Project Page
- Add the same link from your README.txt to your project page:
"For more information, visit http://eureka.ykyuen.info/tag/beanstag/"

README.txt
- Consider including the same sections on your project page in yur README.txt: Overview, Features, Installation, How to use, Known problems

beanstag.admin.inc
- line 68 you have a duplicate condition:

$prev_path = (isset($_SESSION['last_request_page']) && isset($_SESSION['last_request_page'])) ? $_SESSION['last_request_page'] : '';

shouldn't this be?

$prev_path = (isset($_SESSION['last_request_page'])) ? $_SESSION['last_request_page'] : '';

Testing
- manual test cases passed!

jongagne’s picture

Hi ykyuen,

Automated review passed without issues.

Manual Review:
Code is very clean and follows Drupal's standards and best practices. All manual test cases passed, and module uninstalls correctly.

Recommendations:
On the project page description, I would list the benefits of Beanstag over other similar modules in addition to the fact that it's easier to use. Perhaps mention that it works for panels using all tokens, and that it is possible have different meta tags based on a specific URL or alias, unlike Meta tags D7.

Cheers

vintorg’s picture

I would also add, the metatags module sometimes has issues, so this module can be a temporary fix while they patch issues. I use the metatags module, but it doesn't always play nice with the front page for some themes, so beanstag (which I would have named 'Simpletags', by the way) helps me bridge this.

klausi’s picture

Assigned: Unassigned » stborchert
Status: Needs review » Reviewed & tested by the community
Issue tags: -PAreview: review bonus

manual review:

  1. beanstag_admin_form(): why do you have to use the raw $form_state['input'] here and not $form_state['values']? You should always use $form_state['values'] where possible.
  2. beanstag_admin_form_submit(): "t('Your BeansTag (id = %id) is updated successfully.', array('%id' => check_plain($form_state['values']['id'])));": the "%" placeholder will already run check_plain() for you, so no need for that. Make sure to read the documentation of t() again.
  3. beanstag_bulk_delete_form(): use check_url() to sanitize URLs instead of check_plain().
  4. beanstag_load(): doc block is wrong, this is not a node hook.
  5. beanstag_exit(): the user module is loaded anyway, so no need for the extra module_load_include().
  6. beanstag_request_path_to_arg(): why is that needed? $_SESSION['prev_path'] is not read anywhere? Please add more comments or remove it.
  7. beanstag_request_path_load(): that function is never used? Same for beanstag_request_path_to_arg()?
  8. beanstag_set_meta(): no need to run check_plain on the #attributes as the theme function will run drupal_attributes anyway for you. And double escaping is bad.

So that are some major issues, but no critical application blockers and I think this is RTBC. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.

Assigning to stBorchert as he might have time to take a final look at this.

klausi’s picture

Status: Reviewed & tested by the community » Fixed

No objections for more than a week, so ...

Thanks for your contribution, ykyuen!

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.

stborchert’s picture

Assigned: stborchert » Unassigned

Oh, thanks Klaus for taking this ...

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

Add "Reviews of other projects" section.