Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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);
}
}
Comment | File | Size | Author |
---|---|---|---|
#9 | interdiff-8-9.txt | 925 bytes | jwilson3 |
#9 | webform_to_gdocs-update_d6_hooks-2625566-9-D7.patch | 1.26 KB | jwilson3 |
Comments
Comment #2
charlie-s CreditAttribution: charlie-s commentedAre 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?
Comment #3
joaorodr84 CreditAttribution: joaorodr84 commentedHi.
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.
Comment #4
joecorall CreditAttribution: joecorall commentedHello,
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.
Comment #5
ghedolo CreditAttribution: ghedolo commentedtested patch on drupal 7: it seems does not work....
Comment #6
joecorall CreditAttribution: joecorall commented@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.
Comment #7
richgerdesChanges 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.
Comment #8
progpapa CreditAttribution: progpapa at NDP commentedChanged the patch in #7 to respond to node delete, instead of node type delete + fixed database query syntax.
Comment #9
jwilson3RTBC.
This modification changes no logic from #8 but only updates the natural language of the permissions to match the terminology used in the UI.
Comment #10
apaderno