Pagination Problem

-Cursed- - June 10, 2009 - 12:15
Project:webform report
Version:6.x-1.8
Component:User interface
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

I am having a problem with pagination with the webform report. The report works fine until I reached 21 lines. I get the pagination links for the next page. However, when clicked to go to page 2 or last page I go to the main page of the site. However, if I enter the following:

http://myurl?q=node/3/sort=desc&order=Status&page=2

I can get the next page. Since I am not running clean urls could this be the problem? Because the next link only has the sort=desc&order=Status&page=2 part of the url. Any ideas?

Searching the forums I only found one other mention of this problem. So that is why I am placing this here.

Thanks

#1

-Cursed- - June 25, 2009 - 19:48

I was able to correct the problem that I was having with the pagination. I found that if I modified the webform_report.inc file with the changes shown below I was able to get the pagination to work. Now I don't know if this the correct way this include file should be modified, but it works for me.

Looking at the code below:

I modified the line from:

     $output .= '<a class="pager-first active" title="' . t('Go to first page') . '" href="?sort=' . $_GET['sort'] . '&order=' . $_GET['order'] . '&page=1">' . t('« first') .'</a>';

to:
    $output .= '<a class="pager-first active" title="' . t('Go to first page') . '" href="?q=node/' . $node->nid . '/?sort=' . $_GET['sort'] . '&order=' . $_GET['order'] . '&page=1">' . t('« first') .'</a>';

I modified each instance of this line in the file to include the q=node/' . $node->nid . '/ part.

Hopefully, this might help someone else. I have attached the entire file to this comment.

AttachmentSize
webform_report.txt 14.95 KB
 
 

Drupal is a registered trademark of Dries Buytaert.