Hello,

Upon upgrading from 6.x-1.x-dev to 6.x-3.x-dev the 'Advanced Poll: Latest poll block' is no longer showing.

How do I go about figuring out why this is occurring and how do I fix it?

Thanks,
Brian

CommentFileSizeAuthor
#3 advpoll-1429452-3.patch1.15 KBdmitriy.trt

Comments

Michele Wickham’s picture

1. I renamed the block to Advanced Poll: Recent Poll - does that appear in your block page? I felt that with the additional blocks that can be generated, it made sense to give them all a common designation to make them easier to find in the block list. Also, I found it difficult to determine which recent poll block was coming from Advanced Poll vs the default Drupal Poll when both modules are turned on.

2. There was an additional column added to the advanced poll table - make sure you run updates.

Let me know if there continues to be a problem. Another possibility is that I simply need to repackage the build.

Thanks,
M

detonator94’s picture

I have the same problem

dmitriy.trt’s picture

Status: Active » Needs review
StatusFileSize
new1.15 KB

It happens because of missing support for polls without start/end dates in this block. Patch should fix it.

P3t3r’s picture

This is still present in the current version and the patch does not fix it anymore in this version.

I found that the function was renamed to advpoll_get_recent(), but I'm not sure how I should modify the SQL query to make it work: adding d.advpoll_dates_value = 0 and d.advpoll_dates_value2 = 0 doesn't seem to work.

Borris’s picture

Removing the date check works. That's what I did for mine. :)
Dunno what the value is supposed to be for empty dates.

Strictfx’s picture

Issue summary: View changes

In the newest version of the module, the problem is in the function advpoll_get_recent() like P3t3r said.

I correct it l.926 like this :

foreach ($result as $record) {
  // Load the node
  $node = node_load($record->nid);

  // Verifie the option
  if($node->advpoll_options["und"][0]["value"] == "electoral") {
    if(empty($user->uid)) {
        $userUID = 0;
    } else {
        $userUID = $user->uid;
    }
    
    $verif_droit = db_query('SELECT COUNT(*)
                             FROM {advpoll_electoral_list} ael
                             WHERE ael.nid = '.$record->nid.'
                                   AND ael.uid = '.$userUID)->fetchField();

    if(!empty($verif_droit)) {
        $node = node_load($record->nid);
        break;
    } else {
      $node = "";
    }
  } else {
    break;
  }
}

Not sure if it's the best way to do it but it works for me...

gobinathm’s picture

Status: Needs review » Closed (outdated)

D6 is EOL hence this issue won't be fixed (or) attended. So closing it.