when the module is enabled AFTER unsetting the "links" fields as recommended in http://drupal.org/node/295569 (support request) using XXX_block_view_poll_recent_alter function. I am running Drupal v7.14-2-dev and Ajax Poll v7x.1.1.

Comments

quicksketch’s picture

The AJAX request is probably encountering a PHP error on the back-end, so it's not getting a JSON string back. Use Firebug to inspect the return result from your AJAX request. You'll probably be able to see a PHP error being returned.

Spark_man’s picture

Well, I have tried the approach suggested above and have failed miserably. I'll admit to not being an AJAX/Firebug debugging wizard, but I can't seem to find anything meaningful using Firebug other than the aforementioned error. Nevertheless, there is an error that occurs when the conditions are such as presented in my initial support request which make the AJAX Poll module unusable in a production environment. I have reluctantly uninstalled the AJAX Poll module, but I will continue to monitor this thread in hopes a remedy is found.

I should add that had I the ability to debug and resolve this issue on my own, I would likely have posted this as a bug report rather than a support request. But thanks anyway for taking the time to respond.

quicksketch’s picture

Hm, I'm not going to be able to provide any further help if I can't reproduce the problem. If you're experiencing the problem only after implementing some code that you found in a forum post, there's no way that any progress is going to be made here because the problem does not occur with a normal installation of the module. If you can provide exact steps to reproduce or a sample module that includes your modified code, we can probably find the problem.

Spark_man’s picture

Here is the code that I used, which can be found in the support thread for Ajax Poll (http://drupal.org/node/295569) - the post was by the user "rooby" on Nov 17, 2011:

<?php
/**
* Implements hook_block_view_MODULE_DELTA_alter().
*
* Remove the links from the poll block.
*/
function MYMODULE_block_view_poll_recent_alter(&$data, $block) {
  if (isset($data['content']['links'])) {
    unset($data['content']['links']);
  }
}
?>

Also, it doesn't appear to matter if the user is logged in or not. The voting block appears in a block which is in a panel, but it also occurs when the block is viewed on other (non-panel) pages. The above code was added to the theme template.php file. I am using a Zen sub-theme of my own design. Hope this helps.

magtak’s picture

I am having the same error on a clean installation and it only occurs when core caching is disabled.

legolasbo’s picture

This might be a duplicate of #1158232: undefined variable: _POST in drupal_build_form() which has a working patch