When I have Hide Node Links enabled, I cannot delete content on my content overview page.

It asks for a confirmation that I want to delete the content, but once I confirm, it goes back to the overview and no error messages are given. The following message is logged in my error.log:
[error] [client] PHP Fatal error: Call to undefined function hide_node_links_link_delete() in /var/www/vhosts/vpcl/subdomains/beta/httpdocs/sites/all/modules/hide_node_links/hide_node_links.module on line 131, referer: http://vpcl/en/admin/content?render=overlay&render=overlay

CommentFileSizeAuthor
#3 hide_node_links-1604802-03.patch902 bytesjamsilver

Comments

kerrymick’s picture

Not sure if this helps or if it was the right thing to do, but I just deleted

function hide_node_links_node_delete(stdClass $node) {
hide_node_links_link_delete('node', $node->nid);
}

from the hide_node_links.module file and everything still seems to working okay and I can now delete content.

Ankabout’s picture

I didn't need the module any more, so I'm not going to try it, but of course this can't be a permanent solution. I think the maintainers need to comment on this and find a way to exclude the function from the admin interface or something?

jamsilver’s picture

Priority: Normal » Critical
Status: Active » Needs review
StatusFileSize
new902 bytes

Patch attached.

Fanaile’s picture

Almost...

After I applied the patch in #3, I got another error, this time a PDO exception that the database table did not exist.

On line 422... I changed

function hide_node_links_link_delete_multiple(array $conditions) {
  $query = db_delete('hode_node_links');
  foreach ($conditions as $field => $value) {
    $query->condition($field, $value);
  }

to

function hide_node_links_link_delete_multiple(array $conditions) {
  $query = db_delete('hide_node_links');
  foreach ($conditions as $field => $value) {
    $query->condition($field, $value);
  }

I don't know how to write it into the patch, but after I made that change, it worked and I could delete content again without issue.

mrfelton’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

Changed tag