The hooks permission and nodeapi are not valid for drupal 7. This effects the following code bocks

/**
* Implements hook_perm().
*/
function webform_to_gdocs_perm() {
return array('administer webform_to_gdocs', 'attach webform to gdocs');
}

/**
* Implements hook_nodeapi().
*/
function webform_to_gdocs_nodeapi(&$node, $op) {
// Delete any webform_to_gdocs references to this node.
if ($op == 'delete') {
db_query("DELETE FROM {webform_to_gdocs_webforms} WHERE nid = %d", $node->nid);
}
}

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

miguelrro created an issue. See original summary.

charlie-s’s picture

Are you positive you're on version 4.2, have the module installed, and are at admin/config/content/webform/gdocs? What do you see at that page - a 404 message? A blank screen? Something else?

joaorodr84’s picture

Hi.

I am using Drupal 7, with Webform 7.x-4.12 and Webform to Google Docs 7.x-4.2. Both modules are activated.

Like @miguellro, I have succesfully performed the instructions from point 1.

But at point 2, the link "[my_website]/admin/config/content/webform/gdocs" does not work.

I get this:
A página pedida "/admin/config/content/webform/gdocs" não foi encontrada.

Which means:
The requested page "/admin/config/content/webform/gdocs" could not be found.

How should I proceed?

Thanks a lot.

joecorall’s picture

Status: Active » Patch (to be ported)
FileSize
700 bytes

Hello,

This module's permission definitions were using the D6 version of the hook. The attached patch makes the permissions available for D7.

After applying this patch, you'll need to go to /admin/people/permissions and give the respective roles the "Administer Webform to Google Docs" permission.

ghedolo’s picture

tested patch on drupal 7: it seems does not work....

joecorall’s picture

@ghedolo Do you see the two permissions at /admin/people/permissions (example screenshot of what you should see)?

If not, you will need to clear the cache at /admin/config/development/performance and try /admin/people/permissions again.

richgerdes’s picture

Title: Config tab does not show up » Update hooks to Druapl 7
Version: 7.x-4.2 » 7.x-4.x-dev
Component: User interface » Code
Category: Support request » Bug report
Priority: Major » Critical
Issue summary: View changes
Status: Patch (to be ported) » Reviewed & tested by the community
FileSize
1.25 KB

Changes to the summary and updated it to reflect the real issue here. Rebuilt the patch to be a better solution to the problem as it did not only effect just one function.

progpapa’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
1.26 KB
1.26 KB

Changed the patch in #7 to respond to node delete, instead of node type delete + fixed database query syntax.

jwilson3’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
1.26 KB
925 bytes

RTBC.

This modification changes no logic from #8 but only updates the natural language of the permissions to match the terminology used in the UI.

apaderno’s picture

Title: Update hooks to Druapl 7 » Update hook implementations to Drupal 7