If a search query has >20 results the results page is printed with pager links (good).

All the pager links are broken (not so good).

CommentFileSizeAuthor
#2 nonworking-patched.tar.gz37.51 KBowen barton

Comments

handelaar’s picture

http://drupal.org/files/issues/tablesort_and_REQUEST_arrays_1.patch

This patch works for me (version 4.5.2). Apparently it doesn't work on 4.6 even when applied by hand, though.

Thanks to crunchywelch for helping to find it.

owen barton’s picture

StatusFileSize
new37.51 KB

I have a very similar (possibly the same) problem. The page 2 link doesn't work, but also the sorting (via column headers) doesn't work - clicking on either of these links takes you back to the search form. Both of these work fine on flexinode/table/x however.

I tried the above patch, which applied fine (to version 4.5.2) but didn't fix either problem. Would you be able to attach your patched files so I can compare them to mine and see if it is a difference in the files themselves or a change somewhere else which is causing the bork? I am attaching mine (post patch).

I did see how it was supposed to work however, which gave me an idea for a possible simpler fix. Couldn't the search terms but included on the page as hidden form items and then the various links (pager/sort) be form submit links? This might remove the need for patching drupal core and simplify the whole thing. Any ideas on whether this would work?

Thanks!
- Grugnog

owen barton’s picture

The patch does work - the problem was with flexinode not checking GET for op=search. What I needed to do, then (after appying the patch), was change flexinode.module as follows:

function flexinode_page_search_form($ctype_id = 0) {
  if (!$ctype_id) {
    drupal_not_found();
  }

  if ($_POST['op'] == t('Search')) {
    return flexinode_page_table($ctype_id);
  }

to

function flexinode_page_search_form($ctype_id = 0) {
  if (!$ctype_id) {
    drupal_not_found();
  }

  if (($_POST['op'] || $_GET['op']) == t('Search')) {
    return flexinode_page_table($ctype_id);
  }
owen barton’s picture

By the way, this fixes both the pager and the sorting problems!

jonbob’s picture

I have to wait until the core is patched to be able to use this fix, if I understand correctly. Yes?

lordslumber’s picture

I used grunog2's patch because I wasn't able to sort searches on URL's like /flexinode/search/1 without it sending me back to click the search button again. This was happening on on 4.6 version of flexinode. After I applied the patch, it works fine.

Thanks!

lordslumber’s picture

I noticed a different problem, and am wondering if anyone else has a similar problem after applying grugnog2's patch. If I run a search on flexinode as I stated above, and then I try to sort the column of search results, it returns a different sorted list. It appears to remove all the filters I applied with my search and sort the entire table instead. For example, I've got a couple drop down lists and then the search terms. If I set any or all of those to something and ran a search, it would return results as it shoult, but as soon as I clicked to sort the search results, it acts as if there were no dropdowns or search criteria selected and sorts all nodes of that flexinode type.

Anyone else see this happen?

thanks,
calvin

spazfox’s picture

after applying the patch above, my whole site is now down with the following error message:

Fatal error: Cannot redeclare drupal_goto() (previously declared in /home/contextu/public_html/includes/bootstrap.inc:677) in /home/contextu/public_html/includes/common.inc on line 168

I tried going back to the original core and flexinode.module files, but to no avail. Suggestions?

simon georges’s picture

Component: Code » flexinode.module (core)
Status: Active » Closed (won't fix)

This version of Flexinode is not supported anymore. The issue is closed for this reason.

Please upgrade to a supported version and feel free to reopen the issue on the new version if applicable.