Currently code some errors so I clened-up a code-style and coments too.

1) @author moved from each function to header doc-block
2) added uninstall function to remove module's variable
3) variable now stores only values for enabled blocks
4) added cache clean to allow reflect a changes in categories (delete) and saving settings
5) added static cache for fetching categories
6) added translation tag to query to mimic core's query
7) fixed logic with building blocks
8) messages are fixed to same as d7 core's contact block
9) fixed flood control to current D7
10) reordered hooks for block as d7 core does
11) form_alter is more granular to not fire on each form

CommentFileSizeAuthor
#1 1433234-cleanup.patch14.64 KBandypost

Comments

andypost’s picture

Status: Active » Needs review
StatusFileSize
new14.64 KB

Patch and marked as duplicate #1308720: Undefined index: 1 in contact_form_blocks_content() line 73

12) fixed path in hook_admin_path
13) fixed wrong permission name
14) fixed css selector

fuerst’s picture

andypost, Thanks for the work!

@cr0ss: Any word on this patch?

cr0ss’s picture

@fuerst, seems like patch is able to improve 7th version of module, so it can be applied.

@andypost, thank you for your great work!

andypost’s picture

Let's get this in and roll a stable or rc release - by this way the module gets more attention and testing because users does not read code and likes stable releases

juliekj’s picture

I get the error "Undefined index: 1 i contact_form_blocks_content()" on my site using the Contact form block module (7.x-1.x-dev).

According to this issue: http://drupal.org/node/1308720 it should be fixed here...

Do I need to add a patch to my copy? Or is there a new version coming out soon with the patch includede?
Not to steady with coding things (designer) so I'd rather not mess with the code - patch issue myself ;)

fuerst’s picture

Status: Needs review » Needs work

Tried the patch using a vanilla Drupal 7 and 3 different Contact form blocks at one page. What I found so far:

  • Variable contact_form_blocks_site_wide_categories is meant to hide categories from the global contact form, because you may show them in contact form blocks. It is not meant to configure which categories should be used as contact form blocks
  • Having the 3 contact forms at one page every form will use the default category when it should use another category instead. Seems like $form['cid'] = array('#type' => 'value', '#value' => $category); in contact_form_blocks_content() does not have any effect.
JoshOrndorff’s picture

It looks like several different issues are covered in this one patch, and an issue with one of them is keeping the rest from being committed.

Could we split it into several patches, or get an update to get the whole thing applied? I'd be happy to test a new dev if the patch is applied.

I think andypost is right about getting a beta or rc. More people will be willing to give the module a shot if it is more stable.

Let me know if I can help at all. Thanks,
-Josh Orndorff

fuerst’s picture

You are right: one patch per problem would be easier to handle. And for every patch one issue in the module's issue queue. That way we can close this issue and work at the others.

kaizerking’s picture

Good work , Thanks , this works nice!!!

oschuetze’s picture

Issue summary: View changes

Are these patches still up-to-date? Or is this already merged into the repository?